# If $A$ is a diagonalizable $n\times n$ matrix for which the eigenvalues are $0$ and $1$, then $A^2=A$.

If $A$ is a diagonalizable $n\times n$ matrix for which the eigenvalues are $0$ and $1$, then $A^2=A$.

I know how to prove this in the opposite direction, however I can't seem to find a way prove this. Could anyone please help?

-
This is the spectral characterization of idempotent matrices. Just observe that $A^2$ and $A$ coincide on the eigenspaces $\mbox{Ker} A$ (both $0$) and $\mbox{Ker} (A-I_n)$ (both $I$). – 1015 Apr 20 '13 at 19:22

Write $A = QDQ^{-1}$, where $D$ is a diagonal matrix with the eigenvalues, $0$s and $1$s, on the diagonal. The $A^2 = QDQ^{-1}QDQ^{-1} = QD^{2}Q^{-1}$. But $D^2 = D$, because when you square a diagonal matrix you square the entries on the diagonal and $1^2 = 1$ and $0^2 = 0$. Thus

$$A^{2} = QD^{2}Q^{-1} = QDQ^{-1} = A$$

-
Ah, I see. I didn't have the notion that in this case $D^2=D$. Thanks a lot :D. – dreamer Apr 20 '13 at 19:19

Another approach, more theoretical but perhaps simpler and shorter:

Since a matrix is diagonalizable iff its minimal polynomial splits as a product of different linear factors, being that only $\,0,1\,$ are the only eigenvalues of the matrix, its minimal polynomial must be $\,x(x-1)=x^2-x\,$ , from where

$$A^2-A=0\implies A^2=A$$

-
Hmm. I think in fairness we could also have $A = 0$ or $A = I$, but both of those are uninteresting. – Ben Millwood Apr 20 '13 at 20:15
The OP wrote "the eigenvalues are $\,0\,$ and $\,1\,$ ". For me this means both values appear so $\,A\neq0,I\,$ – DonAntonio Apr 20 '13 at 21:59