If $A$ is an $n \times n$ matrix, and $A^{T}A = A$, then $A$ is symmetric and $A=A^2$.
Let $A = [a_{ij}]$
Suppose $A^{T}A = A$.
Then, we want to show that $[A^{T}A]_{ij} = [A^{T}A]_{ji}$ (symmetric $A=A^T$)
$[A^{T}A]_{ij}$
= $[A^{T}]_{ij}\times [A]_{ij}$
= $[A]_{ji}\times [A^{T}]_{ji}$
= $[A^{T}]_{ji}\times [A]_{ji}$ (switched order)
= $[A^{T}A]_{ji}$.
I have showed that it is symmetric.
How do I show $A = A^2$?