If $A \in M_{n \times m}(\mathbb{R})$, why is $\operatorname{rk}(A) = \operatorname{rk}(AA^t)$? I was reading a textbook and saw the following:

Let $A \in M_{n \times m}(\mathbb{R})$ and $A^t$ the transposed matrix of $A$. It can be proven that $\operatorname{rk}(A) = \operatorname{rk}(AA^t)$.   

There is no further information here and I was wondering how to prove this. And also, does this only work for $\mathbb{R}$ or does it work for other fields, e.g. $\mathbb{C}$?
 A: This is usually proven as follows:
Consider the bilinear form defined by $\langle x,y \rangle = Ax \cdot Ay =x^T A^T A y $.  Because the dot product is positive definite, $\langle x,x \rangle =0$ only when $Ax=0$.  However, if $x\in \ker A^TA$, then $x^T (A^TAx)=x\cdot 0 = 0$, Therefore, $\ker A^TA\subset \ker A$.  However, in general, $\ker A \subset \ker BA$, and so $\ker A^TA=\ker A$, hence $A$ and $A^T A$ have the same rank.
Replacing $A$ with $A^T$ gives us that $AA^T$ has the same rank as $A^T$, but $A^T$ has the same rank as $A$.  
A: Note that
$$
\mathrm{Rank}(A)=\dim \{Ax:x\in\mathbb R^m \}
$$
and
$$
\mathrm{Rank}(A^tA)=\dim \{A^tAx:x\in\mathbb R^m \}\le \{Ax:x\in\mathbb R^m \}.
$$
Assume that $u_1,\ldots,u_k$ is a basis of $\{Ax:x\in\mathbb R^m \}$ and $\,u_1=Ax_1,\ldots, u_k=Ax_k,\,$ for some $x_1,\ldots, x_k\in \mathbb R^m$. It suffices to show that $A^tu_1,\ldots,A^tu_k$ are linearly independent. Assume that
$$
0=c_1A^tu_1+\cdots+c_kA^tu_k=c_1A^tAx_1+\cdots+c_kA^tAx_k,
$$
then
$$
0=\langle c_1A^tAx_1+\cdots+c_kA^tAx_k, c_1x_1+\cdots+c_kx_k\rangle\\=
\langle c_1Ax_1+\cdots+c_kAx_k, c_1Ax_1+\cdots+c_kAx_k\rangle,
$$
which implies that
$$
0=c_1Ax_1+\cdots+c_kAx_k=c_1u_1+\cdots+c_ku_k,
$$
and since $u_1,\ldots,u_k$ are linearly independent, then $c_1=\cdots=c_k=0$.
