Let $$ A = \begin{bmatrix}2 & 1 \\ 1 & 2 \end{bmatrix}$$ Find an invertible matrix $S$ and a diagonal matrix $D$ such that $ A = SDS^{-1}$. Compute $A^{30}$.
I found the diagonal matrix $D$ to be $$\begin{bmatrix} x_1 & x_1 \\ -x_1 & x_1 \end{bmatrix} $$ I find the problem as a whole quite confusing though, and Im not sure how to find $S$ and $S^{-1}$ and put it all together.
Eigenvalues: $k_1=3,k_2=1$. Eigenvectors: $\begin{pmatrix} 1 \\ 1\end{pmatrix}, \begin{pmatrix} 1 \\ -1 \end{pmatrix}$.
Symmetric matrix: $$D=S^{-1}AS=\begin{pmatrix} \frac12 & \frac12 \\ \frac12 & -\frac12\end{pmatrix}\begin{pmatrix} 2 & 1 \\ 1 & 2\end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & -1\end{pmatrix}=\begin{pmatrix} 3 & 0 \\ 0 & 1 \end{pmatrix}.$$ $$A^{30}=SD^{30}S^{-1}=\begin{pmatrix} \frac{3^{30}+1}{2} & \frac{3^{30}-1}{2} \\ \frac{3^{30}-1}{2} & \frac{3^{30}+1}{2}\end{pmatrix}.$$