# Subgroup of $\mathbb{Z}_a \times \mathbb{Z}_b$ related to GCD and LCM of $a$ and $b$

I am given the group $G=\mathbb{Z}_a \times \mathbb{Z}_b$ and the subgroup $M$ generated by (1,1), and I am asked to find a subgroup $H$ of $G$ such that $G=M \oplus H$.

It is clear that if $\gcd(a,b)=1$, then $M=G$ and $H$ is trivial.

Doing quite a few examples of particular choices of $a$ and $b$, I am fairly certain that $H$ must contain lcm$(a,b)$ elements, but I have no idea how to show this, or how to state explicitly the elements of $H$, especially because $H$ does not seem to need to be cyclic. Additionally, I do not know how to go about showing that this subgroup $H$ satisfies the condition $G=M\oplus H$.

Thank you for any help or suggestions, I have spent quite a lot of time thinking about this problem with essentially no progress.

• Something is a little wrong here, since $M$ contains $lcm(a,b)$ elements, so by considering the fact that $lcm(a,b)\cdot\gcd(a,b)=a\cdot b$ and $|\mathbb{Z}_a\times\mathbb{Z}_b|=a\cdot b$, it must be that $|H|=\gcd(a,b)$. – Ben Sheller Oct 6 '15 at 4:36

You already know that $|M|=lcm(a,b)$ and like Ben's comment pointed out that $|H|$ should be equal to $d$. So the remaining task is to find a subgroup $H$ of $G$ so that $|H|=d$ and that $M\cap H=1$. You can always find such a subgroup inside one of the component groups, say $\mathbb Z_a$.