I need to solve the following equation for the matrix $P \in\mathbb{R}^{r\times d}:$


$$
((PAP^\top)^{-1} P S P^\top (PAP^\top)^{-1})^2 = I\_r,
$$
where $S$ is a symmetric $d\times d$ matrix, $A$ is a PSD $d\times d$ matrix, and $I\_r$ is the identity matrix of dimension $r$.


Is there any easy way to solve this equation?



Product of matrices equal identity
$\DeclareMathOperator\diag{diag}\DeclareMathOperator\rank{rank}$Here is how we can construct solutions in $P$.


Necessarily, $r\leq d$, $\rank(P)=r$, $\rank(S)=r\_1\geq r$.


There is $Q$ invertible s.t. $QAQ^T=I\_d$, $QSQ^T=\diag((\lambda\_i)\_{i\leq p\_1},(-\mu\_j)\_{j\leq q\_1},0\_{s})$, where $\lambda\_i,\mu\_j>0$ and $p\_1+q\_1=r\_1$, $p\_1+q\_1+s=d$.


Let $p$, $q$ be s.t. $p\leq p\_1$, $q\leq q\_1$, $p+q=r$. Even if it means changing the ordering of the diagonal of $QSQ^T$, we may assume that the first $p$ elements of this diagonal are $>0$ and the following $q$ are $<0$.


Let $D\in M\_{r,d}$ be the "diagonal" matrix $\diag((d\_i)\_{i\leq r})$.


Then $U=DQAQ^TD^T=\diag((d\_i)^2)$, $V=DQSQ^TD^T=\diag((\lambda\_i d\_i^2),(-\mu\_j d\_j^2))$.


Finally $U^{-1}VU^{-1}=\diag\left(\left(\dfrac{\lambda\_i}{d\_i^2}\right)\_{i\leq p},\left(\dfrac{-\mu\_j}{d\_j^2}\right)\_{j\leq q}\right)$ and we choose $d\_i=\sqrt{\lambda\_i},d\_j=\sqrt{\vphantom\lambda\mu\_j}$.


For $P=DQ$, the considered expression is $\diag(I\_p,-I\_q)$ and we are done.


