Solution (source code)

= Solution

Write the given <matrix> as $A$. Expanding its <characteristic polynomial> along the middle column gives
$$
\begin{aligned}
\det(\lambda I-A)
&=(\lambda+2)\big[(\lambda-7)(\lambda+8)+54\big]\\
&=(\lambda+2)(\lambda^2+\lambda-2)
=(\lambda-1)(\lambda+2)^2.
\end{aligned}
$$
Thus the <eigenvalues> are $1,-2,-2$, counted with <algebraic multiplicity>.

For $\lambda=1$, solving $(A-I)v=0$ gives $z=2x$ and $y=-x$. For $\lambda=-2$, solving $(A+2I)v=0$ gives $z=3x$, with $y$ free. A convenient <eigenbasis> is therefore
$$
\boxed{\begin{array}{c|c}
\lambda&\text{eigenvector}\\\hline
1&(1,-1,2)^T\\
-2&(1,0,3)^T\\
-2&(0,1,0)^T
\end{array}}
$$
The last two <eigenvectors> span the two-dimensional <eigenspace> for $-2$. The three columns have <determinant> $-1$, so they are linearly independent and form a <basis> of $\mathbb R^3$. In particular the repeated <eigenvalue> causes no failure of <diagonalizability> here.