TITLE: Gram Matrices Rank
QUESTION [8 upvotes]: Let $A$ be an $m \times n$ matrix. Show that, even though they may be of different sizes, both Gram matrices $K = A^TA$ and $L = AA^T$ have the same rank.

My attempt:
We have that $K$ and $L$ are Gram matrices so $K = A^TA = (A^TA)^T = AA^T = L$ and by definition we have that $\mathrm{rank}(A) = A^T$.

REPLY [2 votes]: Excellent answers from @Euyu !!. I would like to add another way of proof. Assume $A=U\Sigma V^{T}$ is the Singular Value Decomposition (SVD). So $A^{T}A=V\Sigma ^{2}V^{T}$ and $AA^{T}=U\Sigma ^{2}U^{T}$ (follows from substituting the SVD). So clearly, the eigen values of the symmetric matrices $AA^{T}$ and $A^{T}A$ are the squares of singular values of $A$. Hence they have same number of non-zero eigen values and hence their rank should be the same.