I am trying to do this exercise:
Let $G$ be an abelian group of order $mn$, where $m$ and $n$ are relatively prime. If $H_1 =\{x \in G: mx = 0\}$ and $H_2 =\{x \in G: nx = 0\}$, prove that $G=H_1 \oplus H_2$.
By proving that the intersection of $H_1$ and $H_2$ is the trivial subgroup; I have managed to prove that the sum (it is an additive group, althoght that is not important) is direct. However I can not prove the equality of $G$ and the direct sum. How should I approach that? (What I struggle with is the case in which the order of an element of $G$ does not divide either $m$ nor $n$).
Thanks in advance.
Hint: Write $1=am+bn$ for some integers $a,b$. Then, for each $x \in G$, $x=m(ax)+n(bx)$ and $mG \subset H_2$, $nG \subset H_1$.