How to prove that any matrices have their own generalized inverse. Let $A$ be a matrix  with a form $(m.n)$, and $X$ be a matrix with a form of $(n,m)$.
If $AXA = A$, $X$ is called a generalized inverse of $A$.
How can we prove that any matrices have their own generalized inverse?
\begin{eqnarray} 
 \\ 
\end{eqnarray}
\begin{eqnarray} 
 \\ 
\end{eqnarray}
----What I have found-----------------------------------------
When $A$ is a row echelon form matrix $F=F(m,n;r)=\begin{pmatrix}
E_{ r } & O \\
O & O
\end{pmatrix}$, $Y=\begin{pmatrix}
E_{ r } & Y_{ 2 } \\
Y_{ 3 } & Y_{ 4 }
\end{pmatrix}$ is always $F$'s generalized inverse.
 A: One approach is to use the fact that $A$ has a rank factorization $A = CF$ (such a factorization can be attained, for instance, using row-reduction). Because $C$ has full column-rank, it has a left-inverse $C^g$. Because $F$ has full row-rank, it has a right inverse $F^g$.  If we defined $X = A^g = F^g C^g$, then we find that
$$
AXA = (CF)(F^gC^g)(CF) = C(FF^g)(C^gC)F = CF = A.
$$

Proof of the existence of the one-sided inverses:
Suppose that $F$ is $m \times n$ with rank $m$ ($m \leq n$). Because $F$ has rank $m$, $F$ has a set of $m$ linearly independent columns (say that the columns $i_1,\dots,i_m$ are linearly independent; we could see that such columns must exist because the reduced row echelon form exists).  Let $M$ denote the matrix whose columns are $e_{i_1},\dots,e_{i_m}$, where $e_i$ is the $i$th column of the identity matrix of size $n$.
The matrix $FM$ is square and invertible, since its columns are linearly independent.  The matrix $F^g = M(FM)^{-1}$ is a right-inverse of $F$, which is to say that $FF^g = I$.
For a matrix $C$ of full column-rank, we see that $C^T$ has full row-rank and therefore has right-inverse $[C^T]^g$. It follows that
$$
[[[C^T]^g]^T C]^T = 
C^T [C^T]^g = I,
$$
so that $[[C^T]^g]^T C = I$. That is, $[[C^T]^g]^T$ is a left-inverse to $C$.

Alternatively: to construct $F^g$, we could have used the fact that $FF^T$ must be invertible, from which it follows that $F^T(FF^T)^{-1}$ is a right-inverse to $F$. This coincides with the Moore-penrose pseudoinverse.
