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?

This comes up pretty often, I think it is worth throwing in a bit more than you asked.
Suppose I have an $n$ by $n$ square matrix where all entries are equal to $1$:
$$ R_n \; \; = \; \;
 \left(  \begin{array}{ccccccc}
 1 & 1 & 1 & 1 & 1 & 1 & 1  \\
 1 & 1 & 1 & 1 & 1 & 1 & 1  \\
 1 & 1 & 1 & 1 & 1 & 1 & 1  \\
 1 & 1 & 1 & 1 & 1 & 1 & 1  \\
 1 & 1 & 1 & 1 & 1 & 1 & 1  \\
 1 & 1 & 1 & 1 & 1 & 1 & 1  \\
 1 & 1 & 1 & 1 & 1 & 1 & 1  
\end{array} 
  \right).
  $$
What are the eigenvalues and eigenvectors? ( Here $n=7,$ I will keep typing $n$ because the exact value really does not matter).
Well, we get an automatic eigenvalue $n,$ with eigenvector (I use columns always)
$$
 \left(  \begin{array}{c}
 1  \\
 1  \\
 1  \\
 1  \\
 1  \\
 1  \\
 1  
\end{array} 
  \right).
  $$
 We then get  $n-1$ genuine eigenvalues $0,$ with linearly independent eigenvectors 
$$
 \left(  \begin{array}{c}
 1  \\
 -1  \\
 0  \\
 0  \\
 0  \\
 0  \\
 0  
\end{array} 
  \right) \;
 \left(  \begin{array}{c}
 1  \\
 0  \\
 -1  \\
 0  \\
 0  \\
 0  \\
 0  
\end{array} 
  \right) \;
 \left(  \begin{array}{c}
 1  \\
 0  \\
 0  \\
 -1  \\
 0  \\
 0  \\
 0  
\end{array} 
  \right) \;
 \left(  \begin{array}{c}
 1  \\
 0  \\
 0  \\
 0  \\
 -1  \\
 0  \\
 0  
\end{array} 
  \right) \;
 \left(  \begin{array}{c}
 1  \\
 0  \\
 0  \\
 0  \\
 0  \\
 -1  \\
 0  
\end{array} 
  \right) \;
 \left(  \begin{array}{c}
 1  \\
 0  \\
 0  \\
 0  \\
 0  \\
 0  \\
 -1  
\end{array} 
  \right) \;
  $$
The complete list of eigenvalues is $\left\{n,0,\ldots,0 \right\}.$
What would I get for the eigenvalues of $k R_n,$ for a real number $k?$ With exactly the same eigenvectors, I would now have eigenvalues $\left\{kn,0,\ldots,0 \right\}.$ In your example the value of $k$ is $-1.$ All that has changed is the eigenvalue of the eigenvector with all 1's, which is now sent to $kn$ times itself.
What are the eigenvalues of $ w I + k R_n,$ with real numbers $w,k?$ With exactly the same (basis of) eigenvectors, we just add, for each eigenvector, $w$ times each. So the eigenvalues are  $\left\{w + kn,w,\ldots,w \right\}.$ Again, these are genuine eigenvalues (the Jacobi normal form is diagonal, which we also know from symmetry). The determinant of the matrix is then $$ ( w + k n ) \;  w^{n-1} = w^n + k \; n \, w^{n-1}.$$
When I have a basis of eigenvectors, and I know the list of eigenvalues, the characteristic polynomial is just the product of $n$ linear terms, each one given by $\left(\mbox{eigenvalue} - \lambda \right)$ in the order you are using. Here, your answer is just
$$ ( w + k n - \lambda) \; ( w  - \lambda)^{n-1}.$$
Now, for your example, indeed $n=3.$
How to get the 3's on the diagonal? In order to get the $-1'$s off the diagonal, we must take $k=-1,$ as I mentioned. So we must add 4 to bump $-1$ up to 3, so that $w=4.$ Meanwhile $w + k n = 1$ and $n-1=2.$ Your characteristic polynomial is 
$$  \det (A - \lambda I) =  (1-\lambda) \; (4 - \lambda)^2.$$
Arturo and Didier (and all enlightened people) would want me to point out how spectacularly incorrect this method is for a matrix such as
$$   
 \left(  \begin{array}{rr}
  3 & 1  \\
   0  & 3  
\end{array} 
  \right)  ,
$$
where the characteristic polynomial is easy enough to find but there is no basis of eigenvectors. 
