Clean and clever proofs to show every homomorphism of two groups with coprime orders is trivial?

The order of the image of $f$ divides the order of $G$ because $\operatorname{im} (f) \cong G/\ker(f)$.

The order of the image of $f$ divides the order of $H$ because $\operatorname{im} (f)$ is a subgroup of $H$.

Therefore, order of the image of $f$ divides $\gcd(|G|,|H|)=1$.


Say $|G|=n$ and $|K|=m$, with $\gcd(m,n)=1$. Find $r,s\in\mathbb{Z}$ such that $rm+sn=1$. Note that if $g\in G$ and $k\in K$, then $g^n=e$, $k^m=e$.

Let $f\colon G\to K$ be a morphism, and let $g\in G$. Then $g=g^{rm+sn} = g^{rm}(g^n)^s=g^{rm}$. So $$f(g) = f(g^{rm}) = f(g)^{rm} = (f(g)^m)^r = e^r = e.$$ Thus, $f$ is the trivial map.


Feedback: your assertion in (3) that $G/\mathrm{ker}(f)$ is $H$ is incorrect. You can say that $G/\mathrm{ker}(f)$ is isomorphic to its image in $H$, but since you are not assuming $f$ is onto, you can’t assert it is isomorphic to $H$, just to a subgroup of $H$.

The rest of the argument is too convoluted: note that $|G/\mathrm{ker}(f)|$ divides both $|G|$ (since it is equal to $|G|/|\mathrm{ker}(f)|$, and $|H|$ (because it is isomorphic to a subgroup of $H$), hence divides their gcd, which is $1$.