# Verify my attempt to diagonalize matrix

Decide whether matrix $A$ is diagonalizable. If so, find $P$ such that $P^{-1}AP$ is diagonal.

We are given: $A = \begin{bmatrix}1 & 0 & 0 \\ 1 & 2 & 1 \\ 0 & 0 & 1\end{bmatrix}$

We set up and and solve: $|A - \lambda I| = 0$, which yields:

$$\left|\begin{matrix}1-\lambda & 0 & 0 \\ -1 & 2-\lambda & -1 \\ 0 & 0 & 1-\lambda\end{matrix}\right| = 0$$

This yields a characteristic polynomial and eigenvalues as:

$$-\lambda^3 + 4 \lambda^2 - 5 \lambda + 2 = (1-\lambda)^2 (2-\lambda) = 0 ~~~\rightarrow ~~~ \lambda_1 = 1, \lambda_{2,3} = 2$$

We have multiplicities of $2$ and $1$ for those eigenvalues.

So, for $\lambda_1 = 1$, we have:

$[A- I]v_1 = \begin{bmatrix}0 & 0 & 0 \\ -1 & 1 & -1 \\ 0 & 0 & 0\end{bmatrix}v_1 = 0$

Thus, $v_1 = (1,1,0)$ and $v_2 = (0,1,1)$ .

Repeating this same process for the second eigenvalue, we have as RREF:

$\begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}v_3 = 0$

This yields an eigenvector of $v_3 = (0,1,0)$.

Putting all of this together, we have the eigenvalue/eigenvector pairs:

• $\lambda_1 = 1, v_1 = (1,1,0)$
• $\lambda_2 = 1, v_2 = (0,1,1)$
• $\lambda_3 = 2, v_3 = (0,2,0)$

So P=\begin{bmatrix}1 & 0 & 0 \\ 1 & 1 & 1 \\ 0 & 1 & 0\end{bmatrix}

Is this right? Do I need to show more work? Do I need to take any additional steps after I find $P$?

• It looks fine to me. Did you try to compute $P^{-1}AP$? – Sigur Jun 5 '13 at 16:26
• Yes I did, I got $P^-1 AP$ = \begin{matrix}-1 & 0 & 0 \\ 0 & 1 & 0 \\ 3 & 2 & 2\end{matrix} – Jesus Jun 5 '13 at 16:31
• So you missed something. – Sigur Jun 5 '13 at 16:34

I think you have mistake since $|A-\lambda I|=\left|\begin{matrix}1-\lambda & 0 & 0 \\ 1 & 2-\lambda & 1 \\ 0 & 0 & 1-\lambda\end{matrix}\right| = 0$. the polynom is by minors $p(x)=(1-\lambda)^2(2-\lambda)$ and $\lambda_{1,2}=1,\lambda_3=2$. as a result of the little mistake in the matrix,your eigenvectors are not correct.so for $\lambda=1$ we can write: $$v_{1}=(-1,0,1),v_2=(0,1,-1)$$ and for $\lambda=2,$ we can get $$v_3=(0,1,0)$$so P is $$P=\begin{bmatrix}-1 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & -1 & 0\end{bmatrix}$$

• Oh dear Lord... I made the second row negative for some reason. The eigenvalues are the same but the eigenvector are not. This was my main concern because my eigenvectors weren't matching up with the one's I was getting from WolframAlpha. Thanks @Coargu Aliquis – Jesus Jun 5 '13 at 16:39
• you're welcome. For this type of questions MSE exists. – user65985 Jun 5 '13 at 16:43
• Another question about your answer. When \lambda = 1, I get x + y + z = 0. How did you get $v_1$ and $v_2$? – Jesus Jun 5 '13 at 16:46
• number of 'free' integers is two so given $x+y+z=0$ (as you call it), $x=-y-z$ so the eigenvector is from form of $(y-z,y,z)=y(1,1,0)+z(-1,0,1)$ and the vectors you got are basis conducted of eigenvectors. If in my answer I mentioned others, they just belong to the same subspace which is $N(A-\lambda I)$. – user65985 Jun 5 '13 at 16:51

I still cannot understand why so many books and prof's still define the characteristic pol. as $\,\det(A-\lambda I)\;$ instead of the usually much simpler (imho) $\,\det(xI-A)\,$ : in your determinant you have the middle row's signs wrong, which causes you to have the eigenvectors wrong...

$$\det(xI-A)=\begin{vmatrix}x-1&0&0\\\!-1&x-2&\!-1\\0&0&x-1\end{vmatrix}=(x-1)^2(x-2)$$

$$\underline{\lambda=1:}\;\;\; -x-y-z=0\implies y=-x-z\implies \begin{pmatrix}1\\\!\!-1\\0\end{pmatrix}\;,\;\;\begin{pmatrix}0\\\!\!-1\\1\end{pmatrix}$$

\underline{\lambda=2:}\;\;\; \begin{align*}x&=0\\z&=-x=0\end{align*}\;\;\implies\begin{pmatrix}0\\1\\0\end{pmatrix} \;\ldots\ldots\;\text{and etc.}