Calculating eigenvalues of a matrix I have this quadratic matrix:
\begin{align*}
A = \begin{bmatrix}
0 & -1 & -2\\
-1 & 0 & -2\\
-2 & -2 & -3
\end{bmatrix} \implies A - \lambda I = \begin{bmatrix}
0 - \lambda & -1 & -2\\
-1 & 0 - \lambda & -2\\
-2 & -2 & -3 - \lambda
\end{bmatrix}
\end{align*}
After forming the characteristic polynomial and using the Rule of Sarrus, I get this equation:
$$-\lambda^3 - 3\lambda^2 + 9\lambda - 5$$
However the correct form of this term would be:
$$-(5 + \lambda)(1 - \lambda)^2$$
So the eigenvalues are $1$ and $-5$.
The thing I do not understand, is how to form this equation to get the values. Which approach and rules can solve this?
Thank you very much.
 A: 
$$p(\lambda)=-\lambda^3 - 3\lambda^2 + 9\lambda - 5$$

Proceed from your work,
$$\begin{align}
p(\lambda)&=-\lambda^3-5\lambda^2+2\lambda^2+9\lambda-5\\
\\
&=-\lambda^2(\lambda+5)+(2\lambda-1)(\lambda+5)\\
\\
&=(\lambda+5)(-\lambda^2+2\lambda-1)\\
\\
&=-(\lambda+5)(\lambda^2-2\lambda+1)\\
\\
&=-(\lambda+5)(\lambda-1)^2\end{align}
$$
A: You can use the rational roots theorem.
In your case, the equation reads
$$-x^3 - 3x^2 + 9x - 5$$
so you may expect that every rational root must be among the numbers $\{\pm 1, \pm 5\}$ as indeed is.
A: For matrices of $\mathbb{R}^{3 \times 3}$ and above, the method is to try to apply row operations and factorize. Avoid computing the determinant directly, or expanding the terms first.

*

*Apply row operations to $ |A - \lambda I|$.
$$
\begin{matrix}
\\
-R_1+R_2 \rightarrow\\
\\
\end{matrix}
\begin{vmatrix}
-\lambda & -1 & -2 \\
-1 & -\lambda & -2 \\
-2 & -2 & -3 -\lambda \\
\end{vmatrix}
\implies
\begin{vmatrix}
-\lambda & -1 & -2 \\
-(1-\lambda) & 1-\lambda & 0 \\
-2 & -2 & -3-\lambda \\
\end{vmatrix}
$$

*Find the characteristic polynomial from the reduced expression. We will exploit column $3$.
$$
\begin{align} 
p(\lambda) = & -2 \bigl( 2(1-\lambda) + 2(1-\lambda) \bigl) + (-3-\lambda)\bigl( -\lambda(1-\lambda) -(1-\lambda)  \bigl)\\
= & -8(1-\lambda) + (-3-\lambda)(1-\lambda)(-\lambda-1)\\
= & -8(1-\lambda) + (3+\lambda)(1-\lambda)(1+\lambda)\\
= & (1-\lambda)\bigl(-8 + (3+\lambda)(1+\lambda) \bigl) \\
= & (1-\lambda)(-8+\lambda^2+4\lambda+3)\\
= & (1-\lambda)(\lambda^2+4\lambda-5)\\
= & (1-\lambda)(\lambda+5)(\lambda-1)\\
= & -(1-\lambda)^2(\lambda+5)
\end{align}
$$
You may refer to a similar question I have answered.
Link: Finding Eigen Vectors and Respective Eigen Values for 3x3 Matrice
