# solution for an equation

I have two diagonal matrices over the reals, both contain positive values on the diagonal (and 0 everywhere else), $A$ and $B$. $A$ is of size $n \times n$ and $B$ is of size $m \times m$. We assume that $n > m$.

I would like to solve the equation for $X$:

$X A X^{\top} = B$

where $X$ is an $m \times n$ matrix.

Clearly, one solution would be to set $X = B^{1/2} C$ where $C$ of size $m \times n$ with $C_{ii} =$A_{ii}^{-1/2} and 0 everywhere else.

My question - is the solution for $X$ unique (and it is the one I described)? If not, to what extent is it unique?

EDIT: I just realized that the $A$ matrix is a red-herring. One could define $C$ as above, and then substitute $Y = X C$ (which is an invertible linear transformation) to get the equation:

$Y Y^{\top} = B$.

So the question is, if $n > m$, is the solution for $Y \in \mathbb{R}^{m \times n}$ unique for the above equation when $B$ is diagonal, with positive values over the diagonal? (up to the sign of $Y$, because if $Y$ is a solution, then so is $-Y$.)

-
+1 For the edit. – Alex Becker May 9 '12 at 22:24
Thanks Alex. Maybe I was too quick to send this question - I think the answer is "no". One could have Y be just scaled orthonormal vectors. – kloop May 9 '12 at 22:28

The answer is definitely "no". Given any solution $Y$ and an orthogonal $n\times n$ matrix $U$, then $YU$ is also a solution.