TITLE: If $A^2 = A$ then $A$ is diagonalizable
QUESTION [5 upvotes]: 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?

REPLY [3 votes]: If you want to do it without the "known theorem", let $N$ be the null space (=kernel) of $A$ and $R$ the range (=column space) of $A$.  Note that if $y = A x \in R$, 
$A y = A^2 x = Ax = y $, so $N \cap R = \{0\}$.  Moreover, for any $v \in \mathbb C^n$,
$v - A v \in N$ since $A(v - Av) = Av - A^2 v = 0$.  Thus $v = (v - Av) + Av \in N + R$,
i.e. $v$ is the sum of a member of $N$ and a member of $R$.  
To diagonalize $A$, take  the union of a basis of $N$ and a basis of $R$.
Using the fact that $\mathbb C^n = N + R$ with $N \cap R = \{0\}$, this is easily seen to form a basis of $\mathbb C^n$.  Since $A x = 0$ for $x \in N$ and $A x = x$ for $x \in R$, $A$ is diagonal in this basis, with diagonal entries $0$ corresponding to the basis of $N$ and $1$ corresponding to the basis of $R$.