Let $$M = \begin{bmatrix} -7 & 8 \\ -8 & -7 \end{bmatrix}.$$ Find formulas for the entries of $M^n$ where $n$ is a positive integer. (Your formulas should not contain complex numbers.) Your answer should be in the form of a matrix.
I diagonalized to the form $M = P D P^{-1}$ and $M^n = P D^n P^{-1}$ where $P$ is my matrix of eigenvectors and $D$ is my matrix of eigenvalues.
My final answer after diagonalization was $$M^n = \begin{bmatrix} .5((-7+8i)^n+(-7-8i)^n) & (i/2)(-(-7+8i)^n+(-7-8i)^n) \\ (.5/i)(-(-7+8i)^n+(-7-8i)^n) & .5((-7+8i)^n+(-7-8i)^n) \end{bmatrix}$$
I can't seem to find an answer not in terms of complex numbers. Can someone show me what I'm missing?
Try this:
Write your eigenvalues in polar form $re^{i\theta}$ instead of $x + iy$. (so the two eigenvalues are $re^{i\theta}, re^{-i\theta}$). Recall polar coordinates are given by $r^2 = x^2 + y^2$ and $\tan(\theta) = y/x$ (so $\theta = \tan^{-1}(y/x)$ if $x>0$ and $\tan^{-1}(y/x) + \pi$ if $x<0$).
Then, when you compute $D^n$, use De Moivre's formula:
$$ \left(re^{i\theta}\right)^n = r^n(\cos(\theta) + i \sin(\theta))^n = r^n (\cos(n\theta) + i \sin(n\theta)) \\ \left(re^{-i\theta}\right)^n = r^n(\cos(\theta) + i \sin(-\theta))^n = r^n (\cos(n\theta) + i \sin(-n\theta)) = r^n (\cos(n\theta) - i \sin(n\theta)) $$
by using even and odd properties of $\cos$ and $\sin$.
In particular, if you have to add these two values, you'll get $$ \left(re^{i\theta}\right)^n + \left(re^{-i\theta}\right)^n = 2r^n\cos(n\theta) $$