Suppose $A\in \mathbb{R}^{n\times n}$ and $B\in \mathbb{R}^{n\times m}$ with $n>m$ and $rank(B)=m$.
Now given $B$, I would like to find all $A$'s such that $AB$ and $B$ have the same column space.
A trivial solution would be $A=I_n$, but I would like to find all solutions (explicitly if possible? or any necessary and sufficient condition that $A$ need to satisify?)
Let $\{e_1,e_2,\ldots,e_n\}$ be the standard basis of $\mathbb R^n$ and $B=USV^T$ be a singular value decomposition. Since $U$ and $V$ are nonsingular, \begin{aligned} &\operatorname{range}(B)=\operatorname{range}(AB)\\ &\Leftrightarrow\operatorname{range}(U^TBV)=\operatorname{range}(U^TABV)\\ &\Leftrightarrow\operatorname{range}(S)=\operatorname{range}(U^TAUS).\\ \end{aligned} As $B$ has rank $m$, the image of $S$ is $\operatorname{span}\{e_1,e_2,\ldots,e_m\}$. Therefore $\operatorname{range}(B)=\operatorname{range}(AB)$ if and only if the linear span of the first $m$ columns of $U^TAU$ is identical to $\operatorname{span}\{e_1,e_2,\ldots,e_m\}$. This means $U^TAU$ is in the form of $\pmatrix{X&\ast\\ 0&\ast}$. Hence the general solution is given by $A=U\pmatrix{X&\ast\\ 0&\ast}U^T$ where $X\in GL_m(\mathbb R)$.