Prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$ How can I prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$?


This is an exercise in my textbook associated with orthogonal projections and Gram-Schmidt process, but I am unsure how they are relevant.
Let $\mathbf{x} \in N(A)$ where $N(A)$ is the null space of $A$. 

So, $$\begin{align} A\mathbf{x} &amp;=\mathbf{0} \\\implies A^TA\mathbf{x} &amp;=\mathbf{0}  \\\implies \mathbf{x} &amp;\in N(A^TA) \end{align}$$ Hence $N(A) \subseteq N(A^TA)$.

Again let $\mathbf{x} \in N(A^TA)$

So, $$\begin{align} A^TA\mathbf{x} &amp;=\mathbf{0} \\\implies \mathbf{x}^TA^TA\mathbf{x} &amp;=\mathbf{0} \\\implies (A\mathbf{x})^T(A\mathbf{x})&amp;=\mathbf{0} \\\implies A\mathbf{x}&amp;=\mathbf{0}\\\implies \mathbf{x} &amp;\in N(A) \end{align}$$ Hence $N(A^TA) \subseteq N(A)$.

Therefore $$\begin{align} N(A^TA) &amp;= N(A)\\ \implies \dim(N(A^TA)) &amp;= \dim(N(A))\\ \implies \text{rank}(A^TA) &amp;= \text{rank}(A)\end{align}$$
Since elementary operations do not change the rank of a matrix we have $\text{rank}(A^TA) = \text{rank}(E^TA^TAE)$, where $E$ is a multiplication of several elementary operations which make $AE = [A_1, A_2]$, where $A_1$ is a column full rank matrix with $\text{rank}(A_1) = \text{rank}(A)$.

Thus we can find a matrix $P$ such that $A_1P= A_2$ and $AE = [A_1, A_1P] = A_1[I, P]$.

Thus $\text{rank}(E^TA^TAE) = \text{rank}(A_1[I, P])^T(A_1[I, P])$. In this equation,  the matrices are all of full rank and the rank equals $\text{rank}(A)$, so on a real space $\text{rank}(A^TA) = \text{rank}(A)$, completing the proof.