<s>[INST] n-th power of a matrix using the division of polynomials. Consider the matrix 
$$
A=\begin{pmatrix}
0 & 0 & 0\\
-2 & 1 & -1\\
2 & 0 & 2
\end{pmatrix}
$$


*

*Calculate $A^3-3A^2+2A$.

*What is the remainder of the division of the polynomial $X^n$ by the polynomial $X^3-3X^2+2X$.

*Calculate $A^n$ for every natural number $n$.


I was solving the following problem and I was stuck in it. For part 1) the answer was the zero matrix. In part 2) I use the usual division and i get the following
$$
X^n=X^{n-3}(X^3-3X^2+2X)+3X^{n-1}-2X^{n-2}.
$$ 
When I pass to part 3) and using part 1) and 2), we obtain
$$
A^n=3A^{n-1}-2A^{n-2}.
$$ 
Using the fact that $A^3-3A^2+2A=O_{3\times 3}$. but if I use this answer for calculating $A^2$ the answer is not correct, so I think $A^n$ obtained is not correct. Now, one can use the diagonalization of the matrix $A$ and obtain
$$
A^n=\begin{pmatrix}
0 & 0 & 0\\
-2^n & 1 & 1-2^n\\
2^n & 0 & 2^n
\end{pmatrix}
$$
Can you help me in proving part 2 (if not correct) and part 3 without using the diagonalization method.
 [/INST] You could use induction.
For $n=1$, your statement is true. 
Assuming
$$
A^n=\begin{pmatrix}
0 & 0 & 0\\
-2^n & 1 & 1-2^n\\
2^n & 0 & 2^n
\end{pmatrix}
$$
Then 
$$
A^{n+1} = AA^n = 
\begin{pmatrix}
0 & 0 & 0\\
-2 & 1 & -1\\
2 & 0 & 2
\end{pmatrix}
\begin{pmatrix}
0 & 0 & 0\\
-2^n & 1 & 1-2^n\\
2^n & 0 & 2^n
\end{pmatrix} = 
\begin{pmatrix}
0 & 0 & 0\\
-2^n - 2^n & 1 & 1-2^n - 2^n\\
2\cdot2^n & 0 & 2\cdot2^n
\end{pmatrix} =
\begin{pmatrix}
0 & 0 & 0\\
-2^{n+1} & 1 & 1-2^{n+1}\\
2^{n+1} & 0 & 2^{n+1}
\end{pmatrix}
$$
So
$$ 
A^n = \begin{pmatrix}
0 & 0 & 0\\
-2^n & 1 & 1-2^n\\
2^n & 0 & 2^n
\end{pmatrix}
$$
Is true for every natural number $n$
</s>