# Is the rank of a matrix equal to the number of non-zero eigenvalues?

I have studied before that the rank of a matrix = number of non zero Eigen values. But recently i came across a problem and i dont think it is valid there. I know i am going wrong somewhere.

$$A= \begin{bmatrix} 0 & 4 & 0 \\ 0 & 0 & 4\\ 0 & 0 & 0 \\ \end{bmatrix} \quad$$ The Rank of this matrix is 2. So there should be 2 non zero eigen values. But I only get 0 as the eigen value(λ) using $$[A-λI]=0$$

Can anybody explain? Thanks

• – Martin R Jun 7 at 19:23
• Yes, the explanation is that in general the rank of a matrix is not the number of non-zero eigenvalues. – Angina Seng Jun 7 at 19:26
• @AnginaSeng It seems I was was misled by an article online. personal.utdallas.edu/~herve/Abdi-EVD2007-pretty.pdf (page 8). So is it true that the rank is the maximum number of non zero eigen values of a matrix? thank you – Shubham Jun 7 at 19:34

rank of a matrix = number of non zero Eigen values

is not true, as you have witnessed.

Consider that $$A^3=0$$, so if $$A$$ has an eigenvalue $$\lambda$$ and $$v\neq0$$ is a corresponding eigenvector, then $$0=A^3v=\lambda^3v$$ meaning $$\lambda^3=0$$, so $$\lambda$$ must be $$0$$.

The rank is, however, equal to the dimension of the image. Which is to say, the size of the largest possible set of linearly independent vectors of the form $$Av$$.

It is also the case that nilpotency (or more specifically the fact that the image may contain elements of the kernel) is in some sense the only thing that can go wrong with your statement.

• actually i got this theory from this article which seems to be misleading: personal.utdallas.edu/~herve/Abdi-EVD2007-pretty.pdf Please refer page 8. So is it true the rank is the maximum number of non zero eigen values of a matrix? thank you – Shubham Jun 7 at 19:31
• @Subham You have yourself found a matrix where the rank and the number of non-zero eigenvalues are different. You don't need to ask me whether it's true. It's not. – Arthur Jun 7 at 19:35
• Note that you can connect the rank of the matrix to the number of Jordan blocks corresponding to the eigenvalue $0$, i.e. the geometric multiplicity of ev $0$. Notice that OPs matrix has eigenvalue $0$ with algebraic multiplicity $3$ but geometric multiplicity $1$. – WorldSEnder Jun 8 at 3:55

Unfortunately, the answer is no in general, though the claim will hold true for diagonalizable matrices. Not all matrices are diagonalizable, including the matrix that you gave in your example. If your matrix is $$n \times n$$, then diagonalizability is equivalent to having a set of $$n$$ linearly independent eigenvectors, and those eigenvectors corresponding to non-zero eigenvalues will form a basis for the range of the matrix; hence rank is obtained (including multiplicities).

However, if you look at $$A^T A$$, then you can use the eigenvalues of that matrix to obtain the rank, regardless of what $$A$$ is. This is because $$A^T A$$ is symmetric, and thus must be diagonalizable, and furthermore one can show that $$\mathrm{rank}(A^T A) = \mathrm{rank}(A)$$.

• “Most matrices are not diagonalizable” is a probably not true, under any reasonable definition of “most.” For example, “most” matrices have a characteristic polynomial with no repeated roots, and thus are diagonalizable, under any definition of “most” that I have heard. – Thomas Andrews Jun 7 at 19:33
• You don't really need diagonalizability either. You just need the algebraic and geometric multiplicity of the eigenvalue $0$ to agree, not all of them. – Arthur Jun 7 at 19:37
• @ThomasAndrews According to Devadas et al. (The proportion of diagonalizable matrices over a finite field), when $n\ge3$, most $n\times n$ matrices are indeed non-diagonalisable over $GF(q)$ when $q$ is large. The proportion of the diagonalisable ones approaches $1/n!$ as $q\to\infty$. The story about diagonalisability over an algebraic closure may be different, however. – user1551 Jun 7 at 20:08
• @ThomasAndrews Indeed, I was not precise here. – Christopher A. Wong Jun 7 at 20:24
• @Arthur We would need algebraic and geometric multiplicities of non-zero eigenvalues to be equal, since any Jordan for a non-zero eigenvalue is full-rank, but only has a one-dimensional eigenspace. – Christopher A. Wong Jun 7 at 20:26