It is well-known and can easily be proven that if a matrix $A$ is idempotent, then its trace equals its rank:

$$ A^2 = A \Rightarrow \mathrm{tr}(A) = \mathrm{rk}(A) $$

Does the inverse also hold? If yes, how can this be proven?

  • 10
    $\begingroup$ Clearly not. Consider $A=\begin{pmatrix}3 & 0\\ 0 & -1\end{pmatrix}$, $\tr(A)=\rk(A)$ but $A$ is not idempotent $\endgroup$
    – Angae MT
    Mar 28 at 21:44
  • $\begingroup$ @AngaeMT you should post this as an answer $\endgroup$
    – Digitallis
    Mar 29 at 11:01
  • 1
    $\begingroup$ Another thing: I think you meant (as other responders also seem to agree) the converse of the statement, not the inverse. The inverse of this statement would be "if $A$ is not idempotent, then its trace and rank are unequal." $\endgroup$
    – rschwieb
    Mar 29 at 13:55

2 Answers 2


The trace is linear, so we can achieve any desired value by simply multiplying $A$ by some scalar as long as $\operatorname{tr}(A)≠0$. For instance, $\widetilde{A}≔\tfrac{\operatorname{rk(A)}}{\operatorname{tr}(A)}A$ trivially satisfies $\operatorname{tr}(\widetilde{A}) = \operatorname{rk}(\widetilde{A})$.


The idea is $A$ is idempotent if and only if it has eigenvalues $0,1$, but the converse condition cannot ensure. So we can construct a counterexample with non-zero and non-one eigenvalues. For example, consider $$A=\begin{pmatrix}3 & 0 \\ 0 & -1\end{pmatrix}$$which you can see $A$ has rank $2$ and $\operatorname{tr}(A)=2$, but $A^2\ne A$.


You must log in to answer this question.

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