Can an idempotent matrix have complex eigenvalues? Let $P\in\mathbb{R}^{n\times n}$ be a nontrivial idempotent matrix: $P^2=P$, $P\neq 0$, $P\neq I,$ where $I$ is the $n\times n$ identity matrix.
What are the eigenvalues of $P$?
Solution:
Let $x$ be an eigenvector of $P$, with corresponding eigenvalue $\lambda$: $$Px=\lambda x.$$ We also have $$P(Px)=P\lambda x = \lambda Px=\lambda^2x,$$ and, since $P^2=P,$ we have $$P^2x=Px\implies\lambda^2=\lambda.$$ So, $\lambda(\lambda-1)=0\implies \lambda=0$ or $\lambda=1.$
However, is it not also correct to say that, since $P$ is idempotent, we also have $$P^m=P^{m-1}P=P^{m-2}PP=P^{m-2}P=P^{m-3}P=...=P$$ for any integer $m\geq0$? If that is correct, then we also have $$P^mx=\lambda^mx,$$ and so $$\lambda^m=\lambda$$ or $\lambda(\lambda^{m-1}-1)=0\implies\lambda=0$ or $\lambda^{m-1}=1$. Is there anything wrong with saying $$\lambda=\exp\left(2\pi i\frac{k}{m-1}\right),$$ for $k=0,1,...,m-2$?
 A: Since we have $P^2=P$ then the polynomial $x^2-x=x(x-1)$ annihilates $P$ so the set of eigenvalues of $P$ is a subset of the set of the roots of this polynomial:
$$\operatorname{sp}(P)\subset\{0,1\}$$
A: Without appealing to other theorems or arguments, your analysis is fine until you say that $\lambda^{m-1} = 1$ therefore $\lambda = \exp 2\pi i \frac{k}{m-1}$.
The error here is that it excludes the possibility of repeated eigenvalues. That is, the set of all $\lambda \neq 0$ is not equal to the set (of unique values) generated by $\exp 2\pi i \frac{k}{m-1}$, but rather it must be a subset of the unique elements generated by $\exp 2\pi i \frac{k}{m-1}$. Since $P$ only has $n$ eigenvalues (including multiplicity), if one or more has multiplicity $> 1$, then there will be some values of $m,k$ such that $\exp 2\pi i \frac{k}{m-1}$ does not yield an eigenvalue.
So it would be more proper to say that $\lambda \subset \{\exp 2\pi i \frac{k}{m-1}\ \mid\ m,k \in \mathbb{Z}\},$ but this doesn't solve your problem.
