# If a diagonalizable matrix is equal to its cube, then its rank is equal to the trace of its square

Suppose $A \in \Bbb R ^{n \times n}$ is such that $A^3=A$, and $A$ is diagonalizable. Prove that $\operatorname{trace}(A^2) = \operatorname{rank}(A)$.

I know that the possible eigenvalues of $A$ are $0,1,-1$. But how does that help to prove the required relation between trace and rank?

$Tr(A^2)=\sum_{i}\lambda_i^2$. Let the number of $1$'s be $k$, no. of $-1$'s be $l$, then, $Tr(A^2)=k+l$ and $rank(A)=$ no. of nonzero eigenvalues of $A$, which is again $k+l$.
• Two questions 1.Where is the fact that $A$ is diagonalizable used?2.how is rank of A=no. of non-zero eigen values – Learnmore Oct 6 '15 at 10:13
• $tr(D)$ =sum of diagonal elements ;anyway got your point – Learnmore Oct 6 '15 at 10:44