Find high powers of a matrix with the Cayley Hamilton theorem
Via the Cayley Hamilton Theorem: $$ A^4 = I + (A-I)(A^3 + A^2+A+I)=I;\\ A^{10000} + A^{9998} = I^{2500} + I^{2499}A^2 = I + A^2. $$
Via the Cayley Hamilton Theorem: $$ A^4 = I + (A-I)(A^3 + A^2+A+I)=I;\\ A^{10000} + A^{9998} = I^{2500} + I^{2499}A^2 = I + A^2. $$