TITLE: Find an invertible matrix $P$ and a diagonal matrix $D$ such that $D=P^{−1}AP$?
QUESTION [5 upvotes]: I have a matrix $A=\begin{bmatrix} -5 & -1 & 2\\ 2 & 0 & -2\\ -6 & -1 & 3\end{bmatrix}$, and I need to find an invertible matrix P and a diagonal matrix D such that $D = P^{-1}AP$.
I've found the eigenvalues for the matrix and they are $-3, 1, 0$, so I know the D matrix, but I can't seem to figure out the eigenvectors for the P matrix.

REPLY [9 votes]: The $P$ matrix is just the matrix of eigenvectors of A.  You find the eigenvectors by solving the equation
$$(\lambda I-A)\mathbf{x}=\mathbf{0}$$
For eigenvalue $\lambda=0$, you get the associated eigenvector $\begin{bmatrix}1\\-3\\1\end{bmatrix}$
For eigenvalue $\lambda=-3,$ you get the associated eigenvector $\begin{bmatrix}1\\0\\1\end{bmatrix}$
Fr eigenvalue $\lambda=1,$ you get the associated eigenvector $\begin{bmatrix}.5\\-1\\1\end{bmatrix}$
Thus your matrix $P=\begin{bmatrix}1&1&.5\\-3&0&-1\\1&1&1\end{bmatrix}$