TITLE: Prove that $\text{rank}(X^TX)=\text{rank}(X)$
QUESTION [6 upvotes]: Prove, for real $X$, that $\text{rank}(X^TX)=\text{rank}(X)$.
Could anyone please help me with this problem? I've tried to use full-rank factorization and rank-related theorems mentioned in my book but still failed to solve this. I am learning linear algebra by myself and my book has no solutions manual so I find it really hard to get used to solve linear algebra problems.  
Many thanks in advance for your help!

REPLY [5 votes]: If $X^TXu=O$  then  $u^TX^TXu = u^TO=O$.
Write $Xu=v$, & notice  $u^TX^T=v^T$.
So, $u^TX^TXu = v^Tv=O$, which implies  $v=Xu=O$.
Thus, $null(X^TX)\subset null(X)$.
Proving the reverse inclusion is trivial.
So,  $null(X^TX) = null(X)$.