So it gives me this matrix

$\displaystyle A=\left(\begin{matrix} -1 &0 &1\\5 &3 &2\\6 &0 &4\end{matrix}\right)$

And asks me to compute A^k, where k is any positive integer.

I know I have to use to eigenvectors which I found to be this matrix:

$\displaystyle P=\left(\begin{matrix} -5 &0 &2\\3 &1 &17\\5 &0 &12\end{matrix}\right)$

and the diagonal matrix made out of the eigenvalues:

$\displaystyle D=\left(\begin{matrix} -2 &0 &0\\0 &3 &0\\0 &0 &5\end{matrix}\right)$

Now I know A^k=P*D^k*P^-1 but when I do this I just get something really messy,

Any help will be appreciated.