Consider diagonalizing the matrix
\begin{equation*}
A = \left[ \begin{matrix} -2 \amp 0 \amp -2 \\ -1 \amp -1 \amp -2 \\ 4 \amp 0 \amp 4 \end{matrix} \right].
\end{equation*}
This is in fact a bit of an undertaking, but we now know all of the steps. First, let us find the eigenvalues by obtaining the characteristic polynomial
\begin{align*}
p_A (t) \amp = \det \left( \left[ \begin{matrix} t + 2 \amp 0 \amp 2 \\ 1 \amp t + 1 \amp 2 \\ -4 \amp 0 \amp t - 4\end{matrix} \right] \right) , \\
\amp = (t + 2)(t + 1) (t - 4) + 0 + (-2) [-4 (t + 1)] , \\
\amp = t^3 - t^2 - 2t,\\
\amp = t (t - 2) (t + 1).
\end{align*}
Thus the eigenvalues are the roots
\(-1, 0, 2\) of
\(p_A (t)\text{.}\) Now, generally at this point one may have to worry about the existence of an eigenbasis, but in our case we have
\(3\) distinct eigenvalues so that
Corollary 4.1.14 reassures us that we do indeed have an eigenbasis. Now we need only solve three linear equations to find it (as an aside: one could try to solve these simultaneously by row reducing with rational functions... but we will keep to our basic approach). First, we take
\(t = -1\) and solve
\begin{equation*}
\left[ \begin{matrix} 1 \amp 0 \amp 2 \\ 1 \amp 0 \amp 2 \\ -4 \amp 0 \amp -5 \end{matrix} \right] \threevec{x_1}{x_2}{x_3} = \threevec{0}{0}{0}
\end{equation*}
which has reduced row echelon form
\begin{equation*}
\left[ \begin{matrix} 1 \amp 0 \amp 0 \\ 0 \amp 0 \amp 1 \\ 0 \amp 0 \amp 0 \end{matrix} \right] \threevec{x_1}{x_2}{x_3} = \threevec{0}{0}{0}
\end{equation*}
Leading to the \((-1)\)-eigenvector
\begin{equation*}
\mb{v}_1 = \threevec{0}{1}{0}.
\end{equation*}
Now taking \(t = 0\) gives
\begin{equation*}
\left[ \begin{matrix} 2 \amp 0 \amp 2 \\ 1 \amp 1 \amp 2 \\ -4 \amp 0 \amp -4 \end{matrix} \right] \threevec{x_1}{x_2}{x_3} = \threevec{0}{0}{0}
\end{equation*}
which has reduced row echelon form
\begin{equation*}
\left[ \begin{matrix} 1 \amp 0 \amp 1 \\ 0 \amp 1 \amp 1 \\ 0 \amp 0 \amp 0 \end{matrix} \right] \threevec{x_1}{x_2}{x_3} = \threevec{0}{0}{0}
\end{equation*}
leading to the \(0\)-eigenvector
\begin{equation*}
\mb{v}_2 = \threevec{1}{1}{-1}.
\end{equation*}
Finally taking \(t = 2\) gives
\begin{equation*}
\left[ \begin{matrix} 4 \amp 0 \amp 2 \\ 1 \amp 3 \amp 2 \\ -4 \amp 0 \amp -2 \end{matrix} \right] \threevec{x_1}{x_2}{x_3} = \threevec{0}{0}{0}
\end{equation*}
which has reduced row echelon form
\begin{equation*}
\left[ \begin{matrix} 1 \amp 0 \amp 1/2 \\ 0 \amp 1 \amp 1/2 \\ 0 \amp 0 \amp 0 \end{matrix} \right] \threevec{x_1}{x_2}{x_3} = \threevec{0}{0}{0}
\end{equation*}
leading to the \(0\)-eigenvector
\begin{equation*}
\mb{v}_3 = \threevec{1}{1}{-2}.
\end{equation*}
So we have achieved the goal of finding an eigenbasis!
\begin{equation*}
\mathcal{B} = \left\{\mb{v}_1 , \mb{v}_2, \mb{v}_3 \right\} = \left\{ \threevec{0}{1}{0} , \threevec{1}{1}{-1} , \threevec{1}{1}{-2} \right\} .
\end{equation*}
But what about diagonalizing
\(A\text{?}\) Well, here we apply
Proposition 4.1.17, and in particular the last sentence where
\(P^{-1}\) is identified as the change of basis matrix from the standard basis to the eigenbasis. But this means that
\(P\) is the matrix whose columns are the eigenvectors, so that
\begin{equation*}
P = \left[ \begin{matrix} 0 \amp 1 \amp 1 \\ 1 \amp 1 \amp 1 \\ 0 \amp -1 \amp -2 \end{matrix} \right].
\end{equation*}
Either using our determinant formula or through an augmented row reduction, we can calculate the inverse
\begin{equation*}
P^{-1} = \left[ \begin{matrix} -1 \amp 1 \amp 0 \\ 2 \amp 0 \amp 1 \\ -1 \amp 0 \amp -1 \end{matrix} \right].
\end{equation*}
Finally, we encourage the student to compute \(P A P^{-1}\) and confirm
\begin{equation*}
P^{-1} A P = \left[ \begin{matrix} -1 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 2 \end{matrix} \right].
\end{equation*}