For given $n\times n$ real symmetric positive definite matrices $X\_{1}, X\_{2}$, let $Y := X\_{1}^{-1}X\_{2}$, and let $I$ be the identity matrix.


I would like to solve the following equation for the unknown $p>0$, in terms of functions of the matrices $X\_{1}$ and $X\_{2}$:


$$\text{trace}\left[\left(I + pY\right)^{-1} \left(I - p^{2}Y\right)\right] = 0.$$


I tried expanding the inverse in Neumann series but I am not sure how that helps to solve for $p$. This is not homework.



Solving $\text{trace}\left[\left(I + pY\right)^{-1} \left(I - p^{2}Y\right)\right] = 0$ for scalar $p$
Write $Y=SDS^{-1}$, where $D$ is diagonal (since $X\_1$ and $X\_2$ are psd, $Y$ is diagonalizable). Then, observe that


\begin{equation\*}
 f(p) = \text{tr}(S^{-1}(I+pSDS^{-1})^{-1}SS^{-1}(I-p^2SDS^{-1})S).
\end{equation\*}
This simplifies into a simpler function of $p$ involving only the diagonal values in $D$. That particular equation you can solve using Newton's method.




---


*EDIT:* as noted in my comments below, the same idea also works more generally if we use the Schur decomposition to reduce matrices to an upper triangular form; we do not need to assume diagonalizability in this case.


