Let $f:G\rightarrow G'$ be a non trivial homomorphism,
Prove that if $|G|$ is prime, then $f$ is one-to-one.
My Attempt:
As $f$ is homomorphism,
$f(gg')=f(g)f(g')$ for all $g,g'\in G$.
If $|G|$ is prime then what?
Let $f:G\rightarrow G'$ be a non trivial homomorphism,
Prove that if $|G|$ is prime, then $f$ is one-to-one.
My Attempt:
As $f$ is homomorphism,
$f(gg')=f(g)f(g')$ for all $g,g'\in G$.
If $|G|$ is prime then what?
On
The first isomorphism theorem gives
$$G/\ker (f) \cong \text{im}(f).$$ Taking the order of both sides, and using Lagrange's theorem gives
$$|G|=|\ker(f)||\text{im}(f)| $$
As $\ker (f) \leq G $ is a proper subgroup, and $|G|$ is prime, Lagrange's theorem gives $\ker(f)=1$. Thus $\text{im}(f)\leq G'$ is a subgroup of the same order as $G$.
By Lagrange's theorem, $G$ has no non-trivial subgroups. Since $\ker f$ is a proper subgroup of $G$, it must be $ \ker f = \{ 1_G \}$. So $f$ is injective.
However, you cannot prove that $f$ is onto without further hypothesis. An example is any embedding $G \longrightarrow G \times H$ where $H$ a non-trivial group.