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

diagonalizationeigenvalues-eigenvectorslinear algebramatrices

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?

Best Answer

$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$.