I found this question here finite dimensional irreducible unitary representations But I having trouble with the answer given there
Let $(\pi,V)$ be a unitary finite dimensional unitary representation of a commutative Lie group $G$ and let $\pi$ be irreducible.
Take $g\in G$. Consider the map$ V \longrightarrow V: v \mapsto \pi(g)(v)$
Why is it an endomorphism of $G$-modules ? I know it has something to do with the commutativity I would say that the map is an endomorphism of $\Bbb R$-modules, because V is a real vector space, so an $\Bbb R$-module. Wy should it be and endomorphism of G-modules? I can't say that V is a vector space over G, right? Since G is not a field.
Lets write down explicitly:
$$f:V\to V$$ $$f(v)=\pi(g)(v)$$
Or simply $f=\pi(g)$. It is linear because $\pi(g)$ is. It is a bijection because $\pi(g^{-1})$ is inverse of $\pi(g)$.
So the only question is whether it is a $G$-module morphism. So let $h\in G$. Then
$$f(\pi(h)(v))=\pi(g)\big(\pi(h)(v)\big)=\pi(gh)(v)$$
Now since $G$ is abelian then $gh=hg$ and therefore
$$f(\pi(h)(v))=\pi(gh)(v)=\pi(hg)(v)=\pi(h)\big(\pi(g)(v)\big)=\pi(h)\big(f(v)\big)$$
and thus $f$ is a $G$-module morphism.
Note that it wasn't relevant that $V$ is finite dimensional, unitary or that $G$ was a Lie group. This works for any Abelian group $G$ and any representation $V$ over any field or even ring. This even works outside of linear world, i.e. for $G$-sets, except $f$ is obviously no longer linear in such case.
Finally note that $G$ being abelian is an important assumption. Otherwise $f$ need not be a $G$-module morphism. There are counterexamples. It is not hard to construct one, at least if you consider finite non-abelian $G$. You just need to consider $G$ acting on itself (in the natural way), and extend that to a vector space with $G$ as its basis.
// EDIT
The term "$G$-module" does not mean "module over $G$" as in "module over a ring". Those two terms share the same "module" word, but in fact mean something different. The term "$G$-module" means literally the same thing as representation of $G$ (in a more general sense, i.e. not necessarily Lie, potentially over any ring, not only reals).
Note that these two concepts, i.e. $G$-modules and modules over ring, actually are related. There's a natural equivalence between $G$-modules (representations) over a ring $R$ and modules over the group ring $RG$. Here of course you consider $R=\mathbb{R}$ the ring/field of reals. The problem is that there's no natural/useful topology on $RG$, even if both $R$ and $G$ are topological. Which makes this approach worse. Still useful in purely algebraic context though. But that's a story for another time.