# Shelby's question at Yahoo! Answers (Finding P with P^{-1}AP=D)

#### Fernando Revilla

##### Well-known member
MHB Math Helper
Here is the question:

Let A be the real 3x3-matrix A =
0 1 1
1 0 1
1 1 0

(a) Compute the characteristic polynomial of A.
(b) Compute the eigenvalues of A.
(c) Compute the corresponding eigenvectors.
(d) Give a diagonal matrix D and an invertible matrix P such that D = (P^-1)AP.
Here is a link to the question:

Eigenvalues and eigenvectors question? - Yahoo! Answers

I have posted a link there to this topic so the OP can find my response.

#### Fernando Revilla

##### Well-known member
MHB Math Helper
Hello Shelby,

$(a)$ Using the transformations $R_2\to R_2-R_1$, $R_3\to R_3-R_1$ and $C_1\to C_1+C_2+C_3$ we get the characteistic polynomial: \begin{aligned} \chi(\lambda)&=\begin{vmatrix}{-\lambda}&{\;\;1}&{\;\;1}\\{\;\;1}&{-\lambda}&{\;\;1}\\{\;\;1}&{\;\;1}&{-\lambda}\end{vmatrix}\\&=\begin{vmatrix}{-\lambda}&{\;\;1}&{\;\;1}\\{\;\;1+\lambda}&{-\lambda}-1&{\;\;0}\\{\;\;1+\lambda}&{\;\;0}&{-\lambda-1}\end{vmatrix}\\&=\begin{vmatrix}{-\lambda+2}&{\;\;1}&{\;\;1}\\{\;\;0}&{-\lambda}-1&{\;\;0}\\{\;\;0}&{\;\;0}&{-\lambda-1}\end{vmatrix}\\&=(-\lambda+2)(\lambda+1)^2 \end{aligned} $(b)$ Eigenvalues: $(-\lambda+2)(\lambda+1)^2=0$, so we get $\lambda=2$ (simple) and $\lambda=-1$ (double).
$(c)$ The eigenvectors are: $$\ker (A-2I)\equiv \left \{ \begin{matrix}-2x_1+x_2+x_3=0\\x_1-2x_2+x_3=0\\x_1+x_2-2x_3=0\end{matrix}\right.$$ As $\lambda=2$ is simple, $\dim(\ker(A-2I))=1$ and easily we find a basis of this eigenspace: $B_2=\{(1,1,1)\}$. On the other hand: $$\ker (A+I)\equiv \left \{ \begin{matrix}x_1+x_2+x_3=0\\x_1+x_2+x_3=0\\x_1+x_2+x_3=0\end{matrix}\right.$$ Now, $\dim(\ker(A+I))=3-\mbox{rank }(A+I)=3-1=2$ and easily we find a basis of this eigenspace: $B_{-1}=\{(-1,1,0),(-1,0,1)\}$.

$(d)$ As a consequence of $(c)$:
$$D=\begin{bmatrix}{2}&{\;\;0}&{\;\;0}\\{0}&{-1}&{\;\;0}\\{0}&{\;\;0}&{-1}\end{bmatrix}\;,\quad P=\begin{bmatrix}{1}&{-1}&{-1}\\{1}&{\;\;1}&{\;\;0}\\{1}&{\;\;0}&{\;\;1} \end{bmatrix}$$ We can verify the result proving that $AP=PD$ (which implies $P^{-1}AP=D$).