Suppose I have an Idempotent matrix (with complex entries) $X \in \mathbb{C}^{n \times n}$ such that $X^2 = X$ and I want to determine the set of solutions of this equation.
So, I started by considering the Jordan canonical form $J$ of $X$ such that $J = P^{-1}XP$ where $P$ is an invertible matrix. With this equation and using the fact that $X$ is an idempotent matrix, it was easy to show that $J$ is also an idempotent matrix $J^2 = J$.
Now, using the Cayley-Hamilton theorem it was again simple to show that the eigenvalues of $X$ are $0$ and $1$.
Then, we can deduce that the Jordan blocks can only be $1×1$ (because otherwise, they wouldn't be idempotents). So the Jordan form $J$ of $X$ has $1×1$ blocks (so it's diagonal) and the diagonal consists of $0$ and $1$.
Now, I am stuck on how to solve it further. Any idea on how to proceed from this point to solve for $X^2=X$? Thanks!