Solving exactly non-square matrix inversion for linear mapping of the form $XA = B$

106 Views Asked by At

A real $m \times m$ invertible matrix $X$ is used to map infinitely many real $m \times n$ matrices to other real $m \times n$ matrices through the equation $XM_1 = M_2$ where $X$ is known by the person performing the mappings.

I look at just two of the mappings that the other person performed, $XA = Y$ and $XB = Z$ and I am given by that other person $A$, $Y$, and $Z$. That leaves the matrices $X$ and $B$ still unknown to me.

Is there a method to solve for $X$ from the first equation to then find $B$ from the second equation that isn't just brute force guessing?

The solution above must be able to recover all $M_1$ matrices if the other person periodically gives me the corresponding $M_2$ matrices and therefore cannot just be a best fit estimation from the mapping equation sets I've been given so far. For instance, taking the right pseudoinverse of A and applying it to $Y$ in the mapping equation $X = Y(A_\text{right})^{-1}$ provides the minimum norm solution for $X$ which can be applied in $XA$ and produce $Y$. However if that calculated $X$ is applied in $XB$ it will not produce $Z$. This is not the exact solution for $X$.