Solution (source code)

= Solution

The identity $T^2=T$ gives the decomposition
$$
v=(v-Tv)+Tv,\qquad T(v-Tv)=0.
$$
The first summand lies in the <kernel of a linear map> $\ker T$, and the second in the <image of a linear map> $\operatorname{im}T$. If $w$ belongs to their intersection, write $w=Tu$; then $Tw=T^2u=Tu=w$, while $Tw=0$. Thus $w=0$, proving the <direct sum>
$$
\boxed{V=\ker T\oplus\operatorname{im}T.}
$$
On these two <invariant subspaces>, $T$ is respectively zero and the <identity map>. Joining a <basis> of each produces a <basis> of <eigenvectors>, with <matrix>
$$
\boxed{\operatorname{diag}(0,\ldots,0,1,\ldots,1).}
$$
Hence every <linear projection> is <diagonalizable>, over the original <field>, including in <characteristic> two.