Are the eigenvalues of $A^\top A$ equal to those of $AA^\top$? In an exam question I was asked to calculate the eigenvalues of $A^\top A$, where $A = (a_1\ a_2\ a_3); a_1=(0\ 2\ 1)^\top; a_2=(1\ -1\ 1)^\top; a_3=(1\ 1\ -1)^\top;$ and $A^\top$ stands for the transpose of $A$.
By mistake I calculated $AA^\top$ instead of $A^\top A$, and I got a diagonal matrix whose diagonal entries are 2, 3, 6, which are equal to the eigenvalues of $A^\top A$.
My question is whether this is a coincidence; that is, whether the eigenvalues of $A^\top A$ are equal to those of $AA^\top$.
 A: Eigen Values are same, Here is the Simple  Proof. 
Let $$B=A^T A$$ and $$ C=AA^T$$ Let the Eigen value of B be $\lambda$ and Corresponding Eigen Vector be $X$, Then $$ BX=\lambda X \implies A^TAX=\lambda X$$ Pre Multiplying with $A$ we get
$$ AA^TAX=\lambda AX \implies CY=\lambda Y$$ So $\lambda$ is an Eigen Value of $C$ and note that $Y=AX$ is an Eigen Vector of $C$.
A: In general, note that if $A \in \mathbb{C}^{m \times n}$, then $A^TA \in \mathbb{C}^{n \times n}$, has $n$ eigenvalues, and $AA^T \in \mathbb{C}^{m \times m}$ has $m$ eigenvalues. However, the non-zero eigenvalues of both the matrices are same and positive. This can be seen by using the singular value decomposition of $A$. If $A$ is of rank $r$, i.e., only $r$ non-zero eigenvalues, we then have $$A = U_{m \times r} \Sigma_{r \times r} V^T_{r \times n}$$
This gives us
$$A^TA = V_{n \times r} \Sigma^2_{r \times r} V^T_{r \times n}$$
while
$$AA^T = U_{m \times r} \Sigma^2_{r \times r} U^T_{r \times m}$$
The above gives the corresponding eigenvalue decomposition of $A^TA$ and $AA^T$.
A: It is no coincidence. For any two square matrices $A$ and $B$, $AB$ is similar to $BA$. Similar matrices always have the same eigenvalues (but different eigenvectors).
