Solution (source code)

= Solution

Expanding the <characteristic polynomial> gives
$$
\det(M-tI)=(2-t)\bigl[(1-t)(3-t)+2\bigr]-2(2-t)
=(2-t)(1-t)(3-t).
$$
Thus the <eigenvalues> are $1,2,3$. Solving the corresponding <homogeneous linear systems> gives
$$
\boxed{E_1=\operatorname{span}\{(-1,0,1)^T\},\quad
E_2=\operatorname{span}\{(1,1,0)^T\},\quad
E_3=\operatorname{span}\{(1,1,1)^T\}.}
$$
Every nonzero <vector> in the displayed <eigenspace> is an <eigenvector>. Direct multiplication verifies the three eigenvalue equations. The distinct <eigenvalues> imply these <eigenvectors> are linearly independent and form a <basis> of $\mathbb R^3$.