<s>[INST] Calculate $A^8$ using Cayley-Hamilton Therorem Find $A^8$ using Cayley Hamilton Therorem, when
$$A = \begin{pmatrix}
  0 & 0 & 0 & -1 \\
  1 & 0 & 0 & 0 \\
  0 & 1 & 0 & 2 \\
  0 & 0 & 1 & 0
 \end{pmatrix}$$
I found that $P(t) =t^4-2x^2+1 = (t-1)^2(t+1)^2$.
But how can I use Cayley-Hamilton to find $A^8$?
 [/INST] Given that $P(t) = t^4-2t^2+1$, the Cayley-Hamilton Theorem yields that
$$P(A) = O,$$
where $O$ is $4$ by $4$ zero matrix. Then 
$$O = A^4 - 2A^2 + I \iff A^4 = 2A^2 - I \implies A^8 = (2A^2 - I)^2.$$
EDIT: As suggested, this can be further simplified such that
$$ A^8 = 4A^4 - 4A^2+ I = 4(2A^2 - I) - 4A^2 + I = 4A^2 -3I .$$
</s>