TITLE: Verifying eigenvalues
QUESTION [5 upvotes]: How would you check whether eigenvalues $\lambda_1=8$, $\lambda_2=3$, $\lambda_3=-1$ belong to a matrix? $$
        \begin{matrix}
        7 & 1 & 1\\
        3 & 1 & 2 \\
        1 & 3 & 2 \\
        \end{matrix}
$$

REPLY [8 votes]: One method would be to simply check that $\text{det}(A-\lambda_i I) = 0$ for each of the three eigenvalues. 
Another method would be to check the following conditions: 
$\text{tr}(A) = \lambda_1+\lambda_2+\lambda_3$
$\text{det}(A) = \lambda_1\lambda_2\lambda_3$
$\text{tr}(A^2) = \lambda_1^2+\lambda_2^2+\lambda_3^2$
If you know the values of $\lambda_1+\lambda_2+\lambda_3$, and $\lambda_1\lambda_2\lambda_3$, and $\lambda_1^2+\lambda_2^2+\lambda_3^2$, then this uniquely determines the values of $\lambda_1$, $\lambda_2$, $\lambda_3$ up to a permutation.

REPLY [3 votes]: they must make this determinant zero :
$$\left | A-\lambda I \right |=\begin{vmatrix}
7- \lambda&  1&1 \\ 
 3& 1 -\lambda& 2\\ 
1 &3  & 2-\lambda
\end{vmatrix}$$