<s>[INST] Inverse of a matrix and matrix relation Let $A$ be the matrix  $$ A= \begin{pmatrix}
2 & -1 & -1\\
0 & -2 & -1 \\
0 & 3 & 2 \\
\end{pmatrix} $$ I am trying to find $A^{-1}$ as a relation of $I_{3}, A$ and $A^{2}$ and also to prove that $A^{2006}-2A^{2005}=A^{2}-2A$.  For the first one I noticed that $$A^{n}= \begin{pmatrix}
2^{n} & -(2^{n}-1) & -(2^{n}-1)\\
0 & -2 & -1 \\
0 & 3 & 2 \\ \end{pmatrix} , A^{k}= \begin{pmatrix}
2^{k} & -(2^{k}-1) & -(2^{k}-1)\\
0 & 1 & 0 \\
0 & 0 &  1\\ \end{pmatrix}$$ for $n$ odd and $k$ even but I don't know how to proceed from here. Also the the equality  $A^{2006}-2A^{2005}=A^{2}-2A$ leads to $A^{2004}(A-2I_{3})=A-2I_{3}$ but again I don't know what to do next since $(A-2I_{3})$ is not invertible. Any help?
 [/INST] Since the characteristic polynomial of $A$ is $-\lambda ^3+2\lambda^2+\lambda-2$, you know, by the Cayley-Hamilton theorem, that $-A^3+2A^2+A-2\operatorname{Id}_3=0$. Therefore,$$A^{-1}=-\frac12A^2+A+\frac12\operatorname{Id}_3.$$On the other hand,\begin{align}A^{2006}-2A^{2005}&=A^{2003}(A^3-2A^2)\\&=A^{2003}(A-2\operatorname{Id}_3)\\&=A^{2001}(A^3-2A^2)\\&=A^{2001}(A-2\operatorname{Id}_3)\\&=\cdots\end{align}
</s>