# modular arithmetic commutative group problem.

Im trying to do an exercise in Roger Godements algebra which has me stumped.

Let $m,n$ be rational integers show there exists an integer $r$ such that $r=0\mod n$ and $r=1\mod n$ if and only if $m,n$ are coprime. Deduce from this that if $G$ is a commutative group and $x,y$ are elements of $G$ of orders $m,n$ respectively, with $m,n$ coprime then $z=xy$ has order $mn$ and the subgroup of $G$ generated by $z$ contains $x$ and $y$.

My first confusion comes from the lack of a variable $m$ in the equations for $r$. I know that I can rewrite $r=0+nm$ and $r=1+nq$ which implies that $nm =1 +nq$ but from the two modulo equations but I dont see any relation between $q,m$ that must hold (I want to say that $m-q =1 =n$ but i feel that this is wrong). Am I missing something fundamental?

For the second part I think I could relate the powers of $z$ which generate $G$ to the exponents via a substitution using the equations from part a, but i dont think i can proceed without understanding the first part.

any hints are appreciated, thanks!

-
Your confusion is justified. It should say $r = 1 \mbox{ mod } m$. – Isaac Solomon Nov 23 '12 at 20:22
In general, whenever you have a property that should hold between a pair of values $m$ and $n$, but the supposedly equivalent property is only a function of one value, you should be suspicious. – Isaac Solomon Nov 23 '12 at 20:25

If $(m,n)=1,$ then there exist $a,b\in\Bbb Z$ such that $am+bn=1.$ Let $r=am.$ Then $r\equiv 0\pmod m$ and $r\equiv 1\pmod n.$
Let $G$ be abelian, with $|x|=m,|y|=n,$ where $|\cdot|$ denotes the order of elements $x,y\in G.$ Since $G$ is abelian, we have $(xy)^{mn}=x^{mn}y^{mn}=(x^m)^n(y^n)^m=1^n\cdot 1^m=1.$ Thus, we find that $|xy|$ divides $mn.$
On the other hand, $(xy)^r=x^ry^r=1\cdot y=y$ by the choice of $r$ as above. This shows that the subgroup generated by $xy$ contains $y.$ By setting $r'=bn$ and using the same method, we see that this subgroup also contains $x.$
In particular, since $x\in\langle xy\rangle,$ we must have $|x|=m$ divides the order of $xy,$ because $|xy|=|\langle xy\rangle|.$ Similarly, since $y\in\langle xy\rangle,$ we must have $|y|=n$ divides $|xy|.$ Hence, using that $(m,n)=1,$ we get $mn$ divides $|xy|,$ and so we have $mn=|xy|.$