Let the size of the a matrix $A$ be $n\times m$ and $n\times p$ of a matrix $H$ and assume $\mathrm{rank(A)}=\mathrm{rank(H)}=n$ and $m>p>n$. How do I find all possible solutions for $B$ (whose size is $m\times p$) in the matrix equation $$ AB=H $$ ?
The obvious choice is to calculate $$ B=A^{-1}H $$ where the pseudoinverse (say it exists and is unique) was used. Because $\mathrm{rank(A^{-1})}=n$, this gives a solution for $B$ whose rank is at most $n$. But the rank of $B$ can be as high as $p$. How do I get all the remaining (higher-rank) solutions for $B$?
Also, once I get a solution for rank $q>n$, is it the unique solution $B$ of rank $q$?
If $m<n$ and $A$ has full rank, then $A^TA$ is invertible. So there is a unique solution $$ B=(A^TA)^{-1}A^TH $$
In your case $m>n$, consider the following equation: $AXB=C$
Its general solution is $(A\otimes B^T)\overline{X}=\overline{C}$, where $\otimes$ is Kronecker Symbol, $\overline{X}$ is formed by putting rows of $X$ in a single vector, so is $\overline{C}$.
In your case, consider
$(A\otimes I)\overline{B}=\overline{H}$
Where $\overline{B}$ is formed by putting rows of $B$ in a single vector, so is $\overline{H}$.
If $\operatorname{rank}(A\otimes I,\overline{H})= \operatorname{rank}(A\otimes I)$, then there is a unique solution.