How to compute the characteristic polynomial of $A$ The matrix associated with $f$ is:
$$ \left(\begin{array}{rrr}
     3 & -1 & -1 \\
    -1 & 3 & -1 \\
    -1 & -1 & 3
  \end{array}\right) .
$$
First, I am going to find the characteristic equation of $\det(A- \lambda I)$. Please correct me if I'm wrong.
$$= (3-\lambda)(3-\lambda)(3-\lambda)-1-1-(3-\lambda)-(3-\lambda)-(3-\lambda)
=-\lambda^3+9\lambda^2-24\lambda+16 .$$
How to factor this? I know the $\lambda$'s should be $1$, $4$ and $4$. But how am I supposed to find these values?

You may also use Cardano's formula to find the roots $x_1,x_2,x_3$ of a cubic polynomial $ax^3+bx^2+cx+d$.
$$
\begin{align}
p &= 2 b^3-9 a b c+27 a^2 d,\\
q &= \sqrt{p^2-4 \left(b^2-3 a c\right)^3},\\
x_1 &= -\frac{b}{3 a}
-\frac{1}{3 a} \sqrt[3]{\frac{p+q}{2}}
-\frac{1}{3 a} \sqrt[3]{\frac{p-q}{2}},\\
x_2 &= -\frac{b}{3 a}
+\frac{1+i \sqrt{3}}{6 a} \sqrt[3]{\frac{p+q}{2}}
+\frac{1-i \sqrt{3}}{6 a} \sqrt[3]{\frac{p-q}{2}},\\
x_3 &= -\frac{b}{3 a}
+\frac{1-i \sqrt{3}}{6 a} \sqrt[3]{\frac{p+q}{2}}
+\frac{1+i \sqrt{3}}{6 a} \sqrt[3]{\frac{p-q}{2}}.
\end{align}
$$
(There are some subtleties in handling $q$ when the operand inside the square root is negative. See the Wikipedia entry for details.) In your case we have $a=-1, b=9, c=-24, d=16$. Hence $p=-54, q=0$ and $x_1=1, x_2=x_3=4$.
