Prove ${\rm tr}\ (AA^T)={\rm tr}\ (A^TA)$ for any Matrix $A$ Prove ${\rm tr}\ (AA^T)={\rm tr}\ (A^TA)$ for any Matrix $A$
I know that each are always well defined and I have proved that, but I am struggling to write up a solid proof to equate them. I know they're equal.
I tried to show that the main diagonal elements were the same but if I say that $A$ is $n\times m$ then 
$$(AA^T)_{ii} = (a_{11}^2+\dots +a_{1m}^2) + \dots + (a_{n1}^2+\dots +a_{nm}^2)$$
and
$$(A^TA)_{ii} = (a_{11}^2+\dots +a_{n1}^2) + \dots + (a_{1m}^2+\dots +a_{nm}^2)$$

To give you an idea of how to properly write these sort of proofs down, here's the proof.
For a matrix $X$, let $[X]_{ij}$ denote the $(i,j)$ entry of $X$. Let $A$ be $m\times n$ and $B$ be $n\times m$. Then
\begin{align*}
\mathrm{tr}\,(AB)
&= \sum_{i=1}^n[AB]_{ii} \\
&= \sum_{i=1}^n\sum_{k=1}^m[A]_{ik}\cdot[B]_{ki} \\
&= \sum_{k=1}^m\sum_{i=1}^n[B]_{ki}\cdot[A]_{ik} \\
&= \sum_{k=1}^m[BA]_{kk} \\
&= \mathrm{tr}\,(BA)
\end{align*}
Your question is a special version of this result with $B=A^\top$.
