# Matrix equation with projection matrix

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

$$P - G_1G_2(\lambda P^\top(PAP^\top)^{-1}P + A^{-1} ) = 0,$$

where the other quantities are known: $$A\in\mathbb{R}^{d\times d}$$, $$G_1 \in\mathbb{R}^{r\times d}$$, $$G_{2} \in\mathbb{R}^{d\times d}$$, $$\lambda\in\mathbb{R}$$.

I have already tried everything I know. If the equation had involved scalar quantities the solution would simply be $$p = g_1g_2(a^{-1}(1+\lambda)),$$

but unfortunately in the matrix case I don't know how to proceed. Maybe there should be some way to decompose it using SVD or some trace trick?

The solution for $$P$$ to $$P - G_1G_2(\lambda P^\top(PAP^\top)^{-1}P + A^{-1} ) = 0$$ is $$P=(1 +\lambda )G_1 G_2 A^{-1},$$ as one can check by substitution into $$G_1G_2P^\top(PAP^\top)^{-1}P=G_1 G_2(G_1G_2A^{-1})^\top\bigl(G_1G_2(G_1G_2A^{-1})^\top\bigr)^{-1}G_1G_2A^{-1}=G_1G_2A^{-1}.$$