Every matrix $A$ such that $A^2 = A$ is similar to a diagonal matrix.
Approach (1): Let $m$ be minimal polynomial of $A$. Since $A^2=A$, we have $x^2-x=x(x-1)\in M_A$. which implies $m|x^2-x$. So $m$ is $x$, $x-1$ or $x(x-1)$. By theorem 6 Section 6.4, $A$ is diagonalizable$\iff$$m$ is of form $(x-c_1)\cdots (x-c_k)$, where $c_1,…,c_k\in F$ are distinct. In any case, $A$ is diagonalizable. Thus $A$ is similar to a diagonal matrix.
Approach (2): Let $T_A:F^n\to F^n$ such that $T_A(x)=A\cdot x$, $\forall x\in F^n$. Then $[T_A]_{B}=A$, where $B$ is canonical basis of $F^n$. Since $A^2=A$, we have $T_A^2=T_A$. So $F^n=N_{T_A}\oplus R_{T_A}$. Let $B_1=\{\alpha_1,…,\alpha_r\}$ and $B_2=\{\alpha_{r+1},…,\alpha_{n}\}$ be basis of $N_{T_A}$ and $R_{T_A}$, respectively. Then $B’=B_1\cup B_2=\{\alpha_1,…,\alpha_n\}$ be basis of $F^n$. It’s easy to check, $\alpha_1,…,\alpha_r$ are eigenvectors of $T_A$ corresponding to eigenvalue $0$, and $\alpha_{r+1},…,\alpha_n$ are eigenvectors of $T_A$ corresponding to eigenvalue $1$. Thus $\exists B’=\{\alpha_1,…,\alpha_n\}$ basis of $F^n$ such that $\forall i\in J_n$, $\alpha_i$ is eigenvector of $T_A$. So $T_A$ is diagonalizable. Hence $A$ is diagonalizable$\iff$$A$ is similar to a diagonal matrix (here is proof). Alternatively, $A=[T_A]_{B}\backsim [T_A]_{B’}$, i.e. $A$ is similar to a diagonal matrix. Is my proof correct?
Yes, both approaches are good. Yet another approach is to use the Jordan form, since a Jordan block equal to its square is diagonal.