Say $$A=\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$$ I'm supposed to find $A^{50}$ using the Cayley Hamilton theorem.
My Attempt:
$|A-\lambda I| = 0 \implies \lambda^2-2\lambda+1=0$
So $A^2-2A+I = O \implies A^{50}=2A^{49} - A^{48}$
But using this method, I'll need to know $A^{49}$ and $A^{48}$ to find $A^{50}$. But that doesn't seem the right way. This seems like some sort of matrix recursion but I'm not sure how to proceed from here.
Note that by the division algorithm we have that $$ x^{50} = (x^2 - 2x + 1) P(x) + ax + b $$ for some constants $a$ and $b$, and some polynomial $P(x)$.
Letting $x = 1$ gives us that $a + b = 1$. We thus have that $$ x^{49} + x^{48} + \dots + x + 1 = \frac{x^{50} - 1}{x - 1} = (x - 1) P(x) + a, $$ and substituting $x = 1$ into this relation gives us that $a = 50$, which in turn implies that $b = -49$.
We thus have that $$ x^{50} = (x^2 - 2x + 1) P(x) + 50x - 49, $$ and so we have that $$ A^{50} = (A^2 - 2A + I) P(A) + 50A - 49I = 50A - 49I = \begin{pmatrix} 1 & 50 \\ 0 & 1 \end{pmatrix}. $$