If $A=AA^{\top}$, show that $A^2=A$ I've been working trying to understand the following question:

Let n be a positive integer, let $F$ be a field, and let $A \in \mathrm{Mat}(n,F)$ satisfy the condition $A=AA^{\top}$. Show that $A^2=A$.

I haven't made much progress since my knowledge is pretty basic but I ran across this link and was wondering if this example was essentially the same?

Example
Since $A^T = (AA^T)^T = AA^T = A$, You have $A^2 = AA = AA^T = A$
$AA^T=A$

$A$ from the LHS to the RHS

$A^T=AA^{-1} \Rightarrow A^T=I\Rightarrow A=I$

$I^2=I \Rightarrow A^2=A$

Edit: It works only, if $det \ A\neq 0$