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?
 A: 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.
A: The characteristic equation of $A$ is $\det|A-\lambda I|=0$ it works tp $\lambda^3-3\lambda^2+2\lambda$ and according Caley-Hamilton theorem.: Every masytric satsfioes its own characteristic polynomial. So we have $$A^3-2A^2+2A=0~~~~(1)$$
Other methodd every $3\times 3$ matrix satisfies a monic ploynomial which is given by
$$A^2-(a_{11}+a_{22}+a_{33})A^2+(m_{11}+m_{22}+m_{33})A-\det|A|I=0~~~~(2)$$ Here $a_{kk}$ are diagonal elements and $m_{kk}$ are the minors of diagonal element. Notice that $\det|A|=0$, so the $I$ term is missing in (1).
A: You have a typo. Note that $С=A^3-3A^2+2A=A(A-I)(A-2I)$. Characteristic polynomial is $P(\lambda)=\lambda(\lambda-1)(\lambda-2)$. Due  Hamilton-Cayley theorem $C=0$.
A: Here is a way to obtain the value of $p(A)$, where $p(X)= X^3+3X^2+2X$, using Hamilton-Cayley:
The characteristic polynomial of $A$ is $\:\chi_A=X(X-1)(X-2)=X^3-3^2+2X$, and we have
$p(X)=\chi_A(X)-6X^2$, so
$$p(A)=\chi_A(A)-6A^2=-6A^2$$
so you have only one matrix multiplication to do.
