Prove that a matrix $M$ is diagonalizable if $M^3 = M$ 
Let $M$ be a real square matrix such that $M^3 = M$. Prove that $M$ is diagonalizable. 

Proof:
We have a $M$, a $2\times2$ matrix, $M$ is diagonalizable if $M$ has 2 linearly independent eigenvectors ${v_1,v_2}$, if so, then: $D = P^{-1}MP$
We give a concrete example:
Let $$ M = \begin{bmatrix}1&3\\2&2\end{bmatrix} $$ then the eigenvalues $x_1  =-1$ and $x_2 = 4$ with eigenvectors $(3,-2)$ and $(1,1)$, respectively. 
Hence, $$ P = \begin{bmatrix}3&1\\-2&1\end{bmatrix}, D = \begin{bmatrix}-1&0\\0&4\end{bmatrix} $$ 
This is my proof but I am not sure about the given condition in the statement $M^3 = M$, how can I use it?
 A: Just because, here's a one line proof:
$$
x = (I - M^2)x + \frac 12 (M^2 + M)x + \frac 12 (M^2 - M)x
$$
The first term is an eigenvector associated with $0$.  The second is an eigenvector associated with $1$.  The third is an eigenvector associated with $-1$.  Hence, every vector can be written as the sum of eigenvectors.
A: I'll synthesize the comments into an answer, and add a remark.


*

*A matrix can be diagonalized over a field if and only if the minimal polynomial of the matrix has no repeated roots and splits completely (reason this by looking at the Jordan canonical form).

*Given (1), consider $x^3-x = x(x-1)(x+1)$, which has no repeated roots unless...

*The field has characteristic two.  
A: We have two cases:


*

*If inverse does not exist, then at least one eigenvalue $\lambda_1=0$. The second eigenvalue must therefore be real (why?). If $\lambda_2=0$ then $M$ nilpotent which can't be true since $M^2=I$ would be impossible and if not $\lambda_2 = 0$ then we have two distinct eigenvalues and then we are done because we are sure it must be diagonalizable.

*if $M^{-1}$ exists, then $M^{-1} = M$ (by multiplying $M^{-2}$). A real matrix being it's own inverse. What can we say about it's eigenvalues? They must be a complex conjugate pair or real (because any matrix of real entries has that property). If real then $\pm 1$ is only possibility. Complex conjugate pair is out of the question since both must fulfill squaring equalling $1$ since we have $M^2 = I$.


So the only possible ways to avoid diagonalizability is to have $2\times 2$ Jordan blocks of repeated eigenvalues $1$ or $-1$. But neither block would square to $I$ which would be required for $M^2=I$.

For the curious student these Jordan-blocks will in fact square like this:
$$\left[\begin{array}{cc}1&1\\0&1\end{array}\right]^2 = \left[\begin{array}{cc}1&2\\0&1\end{array}\right]$$
$$ \left[\begin{array}{rr}-1&1\\0&-1\end{array}\right]^2= \left[\begin{array}{rr}1&-2\\0&1\end{array}\right]$$
These blocks are of fundamental importance as it turns matrix multiplication into addition and subtraction. In general:
$$\left[\begin{array}{cc}1&a\\0&1\end{array}\right] \left[\begin{array}{cc}1&b\\0&1\end{array}\right] = \left[\begin{array}{cc}1&a+b\\0&1\end{array}\right]$$
