<s>[INST] Linear algebra: power of diagonal matrix? Let A = $\begin{pmatrix} 3 & -5 \\ 1 & -3 \end{pmatrix}$. Compute $A^{9}$. (Hint: Find a matrix P such that $P^{-1}AP$ is a diagonal matrix D and show that $A^{9}$= $PD^{9}P^{-1}$
Answer: $\begin{pmatrix} 768 & -1280 \\ 256 & -768 \end{pmatrix}$
I keep getting $\begin{pmatrix} -768 & 1280 \\ -256 & 768 \end{pmatrix}$ but could it be still right? I have D=$\begin{pmatrix} -2 & 0\\ 0& 2\end{pmatrix}$ and P =$\begin{pmatrix} 5&1 \\1 & 1 \end{pmatrix}$ with $P^{-1}$= $\begin{pmatrix} \frac{1}{4} & \frac{1}{-4} \\ \frac{1}{-4} & \frac{5}{4} \end{pmatrix}$
 [/INST] Your answer is not correct. Please note that the eigenvectors should be corresponding to the eigenvalues. So, if you choose $$D=\left(
\begin{array}{cc}
 -2 & 0 \\
 0& 2
\end{array}
\right),$$ then your $P$ should be $$P=\left(
\begin{array}{cc}
 1 & 5 \\
 1& 1
\end{array}
\right),$$
because $(1,1)$ is the eigenvector corresponding to $-2$.
</s>