[Math] Compute the indicated power of a matrix

determinantexponentiationinverselinear algebramatrices

Compute the indicated power of the matrix: $A^8$

$ A = \begin{bmatrix}2&1&2\\2&1&2\\2&1&2\end{bmatrix} $

I calculated the eigenvalues:

$ \lambda_1 = \lambda_2 = 0, \lambda_3 = 5 $

and the corresponding eigenvectors/spaces:

$ v_1 = \begin{bmatrix}-1\\2\\0\end{bmatrix}, v_2 = \begin{bmatrix}-1\\0\\1\end{bmatrix}, v_3 = \begin{bmatrix}1\\1\\1\end{bmatrix} $

Using the eigenvectors to construct P and the eigenvalues to construct D:

$ P = \begin{bmatrix}-1&-1&1\\2&0&1\\0&1&1\end{bmatrix}, D = \begin{bmatrix}0&0&0\\0&0&0\\0&0&5\end{bmatrix}$

Now I can calculate $ A^8 = PD^8P^{-1}$

However how do I calculate $P^{-1}$? The textbook does not give an example of how it calculated the inverse and it seems to come out of nowhere. The only way to calculate the inverse that i know of is to use the adjoint and determinant of P:

$P^{-1} = \frac{adj(P)}{det(|P|)} $

Which is rather time consuming so I thought that they might have used another way to do this. Any suggestions?

Edit: Sorry I think my question is not clear. Although I have to compute the power of a matrix, my problem is with the inverse of $P$. I have to use the method i described above. I'm not necessarily interested in the answer of $A^8$ but more on how I can calculate the inverse of P

Best Answer

Hint
Use $A^3=5A^2$ to express $A^8$ in terms of $A, A^2$.