A Matrix Equation I am looking for a simultaneous solution of two matrix equations
(all matrices here are real).
More precisely, let $m \leq n \leq q$ three positive integers, $A$ a $m \times q$ matrix and $B$ a $q \times n$ matrix, with $B$ of rank $n$ and $AB$ of rank $m$. Does there exist a $n \times q$ matrix $X$ such that
\begin{equation}
ABX=A,
\end{equation}
and
\begin{equation}
XB=I_{n}.
\end{equation}

I have realized that my question has a positive answer, as I have conjectured. This is the 
proof.
Since $AB$ has rank $m$ and $B$ has rank has rank $n$, there exists $n-m$ vectors $v_{1},... v_{n-m}$ in the vector space spanned by the raws of $B$ such that $
w_{1},...,w_{m},v_{1},...,v_{n-m}$ are a basis of $\mathscr{R}^n$, where $w_{1},...,w_{m}$ are the raws of $AB$.So there exists a $(n-m) \times q$ matrix $C$ such that
\begin{equation}
 \begin{pmatrix}
A \\
C
\end{pmatrix} B =
R,
\end{equation}
where
\begin{equation}
R=
\begin{pmatrix}
AB\\
CB
\end{pmatrix}
\end{equation}
is an invertible $n \times n$ matrix. Then define
\begin{equation}
X=R^{-1}
\begin{pmatrix}
A \\
C
\end{pmatrix}
\end{equation},
and we can easily check that $X$ satisfies the two given equations.
Thank you very much for your attention.
