92

I am quite confused about this. I know that zero eigenvalue means that null space has non zero dimension. And that the rank of matrix is not the whole space. But is the number of distinct eigenvalues ( thus independent eigenvectos ) is the rank of matrix?

Shifu
  • 1,063

2 Answers2

98

Well, if $A$ is an $n \times n$ matrix, the rank of $A$ plus the nullity of $A$ is equal to $n$; that's the rank-nullity theorem. The nullity is the dimension of the kernel of the matrix, which is all vectors $v$ of the form: $$Av = 0 = 0v.$$ The kernel of $A$ is precisely the eigenspace corresponding to eigenvalue $0$. So, to sum up, the rank is $n$ minus the dimension of the eigenspace corresponding to $0$. If $0$ is not an eigenvalue, then the kernel is trivial, and so the matrix has full rank $n$. The rank depends on no other eigenvalues.

Theo Bendit
  • 50,900
  • 2
    Thanks for the answer. If I know that a matrix has 1 eigenvalue which is zero, does it mean that dimension of kernal is 1? And rank of matrix is (rank of whole space - 1)? – Shifu Jul 05 '15 at 06:20
  • 2
    Well, consider the $0$ matrix. It has one eigenvalue: $0$, and the dimension of its eigenspace is $n$, since it sends everything to $0$. If you have $n$ distinct eigenvalues, one of them zero, then the eigenspace for $0$ must have dimension $1$, hence the rank is $n - 1$. – Theo Bendit Jul 05 '15 at 06:26
  • 3
    This is what I have understood. Please correct me if i am wrong. 1) If a matrix has 1 eigenvalue as zero, the dimension of its kernel may be 1 or more (depends upon the number of other eigenvalues). 2) If it has n distinct eigenvalues its rank is atleast n. 3) The number of independent eigenvectors is equal to the rank of matrix. – Shifu Jul 05 '15 at 06:33
  • 10
  • is not right. If it has $n$ non-zero eigenvalues, then the nullity is $0$ and the rank is $n$. If one of the $n$ is $0$, then it has rank $n-1$ as I said. 1) is almost right. Yes, if $1$ of the eigenvalues is $0$, then the kernel has dimension at least $1$, maybe more. However, it doesn't just depend on the number of other eigenvalues. It is possible to have only $0$ as an eigenvalue, but still only have a nullity of $1$. 3) is again, not quite right. The rank is equal to the number of independent generalised eigenvectors. Look up Jordan Bases.
  • – Theo Bendit Jul 05 '15 at 07:29
  • What about a nxm matrix? How is its rank related to its eigenvalues and eigenvectors? – Learn_and_Share May 19 '17 at 08:15
  • 4
    Eigenvectors/values are only applicable to square matrices. But $A^T A$ and $AA^T$ are square matrices with equal rank to $A$. – Theo Bendit May 20 '17 at 14:50
  • @TheoBendit It was a very good answer, thanks. There is a matrix such that all of its eigenvalues are zero, Then why its rank equals to zero? – M a m a D Dec 23 '17 at 06:15
  • 1
    @Drupalist: The only zero rank matrix is the zero matrix, but the zero matrix is not the only matrix with all $0$ eigenvalues. For example, $$\begin{pmatrix} 0 & 1 \ 0 & 0 \end{pmatrix}$$ is rank $1$, but has only $0$ as its eigenvalues. – Theo Bendit Dec 26 '17 at 23:48
  • If we have a $3\times 3$ matrix $T$ whose eigenvalues are $1,2,3$, obviously this means that $T$ is diagonalisable and invertible but can you say about the whether the kernel and range of $T$ has a basis of eigenvectors??? – squenshl Aug 25 '19 at 01:46
  • @squenshl In the case mentioned, as the matrix is invertible, its kernel is trivial, and the range is all of $\Bbb{R}^3$ (or $\Bbb{C}^3$). All the eigenvectors lie in the range of $T$, so any basis of eigenvectors for $\Bbb{R}^3$ is also a basis of eigenvectors for $\operatorname{Range} T$. On the other hand, the kernel is trivial, and the only basis it has is the empty basis. I suppose that is vacuously a basis of eigenvectors! Even when the matrix is not invertible, the kernel is itself an eigenspace corresponding to $0$, so any basis for the kernel is one of eigenvectors (with $\lambda=0$). – Theo Bendit Aug 25 '19 at 08:00
  • Great thank you!!! – squenshl Aug 25 '19 at 22:15
  • @TheoBendit For instance, suppose that $A=(a)$ with $a \in \mathbb{R}, a\neq 0$, then the dimension of the kernel of $A$ is $1$? – Guilherme Sep 08 '20 at 16:34
  • @GuilhermedeLoreno In that case, the dimension of the kernel (i.e. the nullity) is going to be $0$. You can verify this in a number of ways: solve $A(x) = (0) \implies (ax) = (0) \implies ax = 0 \implies x = 0$, verify that $AB = BA = I = (1)$, where $B = (1/a)$ (i.e. show $A$ has an inverse), show that every non-zero $1 \times 1$ column vector is an eigenvector for eigenvalue $a \neq 0$, etc, etc. – Theo Bendit Sep 10 '20 at 10:20
  • if my matrix is of size $[n, n]$, and rank $r$, wouldn't there be $r$ eigenvalues and we can get $r$ independent eigenvectors? – Charlie Parker Oct 19 '21 at 21:25
  • 1
    @CharlieParker Not necessarily. If you're just counting eigenvectors corresponding to the non-zero eigenvalues, then this will be true if and only if the matrix is diagonalisable. For example,$$\begin{pmatrix}0&0&0&0\0&1&1&0\0&0&1&1\0&0&0&1\end{pmatrix}$$is a $4 \times 4$ matrix with rank $3$, but admits only $2$ linearly independent eigenvectors, and only $1$ if you only count eigenvectors corresponding to non-zero eigenvalues. – Theo Bendit Oct 19 '21 at 21:48
  • @TheoBendit usually I deal with the (empirical) covariance matrix $X^T X$ - which is symmetric. I think that is usually diagonalizable. Your comment was interesting. What is the intuition behind it? – Charlie Parker Oct 20 '21 at 16:18
  • 2
    @CharlieParker Experience, more than intuition. Indeed $X^\top X$ is symmetric, which means it is always diagonalisable. In that case, being rank $r$ does indeed correspond to there being $r$ linearly independent eigenvectors corresponding to non-zero eigenvalues (and $n - r$ eigenvectors corresponding to $0$). The intuition comes from experience with Jordan Normal Forms, which are the closest one can get to diagonal matrices (especially when the matrix is not diagonalisable). The above matrix has two "Jordan blocks", which tells me it has two L.I. eigenvectors. – Theo Bendit Oct 20 '21 at 20:30