Let $$A = \begin{bmatrix} 2&3\\ -1&5\end{bmatrix}$$ and $$f(x) =x^2-4x+7$$ Show that $f(A)=O.$ Use this result to find $A^5$.
Solution:
$$f(A)=A^2-4A+7I\\= \begin{bmatrix} 2 & 3 \\ -1 & 2 \\ \end{bmatrix} \begin{bmatrix} 2 & 3 \\ -1 & 2 \\ \end{bmatrix}-4\begin{bmatrix} 2 & 3 \\ -1 & 2 \\ \end{bmatrix}+7\begin{bmatrix} 1 & 0 \\ 0 & 1 \\ \end{bmatrix}\\=\begin{bmatrix} 4-3 & 6+6 \\ -2-2 & -3+4 \\ \end{bmatrix}-\begin{bmatrix} 8 & 12 \\ -4 & 8 \\ \end{bmatrix}+\begin{bmatrix} 7 & 0 \\ 0 & 7\\ \end{bmatrix}\\=\begin{bmatrix} 0 & 0 \\ 0 & 0 \\ \end{bmatrix}$$
How to find $A^5$ ?
We have $$A^2 -4A +7I =O $$ $$\Rightarrow A^2 =4A-7I $$ $$\Rightarrow A^3=A^2 (A) =(4A-7I)A = 4A^2-7A = 4(4A-7I)-7A = 9A -28I $$ $$\Rightarrow A^5=A^3 (A^2) = A^3 (4A-7I) = (9A-28I)(4A-7I) = 36A^2 -175A +196I =36 (4A-7I)-175A+196I = -31A -56 I $$
Just repeatedly use the same formula while multiplying $A^2$ with $A$ continuously. Hope it helps.