Solution (source code)

= Solution

If $A\mathbf v=\lambda\mathbf v$ for a nonzero <eigenvector>, then $A^2\mathbf v=\lambda^2\mathbf v=A\mathbf v=\lambda\mathbf v$. Thus $\lambda(\lambda-1)=0$, so
$$
\boxed{\text{every eigenvalue is }0\text{ or }1.}
$$
Both values need not occur: the zero <matrix> has only $0$, and the <identity matrix> only $1$. More precisely, an <idempotent linear map> whose <rank of a linear map> is $r$ has $r$ copies of $1$ and $n-r$ copies of $0$. Indeed, its <image of a linear map> and <kernel of a linear map> form a <direct sum>, giving an <eigenbasis> without assuming an <orthogonal projection>.