Maschke's averaging lemma

Statement
Let $$G$$ be a finite group and $$k$$ a field whose characteristic does not divide the order of $$G$$. Let $$\rho: G \to GL(V)$$ be a representation of $$G$$ over $$k$$. If $$W$$ is an invariant subspace for $$\rho$$, then there exists an invariant subspace $$W'$$ of $$\rho$$, that is complementary to $$W$$. In other words, any subrepresentation is a direct summand of the whole representation.

Generalizations

 * Maschke's averaging lemma for abelian groups

Proof
The idea is to take any complementary subspace to $$W$$ in $$V$$, and consider the induced projection from $$V$$ to $$W$$. Call this projection $$p$$.

Now, from the representations of $$G$$ on $$V$$ and $$W$$, we also get a representation of $$G$$ on $$Hom(V,W)$$. Call this representation $$\alpha$$. Then consider the sum:

$$\frac{1}{|G|} \sum_{g \in G} \alpha(g).p$$.

Note that the expression is well-defined iff the order of $$G$$ is not a multiple of the characteristic of $$k$$.

It turns out that $$\alpha(g).p$$ is identity restricted to $$W$$ for every $$g$$, hence the average is also identity when restricted to $$W$$. Further, the image of $$V$$ under this map is entirely in $$W$$. Hence the map is a projection from $$V$$ to $$W$$.

The kernel of that projection is $$W'$$, and that kernel is easily seen to be invariant.