# A Matrix equation

Let $A$ and $B$ be two $n \times n$ full-rank matrices.

Let $XAY = B$ be the given equation where $X$ and $Y$ are unknown $n \times n$ matrices. We know that $Vec(B) = (Y^{T} \otimes X)Vec(A)$. Under what conditions can we determine $X$ and $Y$ and what would be the procedure to determine $X$ and $Y$?

Not looking for the obvious solutions such as $Y^{-1}=A$ and $X=B$, $A$ is the eigenvalue (or some multiple of eigenvalue) diagonal matrix of $B$ where $X$ and $Y$ diagonalizes $B$ and $A$ and $B$ are similar to $X$ and $Y$. In general are there any other possible choices that $Y^{T} \otimes X$ can take? These may be the only choices for general $A$ and $B$. However, given $A$ and $B$ are some other structured matrices, has such an equation been studied before?

-
$X=I$ and $Y=A^{-1}B$? or am I missing something? – Suvrit Aug 31 '11 at 0:18

Since $A$ and $B$ are invertible, replace $X$ by $X' = XA$ and replace $Y$ by $Y' = YB^{-1}$. Then your equation reduces to solving $X'Y' = I$, i.e. the space of solutions is parametrized by $GL(n)$.