I came across a pdf file on the internet today about an idempotent matrix. Inside the pdf file, it stated that:
A matrix A is idempotent if and only if all its eigenvalues are either 0 or 1. The number of eigenvalues equal to 1 is then tr(A).
The proof inside has illustrated below:
$\lambda v = Av = AAv = \lambda Av = \lambda^2v $
$ \lambda v - \lambda^2v = 0$
$ \lambda(1-\lambda) = 0$
where $v$ is a non-zero vector, we can get $ \lambda = 0$ or $ \lambda = 1$ eventually.
The above proof sounds reasonable, however if I twist this equation a bit:
$ \lambda v = Av $
$ \lambda v = AAv $
$ \lambda v = AAAv $ because of the fact $A^2 = A$
$ \lambda v = AA \lambda v = \lambda AAv = \lambda^2Av = \lambda^3v$
$ \lambda v - \lambda ^3 v = 0$
$ \lambda(1-\lambda^2) = 0$
I can get $\lambda = 0$, $\lambda = 1$ and $\lambda = -1$ which contradicts the properties stated. I know that the theorem is always true so the question should be in my side. Can anyone help to point out what's wrong with my proof? Thank you in advance.
Obtaining the equation $\lambda (1-\lambda^{2})=0$ does not mean that every solution of this equation is an eigen value. You have only proved that any eigen value satisfies this equation but the converse result is not true.