# Proof of a matrix identity involving the Moore-Penrose pseudo-inverse.

I'm having trouble proving the following.

$A^\top B A (A^\top B A)^{\dagger} A^\top B = A^\top B$

In the above, $A$ ($n \times m$) and $B$ ($n \times n$) are any matrices (i.e. possibly rank-deficient).

Edit: OK, I see it doesn't hold for general $B$. But what about the case where $A$ is still arbitrary, but $B$ is invertible?

I have made two attempts. First, there is the well-known identity $A^\top B A (A^\top B A)^{\dagger} A^\top B A = A^\top B A$. But this doesn't imply the result because $A$ may have linearly dependent rows.

Also, it is easy to show the result for $B=I$ by taking the SVD of $A$ and cancelling terms on the left-hand side. Sadly, this doesn't seem to generalize.

I apologize in advance if the question is trivial - I am a computer scientist and don't have much experience doing this sort of thing.

-

$\def\Id{\operatorname{Id}}\def\B{\begin{pmatrix} 0 & 1 \\ 0 & 0\end{pmatrix}}\def\C{\begin{pmatrix} 0 & 1 \\ 1 & 0\end{pmatrix}}$Sure, that this is correct? Let $A = B = \B$. Then $A^\top BA = \B^\top BA = \B^\top \B^2 = 0.$ so $(A^\top BA)^\dagger = 0$. But $A^\top B = \begin{pmatrix} 0 & 0 \\ 1 & 0\end{pmatrix} \B = \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}$ So $A^\top B A(A^\top BA)^\dagger A^\top B = 0 \ne A^\top B$.

Addendum: Invertibility of $B$ isn't sufficient either. Let $A = \B$ and $B = \C$, then $A^\top BA = \B^\top \C \B = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}\begin{pmatrix}0 & 0 \\0 & 1 \end{pmatrix} = 0$ Hence again $(A^\top B A)^\dagger = 0$, but $A^\top B \ne 0$, as $A \ne 0$ and $B$ is invertible.

-
Thank you for your quick answer. What about the case when B is invertible? Does the equality hold in that case? – ziutek Sep 26 '12 at 15:30
@ziutek Added an example with invertible $B$. – martini Sep 26 '12 at 18:25
Ok, thanks a lot. – ziutek Sep 27 '12 at 11:03

I do not believe this equality to be true in general. Of course, if $A^T BA$ is invertible, then its pseudo-inverse is equal to its inverse and we have equality. This leads me to consider a counterexample where $A^T BA$ is not invertible. Let $A=e_1$, where $e_1$ is the standard unit vector with 1 in its first entry and 0 everywhere else. Let $B$ be such that its $(1,1)$ entry is zero, but its $(1,2)$ entry is nonzero. Then observe that $A^TBA=0$ and so the left hand side will become zero, while the right hand side will equal the first row of $B$, which is nonzero by hypothesis.

-
Thank you for your quick answer. What about the case when $B$ is invertible? Does the equality hold in that case? – ziutek Sep 26 '12 at 15:29
If $B$ is invertible and $A$ has full column rank, then you are good, because as i mentioned, $A^T B A$ will be invertible. – Manos Sep 26 '12 at 17:29
Ok, thanks a lot. – ziutek Sep 27 '12 at 11:05