Rank of product of a matrix and its transpose [duplicate]

How do we prove that

$rank(A) = rank(AA^T) = rank(A^TA)$ ?

Is it always true?

@ Najib Idrissi, timmbob, apnorton, pizza, Davide Giraudo If the people who actively mark questions related to 3 years ago as duplicate be a little more careful will get that this is question is asked one year before the duplicate!!!

-

marked as duplicate by Najib Idrissi, Surb, apnorton, Bookend, Davide GiraudoApr 19 '15 at 16:18

You may also be interested in this answer. – EuYu Oct 16 '12 at 21:48
@ Najib Idrissi, timmbob, apnorton, pizza, Davide Giraudo If the people who actively mark questions related to 3 years ago as duplicate be a little more careful will get that this is question is asked one year before the duplicate!!! – user25004 Apr 20 '15 at 2:15
Time of asking is not important. – Bookend Apr 21 '15 at 0:08
@pizza What do you mean? So everyone should predict what question would be asked after him and not ask them as a result, not to make a duplicate in future, right? – user25004 Apr 21 '15 at 1:25
No. You did not do anything wrong. You have not been jailed. – Bookend Apr 21 '15 at 1:38

It is always true. One of the important theorems one learns in linear algebra is that $$\mathrm{Nul}(A^T)^{\perp} = \mathrm{Col}(A), \quad \mathrm{Nul}(A)^{\perp} = \mathrm{Col}(A^T).$$

Therefore $\mathrm{Nul}(A^T) \cap \mathrm{Col}(A) = \{0\}$, and so forth. Now consider the matrix $A^TA$. Then $\mathrm{Col}(A^TA) = \{A^TAx\} = \{A^Ty: y \in \mathrm{Col}(A)\}$. But since the null space of $A^T$ only intersects trivially with $\mathrm{Col}(A)$, then $\mathrm{Col}(A^TA)$ must have the same dimension as $\mathrm{Col}(A)$, which gives us the equality of ranks.

We can replace $A$ with $A^T$ to prove the other equality.

-

This is only true for real matrices. For instance $\begin{bmatrix} 1 & i \\ 0 &0 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ i &0 \end{bmatrix}$ has rank zero. For complex matrices, you'll need to take the conjugate transpose.

-

Here is a common proof.

All matrices in this note are real. Think of a vector $X$ as an $m\!\times\!1$ matrix. Let $A$ be an $m\!\times\!n$ matrix.

We will prove that $A A^T X = 0$ if and only if $A^T X = 0$.

It is clear that $A^T X = 0$ implies $AA^T X = 0$.

Assume that $AA^T X = 0$ and set $Y = A^T\!X$. Then $X^T\!A\, Y = 0$, and thus $(A^T\!X)^T Y = 0$. That is $Y^T Y = 0$. This implies $Y = A^T X = 0$.

We just proved that the $m\!\times\!m$ matrix $AA^T$ and the $n\!\times\!m$ matrix $A^T$ have the same null space. Consequently they have the same nullity. The nullity-rank theorem states that $${\rm Nul} AA^T + {\rm Rank} AA^T = m = {\rm Nul} A^T + {\rm Rank} A^T.$$

Hence ${\rm Rank} AA^T = {\rm Rank} A^T$.

-
@ Najib Idrissi, timmbob, apnorton, pizza, Davide Giraudo If the people who actively mark questions related to 3 years ago as duplicate be a little more careful will get that this is question is asked one year before the duplicate!!! – user25004 Apr 20 '15 at 2:13
@wdacda, How does $Y^TY=0$ implys $Y=0$ ? – Member Dec 20 '15 at 21:59
Note that $Y$ is real, say $Y^T = [y_1,\ldots,y_n]$. Then $Y^T Y = y_1^2 + \cdots + y_n^2$. So $0 = Y^T Y = y_1^2 + \cdots + y_n^2$ implies $y_1 = \cdots = y__n =0$. – wdacda Dec 20 '15 at 23:52

The meaning of the equality is: the rank of a matrix is equal to the number of nonzero singular values of a matrix.

-