<s>[INST] 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$"?

 [/INST] The answer is no.
Consider $A = \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix}$. We have
$$A^2 = \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix}\begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} = A$$
but $$A^TA = \begin{bmatrix} 1 & 0 \\ -1 & 0 \end{bmatrix}\begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix} \ne A$$
</s>