Solution (source code)

= Solution

Every row sums to six, so $\mathbf e=(1,1,1)^T$ is an <eigenvector> with <eigenvalue> six. Since $M$ is a real <symmetric matrix>, its other two <eigenvalues>, say $\lambda_2,\lambda_3$, are real. The <trace> gives
$$
\lambda_2+\lambda_3=\operatorname{tr}M-6=0.
$$
Also, for a real <symmetric matrix>, $\operatorname{tr}(M^2)$ is the sum of the squares of all its entries. Here
$$
\operatorname{tr}(M^2)=1^2+3^2+2^2+2(2^2+3^2+1^2)=42.
$$
Thus $\lambda_2^2+\lambda_3^2=42-36=6$. Together with their zero sum, this implies
$$
\boxed{\operatorname{spec}M=\{6,\sqrt3,-\sqrt3\}}.
$$