If $A^2 = A$ then $A$ is diagonalizable I've stumbled upon this question in my assignment:

Prove if $A_{nxn}(\mathbb C)$ with $A^2 = A$, then $A$ is diagonalizable

My first thought is to solve for $p(A)$ where $p(x)  = x^2 - x$ and you get real roots.
Would that be sufficient in showing that $A$ is diagonalizable given you get real roots?

$A^2=A$ means that $\operatorname{col}A$ is a subset of the eigenspace of $1$. Moreover, $\ker A$ is the eigenspace of $0$. Therefore, $\operatorname{col} A\cap \ker A=\{0\}$, which means that $\operatorname{col}A+\ker A=\operatorname{col}A\oplus \ker A$. By rank-nullity, $\operatorname{col}A\oplus \ker A=\Bbb R^n=V_1\oplus V_0$ ($n$ being the size of the matrix).
