# A possible characterization of all generalized inverses of a matrix

If $$G$$ is a generalized inverse of a matrix $$A$$ (i.e. $$AGA=A$$), then is it true that every generalized inverse of $$A$$ can be written in the form $$G+B-GABAG$$ for some matrix $$B$$ of same order as $$G$$?

I could show that this matrix is a generalized inverse for every matrix $$B$$, since \begin{align} A(G+B-GABAG)A&=AGA+ABA-AGABAGA\\ &=A+ABA-ABA\\ &=A \end{align} But I couldn't conclude that every generalized inverse of $$A$$ can be written in this form. Any ideas on that?

Let $$f(X)=AXA,\,g(X)=GAXAG$$ and $$\pi=\operatorname{id}-g$$. One can verify that $$g$$ and in turn $$\pi$$ are idempotent. Also, $$f\pi=0$$. Therefore $$\operatorname{range}(\pi)\subseteq\ker(f)\subseteq\ker(g).$$ However, as $$\pi$$ is $$g$$ are complementary projections to each other, we have $$\operatorname{range}(\pi)=\ker(g)$$. Thus $$\operatorname{range}(\pi)=\ker(f)=\ker(g)$$ by the sandwich principle.
Now, for any generalised inverse $$X$$ of $$A$$, we have $$X-G\in\ker(f)=\operatorname{range}(\pi)$$. Hence $$X=G+\pi(B)$$ for some matrix $$B$$.
• I didn't quite follow the idea of complementary projections. I understand this for the case of linear functions, i.e. $h(X)=PX$ for some vector matrix $P$. Then $rank(P)+rank(I-P) = tr(P)+tr(I-P)=tr(I)=n$. Hence by rank nullity theorem $rank(P)=nullity(I-P)$ and vice versa. I don't see how are you generalizing this thing. Commented Sep 21, 2021 at 14:35
• @Martund Complementary projections are just two projections that sum to the identity operator. In the present context it just means $\pi+g=\operatorname{id}$. Commented Sep 21, 2021 at 16:08
• @Martund I was talking about the rank of a linear map. Anyway, in hindsight, the dimension argument is unnecessary. Since $\pi$ and $g$ are complementary projections, $\operatorname{range}(\pi)=\ker(g)$ follows. Commented Sep 21, 2021 at 19:22