<s>[INST] If $A=\begin{bmatrix}2&1&1\\0&1&0\\1&1&2\end{bmatrix}$, find $A^8-5A^7+7A^6-3A^5+A^4-5A^3+8A^2-2A+I$ 
If $A=\begin{bmatrix}2&1&1\\0&1&0\\1&1&2\end{bmatrix}$, find $A^8-5A^7+7A^6-3A^5+A^4-5A^3+8A^2-2A+I$

Attempt $1:$ $A=I+B$, where $B=\begin{bmatrix}1&1&1\\0&0&0\\1&1&1\end{bmatrix}$
$B^n$ comes out to be $2^{n-1}B$
After that I tried doing $A^8=(I+B)^8$ and then opening RHS with binomial. But it didn't help.
Attempt $2:$ Finding characteristic equation and putting $A$ in it. It didn't help either.
The equation I got here is $A^3-5A^2+7A-3I=0$
Note: Concept of minimal polynomial is not in syllabus. Also, if we can do this without characteristic polynomial, that would be great.
 [/INST] Following your attempt 1 and using
$$\begin{cases}
A-I &= B\\
B^2 &= 2B
\end{cases}$$ you get that
$A^2-4A + 3I=0$, i.e. that $q(A)=0$ where $q(x) = x^2-4x +3$. You want to get $p(A)$ where $p(x)=x^8-5x^7+7x^6-3x^5+x^4-5x^3+8x^2-2x+1$.
Performing the long division of $p$ by $q$ you get
$$p(x) = (x^6-x^5+x^2-x+1)q(x) + 5x-2.$$
Hence $$p(A)= 5A-2I=5B + 3I=\begin{bmatrix}8&5&5\\0&3&0\\5&5&8\end{bmatrix}$$
Note: when you'll learn the minimum polynomial, you'll be able to see that $q$ is the minimal polynomial of $A$. However, the notion is not required for the question.
</s>