# To check whether $\mathrm{rank}(A)$ = $\mathrm{trace} (A)$

Let $A \in \mathrm{Mat}_{n\times n}(\mathbb C)$ with $A^2 = A$. Does it always imply that $\mathrm{rank}(A)$ = $\mathrm{trace}(A)$?

-

Yes: since it satisfies $A^2-A=0$, the polynomial $P(x)=x^2-x=x(x-1)$ satisfies $P(A)=0$. Hence the minimal polynomial $m_A(x)$ divides $P(x)$ and thus is a product of distinct linear factors and so $A$ is diagonalizable (here is the relevant theorem). Because the roots of $m_A(x)$ are the eigenvalues of $A$, and $m_A(x)|x(x-1)$, we know that all the eigenvalues of $A$ are just $t$ times $1$ and $s$ times $0$, where $s+t=n$ and one of them could be zero. Now you need to know that the rank as well as the trace do not depend on choice of basis, i.e. if $Q$ is an invertible matrix then $\operatorname{Trace}(A)=\operatorname{Trace}(Q^{-1}AQ)$ and $\operatorname{Rank}(A)=\operatorname{Rank}(Q^{-1}AQ)$. Since in a diagonal matrix the rank is just the number of non-zero rows (or columns), in this case it will be equal to the number of $1$'s. So $t=\operatorname{Trace}(A)=\operatorname{Rank}(A)$.
Yes, it satisfies $t^2 - t = 0$ i.e. $t(t-1) = 0$, so it's diagonalizable as an identity and a 0 matrix, from which it's easy to read off the rank and trace.
That means there is an invertible matrix $P$ such that $P^{-1}AP$ is equal to some $\mathrm{diag}(1,\ldots,1,\ 0,\ldots,0)$. –  user1551 Dec 10 '12 at 9:11