46
$\begingroup$

How could we prove that the "The trace of an idempotent matrix equals the rank of the matrix"?

This is another property that is used in my module without any proof, could anybody tell me how to prove this one?

$\endgroup$
1

5 Answers 5

66
+500
$\begingroup$

Sorry to post solution to this such a old question, but "The trace of an idempotent matrix equals the rank of the matrix" is very basic problem and every answer here is using the solution using eigen values. But there is another way which should be highlighted.

Solution:

Let $A_{n\times n}$ is a idempotent matrix. Using Rank factorization, we can write $A=B_{n\times r}C_{r\times n}$ where $B$ is of full column rank and $C$ is of full row rank, then $B$ has left inverse and $C$ has right inverse.

Now, since $A^2=A$, we have $BCBC=BC$. Note that, $$BCBC=BC\Rightarrow CBC=C\Rightarrow CB=I_{r\times r}$$

Therefore $$\text{trace}(A)=\text{trace}(BC)=\text{trace}(CB)=\text{trace}(I_{r\times r})=r=\text{rank}(A)\space\space\space\blacksquare$$

$\endgroup$
6
  • 1
    $\begingroup$ +1 Thanks for posting this, it is a very pretty argument. $\endgroup$
    – Erick Wong
    Commented Jul 4, 2017 at 7:10
  • $\begingroup$ @MANMAID Please explain a little more why $CBC=C\Rightarrow CB=I_{r\times r}$ ? $C$ is not invertible.. $\endgroup$
    – Widawensen
    Commented Jul 4, 2017 at 9:17
  • 3
    $\begingroup$ @Widawensen $C$ is not invertable, but $C$ has right inverse. $\endgroup$
    – MAN-MADE
    Commented Jul 4, 2017 at 9:35
  • $\begingroup$ @MANMAID And I suppose $B$ has left inverse...Is it some kind of theorem which says us about this right (left) inverse ? I would be grateful for extending my knowledge.. $\endgroup$
    – Widawensen
    Commented Jul 4, 2017 at 9:40
  • 1
    $\begingroup$ @Widawensen In the book D.A. HARVILLE-Matrix Algebra from a Statistician's Perspective, chapter 8, you can find it elaborately. This chapter is only about inverses actually. $\endgroup$
    – MAN-MADE
    Commented Jul 4, 2017 at 9:53
35
$\begingroup$

An idempotent has two possible eigenvalues, zero and one, and the multiplicity of one as an eigenvalue is precisely the rank. Therefore the trace, being the sum of the eigenvalues, is the rank (assuming your field contains $\mathbb Q$...)

$\endgroup$
4
  • 10
    $\begingroup$ Just in case it isn't clear, the reason the eigenvalues are $0$ and $1$ is because all the eigenvalues are roots of the minimal polynomial, which is $x^2-x$. Because the minimal polynomial has no repeated roots, it is diagonalizable, and thus has a basis of eigenvectors. Writing the vector space as $V_0\oplus V_1$, the transformation is projection onto $V_1$, and so the rank is the dimension of $V_1$. $\endgroup$
    – Aaron
    Commented Jan 23, 2012 at 3:49
  • 18
    $\begingroup$ Just for the record, you don't need minimal polynomials or eigenvectors. Let $A: V \to V$ be idempotent, let $V_0 = \mathrm{Ker}(A)$ and $V_1 = \mathrm{Im}(A)$. If $u \in V_0 \cap V_1$ then $u = Au = 0$, so $V_0 \cap V_1 = \{ 0 \}$. For any $v$, we have $v = Av + (v-Av)$, and $Av \in V_1$, $v-Av \in V_0$, so $V = V_0 + V_1$. So we have $V =V_0 \oplus V_1$. (Probably not the right route for most students, but I happen to be teaching a class at the moment where I want this fact and we haven't hit Jordan canonical form yet.) $\endgroup$ Commented Sep 12, 2014 at 13:03
  • $\begingroup$ @DavidESpeyer I think that maybe it could be useful to repost (an expanded version of) your comment as an answer. $\endgroup$ Commented Mar 10, 2022 at 12:40
  • $\begingroup$ @MartinSleziak I have hit the same need and written this down as an answer to a near-duplicate question, Relation between trace and rank for projection matrices. $\endgroup$ Commented Oct 13, 2022 at 9:48
19
+50
$\begingroup$

I came to this page by accident but just wanted to note that the statement above that

"the multiplicity of one as an eigenvalue is precisely the rank"

is non-trivial and is not true for general matrices. You still need to prove that algebraic multiplicity equals geometric multiplicity (in other words, that the number of linearly independent eigenvectors equals the multiplicity of one)

The fact that "since y = Px = P(Px) therefore members of an orthogonal basis of the range of P are also eigenvectors of P " is the missing piece. Because of this we can comfortably say that the rank is at least equal to the multiplicity. After that we need to state that none of the eigenvectors whose eigenvalue is zero could contribute to the range (though that one might omit because it's trivial.) @DavidSpeyer said similar things in his comment.

$\endgroup$
5
  • $\begingroup$ Thanks for the clarification. That statement caused confusion for a while. $\endgroup$ Commented Dec 3, 2016 at 12:36
  • 2
    $\begingroup$ In the same sentence as that statement is made I clearly stated that I was taking about idempotent matrices. Confusion could only arise if you read only half of what I wrote. $\endgroup$ Commented Feb 25, 2017 at 17:54
  • 3
    $\begingroup$ @MarianoSuárez-Álvarez A wumpus has two clubs and a club's multiplicity is precisely the rank. Is it really all that clear that this statement about a club's multiplicity only holds when the club is wielded by a wumpus? $\endgroup$
    – Pushpendre
    Commented Feb 25, 2017 at 22:53
  • 1
    $\begingroup$ To be honest, I have no idea what that has to do with the fact that the claim I made was made in a context which I was careful to make explicit. You are of course free to... hmm... I don't know what you are doing... but sincerely I could not care less. $\endgroup$ Commented Feb 25, 2017 at 22:56
  • $\begingroup$ Very well, fine by me. $\endgroup$
    – Pushpendre
    Commented Feb 25, 2017 at 23:06
7
+100
$\begingroup$

Hint: what are the eigenvalues of an idempotent matrix?

$\endgroup$
6
+200
$\begingroup$

Just for the sake of completness I add a more explicit proof using the fact that eigenvalues of an idempotent matrix are always zeros and/or ones.

If $A$ is idempotent it is also square (i.e. $n$-by-$n$), so we can find its eigendecomposition:

$$A = Q\Lambda Q^{-1}$$

Now, we note that trace is invariant under cyclic permutations, so we have:

$$\text{tr}(A) = \text{tr}(Q\Lambda Q^{-1}) = \text{tr}(Q^{-1}Q\Lambda) = \text{tr}(\Lambda) = \sum_{i=1}^n \lambda_i = \text{rank}(A)$$

How do we know that the sum of eigenvalues is the rank? This follows from the rank-nullity theorem. If we have $k \leq n$ zero eigenvalues then they are associated with eigenvectors that form the base of the nullspace of $A$.

And from rank nullity theorem we know that $\text{rank}(A) = n - \text{dim}(\text{ker}(A))$ and this is equal to the number of non-zero eigenvalues which in our case is just the sum over all eigenvalues.

$\endgroup$
1
  • $\begingroup$ First, why is idempotent matrix diagonalizable? $\endgroup$
    – Kuo
    Commented Jan 19 at 17:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .