How to show that $ C := A^3-3A^2+2A = 0$? 
Let $$A = \begin{pmatrix} -1 & 1 & 2 \\ 0 & 2 & 0 \\ -1 & 1 & 2  \end{pmatrix}$$
Let $C:= A^3-3A^2+2A $.
Show that $C=0$.

I know that $A$ is diagonalisable with $\operatorname{spec}(A)=\{0,1,2\}$.
I have no clue how to approach that problem. Any advice?

Method 1: you can solve it by direct computation:
$$A^2 = \begin{pmatrix} -1 & 3 & 2 \\ 0 & 4 & 0 \\ -1 & 3 & 2  \end{pmatrix}$$
and
$$A^3 = \begin{pmatrix} -1 & 7 & 2 \\ 0 & 8 & 0 \\ -1 & 7 & 2  \end{pmatrix}.$$
You can actually argue that
$$A^n = \begin{pmatrix} -1 & \sum_{k=0}^{n-1} 2^k & 2 \\ 0 & 2^n & 0 \\ -1 & \sum_{k=0}^{n-1} 2^k & 2  \end{pmatrix}.$$
Thus if you sum up you easily see that $C\neq 0$.
Method 2: you can use Cayley-Hamilton theorem for these kinds of problems
https://en.wikipedia.org/wiki/Cayley%E2%80%93Hamilton_theorem.
By this theorem you would get that
$$A^3-3A^2+2A=0,$$
which is actually verifiable by direct computation. Conversely, always by Cayley-Hamilton theorem, if you knew the eigenvalues you could have just plugged them in $\lambda^3+3\lambda^2+2\lambda=0$ and verified that this equation is not satisfied.
