TITLE: Eigenvalues for $4\times 4$ matrix
QUESTION [19 upvotes]: Show that $0,2,4$ are the eigenvalues for the matrix $A$: 
$$A=\pmatrix{
2  &  -1 & -1 &  0  \\
-1  & 3 &  -1 &  -1  \\
-1  &  -1 &  3 & -1  \\
0  &  -1 & -1 &  2  \\
}$$
and conclude that $0,2,4$ are the only eigenvalues for $A$. 

I know that you can find the eigenvalues by finding the $\det(A-\lambda \cdot I)$, but it seems to me that the computation will be rather difficult to compute as it is a $4 \times 4$ matrix.
My question: is there an easier method to calculate the eigenvalues of $A$? 
And if I have to conclude that these are the only eigenvalues, is there a theorem that argues how many eigenvalues a matrix can have?

REPLY [2 votes]: You can easily guess some eigenvectors:
$$
\begin{pmatrix}
2 & -1 & -1 & 0 \\
-1 & 3 & -1 & -1 \\
-1 & -1 & 3 & -1 \\
0 & -1 & -1 & 2
\end{pmatrix}
\begin{pmatrix} 1\\1\\1\\1 \end{pmatrix} =
\begin{pmatrix} 0\\0\\0\\0 \end{pmatrix}
\\
\begin{pmatrix}
2 & -1 & -1 & 0 \\
-1 & 3 & -1 & -1 \\
-1 & -1 & 3 & -1 \\
0 & -1 & -1 & 2
\end{pmatrix}
\begin{pmatrix} 1\\0\\0\\-1 \end{pmatrix} =
\begin{pmatrix} 2\\0\\0\\-2 \end{pmatrix}
\\
\begin{pmatrix}
2 & -1 & -1 & 0 \\
-1 & 3 & -1 & -1 \\
-1 & -1 & 3 & -1 \\
0 & -1 & -1 & 2
\end{pmatrix}
\begin{pmatrix} 1\\-1\\-1\\1 \end{pmatrix} =
\begin{pmatrix} 4\\-4\\-4\\4 \end{pmatrix}
\\
\begin{pmatrix}
2 & -1 & -1 & 0 \\
-1 & 3 & -1 & -1 \\
-1 & -1 & 3 & -1 \\
0 & -1 & -1 & 2
\end{pmatrix}
\begin{pmatrix} 0\\1\\-1\\0 \end{pmatrix} =
\begin{pmatrix} 0\\4\\-4\\0 \end{pmatrix}
$$
The corresponding eigenvalues are $0,2,4,4$. It is not hard to check that the latter two vectors are linearly independent, and so these are all eigenvalues of the matrix.