Suppose $V$ and $W$ are both representations of a group $G$, where $V$ and $W$ are $k$-vector spaces. Define $\mathrm{Hom}(V,W)$ to be the space of $k$-linear maps $V \to W$. My notes say that:
$\mathrm{Hom}_G(V,W) = \{ \phi \in \mathrm{Hom}(V,W): g \phi = \phi \}$, and we have a linear projection $\mathrm{Hom}(V,W) \to \mathrm{Hom}_G(V,W)$ given by $ \displaystyle \phi \mapsto \frac{1}{|G|} \sum_{g \in G} g \phi$
I'm confused by this. $g \phi = \phi$ isn't enough for $\phi$ to be a $G$-linear map, is it? But yet the projection map fixes those maps that satisfy $g \phi = \phi$, which suggests that this isn't a mistake.
Thanks