While trying to generalize a certain formula from the scalar case to the matrix case, I came across the following curious observation:
Let $M$ be a real, not necessarily square matrix, then $$\left(I - M M^T \right)^{-1} M = M\left(I - M^T M \right)^{-1}$$ which seems to be true in general. It holds, for example, for this randomly chosen case $$M=\left( \begin{array}{ccc} -1 & 7 & -4 \\ -1 & 5 & 7 \\ -4 & 7 & 4 \\ -2 & -5 & 0 \\ 2 & -1 & -6 \\ \end{array} \right)$$
Although numerical examples convinced me that this is true, I do not understand why. Any hints?
More in detail we have that if $M$ is a n-by-m matrix
$X=I - MM^T$ is a n-by-n matrix
$Y=I - M^T M$ is a m-by-m matrix
and therefore
$$X_{n\times n}^{-1}M_{n\times m}=M_{n\times m}Y_{m\times m}^{-1}$$
$$X_{n\times n}X_{n\times n}^{-1}M_{n\times m}Y_{m\times m}=X_{n\times n}M_{n\times m}Y_{m\times m}^{-1}Y_{m\times m}$$
$$I_{n\times n}M_{n\times m}Y_{m\times m}=X_{n\times n}M_{n\times m}I_{m\times m}$$
$$M_{n\times m}Y_{m\times m}=X_{n\times n}M_{n\times m}$$
that is
$$M \left(I - M^T M \right) = \left(I - M M^T \right) M$$