Solution (source code)

= Solution

The <characteristic polynomial> factors as $\det(\lambda I-A)=(\lambda-1)(\lambda^2-1)$. Thus $\boxed{\lambda=1\text{ twice},\quad\lambda=-1\text{ once}}$ in <algebraic multiplicity>. An <orthonormal basis> of corresponding <eigenvectors> is
$$
v_1=\begin{pmatrix}1\\0\\0\end{pmatrix},\quad
v_2=\frac1{\sqrt2}\begin{pmatrix}0\\1\\-i\end{pmatrix}\quad(\lambda=1),\qquad
v_3=\frac1{\sqrt2}\begin{pmatrix}0\\1\\i\end{pmatrix}\quad(\lambda=-1).
$$
Direct multiplication verifies $Av_1=v_1$, $Av_2=v_2$, $Av_3=-v_3$. Their mutual <Hermitian inner products> vanish and each has <norm> one, which proves <linear independence>. For the repeated <eigenvalue>, <Gaussian elimination> gives
$$
A-I=\begin{pmatrix}0&0&0\\0&-1&i\\0&-i&-1\end{pmatrix}
\ \longrightarrow\ 
\begin{pmatrix}0&1&-i\\0&0&0\\0&0&0\end{pmatrix}.
$$
Hence $\boxed{\operatorname{rank}(A-I)=1,\quad\dim\ker(A-I)=2}$. The second equality follows from the <rank-nullity theorem> and agrees with the two-dimensional <eigenspace>. A repeated <eigenvalue> alone would not imply a two-dimensional <eigenspace> for an arbitrary <matrix>; here the <Hermitian matrix> is <diagonalizable>.