In this paper we solve the first Penrose’s equation $AXA = A$ for square real matrices A using the rational canonical form of matrices. The idea is to find ${1}$-inverse $X$ of $A$ using similarity $X = TZT^{−1}$, where $Z$ is ${1}$-inverse of $B$ and $A = TBT^{−1}$ is the rational canonical representation of $A$.