Solution to matrix equation $A = X B X^\top$ with positive definite matrices

93 Views Asked by At

Suppose $A$ is a positive definite $m \times m$ matrix, and $B$ is a positive definite $n \times n$ matrix; note that $m$ and $n$ are not necessarily equal. Is there a closed-form solution to the equation $A = X B X^\top$? If there are multiple solutions, then I'm fine with any closed-form solution. If there is no closed-form solution, then is there a standard way of numerically solving such an equation, besides just minimizing $\min ||A-X B X^\top||^2$ with (say) gradient descent?

If $m = n$, this problem has closed-form solution $X =A^{-1/2} (A^{1/2} B A^{1/2} )^{1/2}A^{-1/2}$, but I don't know how to generalize to when $m \ne n$.

2

There are 2 best solutions below

0
On BEST ANSWER

In order for your problem to be solvable you need of course $n\geq m$, otherwise the rank of the two sides cannot match, so I first take that as an assumption. Since $A$ and $B$ are positive definite, we can express them through their eigenvalue decompositions as \begin{equation} A = U_A \Lambda_A U_A^\mathrm{T}, \end{equation} \begin{equation} B = U_B \Lambda_B U_B^\mathrm{T}, \end{equation} where $U_A$ and $U_B$ are orthogonal matrices (i.e., $U_A\cdot U_A^\mathrm{T}=I_m$, and the same goes for $B$ after adapting dimensions), while $\Lambda_A$ and $\Lambda_B$ are diagonal matrices with the positive eigenvalues in the diagonal. We can then construct the solution simply by \begin{equation} X = U_A \begin{bmatrix}\Lambda_A^{1/2} & 0_{m\times (n-m)}\end{bmatrix} \Lambda_B^{-1/2} U_B^T. \end{equation} The intuition is that $X$ and $X^\mathrm{T}$ are first diagonalizing $B$, then compensating its eigevalues to $1$, and then fixing $A$. Of course the lower $(n-m)$ rows of $\Lambda_B^{-1/2} U_B^T$ don't affect your solution, so you can take this into account if you want to be more efficient there.

0
On

An $\ m\times n\ $ matrix $\ X\ $ satisfies the equation $$ A=XBX^T\tag{1}\label{e1} $$ if and only if $$ X=\sqrt{A}\,U\sqrt{B}^{-1}\tag{2}\label{e2}\ , $$ where $\ \sqrt{A}, \sqrt{B}\ $ are symmetric square roots of $\ A\ $ and $\ B\ ,$ respectively, and $\ U\ $ is an $\ m\times n\ $ matrix with orthonormal rows. As Juan notes in his answer this is possible if and only if $\ m\ge n\ $

Suppose $\ X\ $ satisfies equation (\ref{e2}). Then \begin{align} XBX^T&=X\sqrt{B}^2X^T\\ &=\big(\sqrt{A}\,U\sqrt{B}^{-1}\big)\sqrt{B}^2\big(\sqrt{A}\,U\sqrt{B}^{-1}\big)^T\\ &=\sqrt{A}\,U\sqrt{B}^{-1}\sqrt{B}^2\sqrt{B}^{-1}U^T\sqrt{A}\\ &=A \end{align} by the symmetry of $\ \sqrt{A}\ $ and $\ \sqrt{B}\ $ and the orthonormality of the rows of $\ U\ .$

Now suppose $\ X\ $ is a solution of equation (\ref{e1}) and let $\ \sqrt{A}, \sqrt{B}\ $ be any symmetric square roots of $\ A\ $ and $\ B\ ,$ respectively. Then,multiplying the equation \begin{align} A&=XBX^T\\ &=X\sqrt{B}^2X^T\\ &=\big(X\sqrt{B}\big)\big(X\sqrt{B}\big)^T \end{align} on the left and right by $\ \sqrt{A}^{-1}\ $ gives \begin{align} I_{m\times m}&=\sqrt{A}^{-1}\big(X\sqrt{B}\big)\big(X\sqrt{B}\big)^T\sqrt{A}^{-1}\\ &=\big(\sqrt{A}^{-1}X\sqrt{B}\big)\big(\sqrt{A}^{-1}X\sqrt{B}\big)^T\\ &=UU^T\ . \tag{3}\label{e3} \end{align} where $\ U\stackrel{\text{def}}{=}\sqrt{A}^{-1}X\sqrt{B}\ .$ It follows from equation (\ref{e3}) that the rows of $\ U\ $ are orthonormal, and from the definition of $\ U\ $ that $$ X=\sqrt{A}\,U\sqrt{B}^{-1}\ . $$ Therefore $\ X\ $ has the form given by equation (\ref{e2}).