If $A=A^2$ is then $A^T A = A$? I know that for a matrix $A$:

If $A^TA = A$ then $A=A^2$

but is it if and only if? I mean:

is this true that "If $A=A^2$ then $A^TA = A$"?


Since $$\det (A)^2 = \det (A)\det (A) = \det (A^2)= \det (A) \implies \det (A)\in\{0,1\}$$
So if $\det (A)= 1$ then exsist $A^{-1}$ so $A = I$ and the answer is yes.
If $\det(A)=0$ then examples show that answer is negative.
