Solution (source code)

= Solution

Take <determinants> of the idempotence equation and use multiplicativity of the <determinant>:
$$
(\det M)^2=\det(M^2)=\det M.
$$
Thus $d=\det M$ satisfies $d(d-1)=0$, proving
$$
\boxed{\det M\in\{0,1\}.}
$$
If the <determinant> is one, $M$ is invertible and <11/c/ii/solution> gives $M=I$. Every other <idempotent matrix> has zero <determinant>.