The internal direct product of two subgroups Show how if $\gcd(m,n)=1$, $\mathbb{Z}_{mn}$ is the internal direct product of two subgroups.
I know that internal direct products must meet three criteria.


*

*$G=HK=\{hk:h\in H, k\in K\}$

*$hk=kh$ for all $h\in H$ and $k\in K$

*$H\cap K=\{e\}$ (the identity).


I'm struggling with relating this to the $\gcd(m,n)=1$.
 A: You probably can start by trying $\langle\bar m\rangle \times \langle \bar n\rangle$.  Then since $\mathbb{Z}_{mn}$ is abelian, your criterion (2) is automatically fulfilled.  
Criteria (1) and (3) come from $lcm(m,n)=mn$ and $gcd(m,n)=1$ respectively.  So your assumption on $gcd$ is essential.  
Consider $\mathbb{Z}_4$ then you cannot write it as $\mathbb{Z}_2\times\mathbb{Z}_2$ ($\mathbb{Z}_4$ is cyclic, i.e. generated by an element $\mathbb{Z}_4=\langle 1\rangle$, while $\mathbb{Z}_2\times\mathbb{Z}_2$ is not; also $\mathbb{Z}_4$ has elements of order 4 (1 and 3), but $\mathbb{Z}_2\times\mathbb{Z}_2$ does not [all non-identity element has order 2]) (Compare with $\mathbb{Z}_6\cong\mathbb{Z}_2\times\mathbb{Z}_3$ by Chinese remainder theorem.  )
A: Since $m\mathbb{Z},mn\mathbb{Z}$ are normal subgroups of $\mathbb{Z}$ and $mn\mathbb{Z}\subset m\mathbb{Z}$, we have that $m\mathbb{Z}/mn\mathbb{Z}$ is a normal subgroup of $\mathbb{Z}/mn\mathbb{Z}$. Similarly, $n\mathbb{Z}/mn\mathbb{Z}$ is a normal subgroup of $\mathbb{Z}/mn\mathbb{Z}$. 
We show that $m\mathbb{Z}/mn\mathbb{Z}\cap n\mathbb{Z}/mn\mathbb{Z}=0$.
Let $ma+mn\mathbb{Z}=nb+mn\mathbb{Z}\in m\mathbb{Z}/mn\mathbb{Z}\cap n\mathbb{Z}/mn\mathbb{Z}$, where $a,b\in \mathbb{Z}$. Then $ma-nb\in mn\mathbb{Z}$. So $ma-nb=mnc$ for some $c\in \mathbb{Z}$. Hence $m|nb$. Since $(m,n)=1$, $m|b$. So $b=md$ for some $d\in \mathbb{Z}$. Hence $nb+mn\mathbb{Z}=mnd+mn\mathbb{Z}=0$. 
We show that $\mathbb{Z}/mn\mathbb{Z}=(m\mathbb{Z}/mn\mathbb{Z})(n\mathbb{Z}/mn\mathbb{Z})$. 
Since $(\mathbb{Z}/mn\mathbb{Z})/(m\mathbb{Z}/mn\mathbb{Z})\cong \mathbb{Z}/m\mathbb{Z}$, $|m\mathbb{Z}/mn\mathbb{Z}|=mn/m=n$. Similarly, $|n\mathbb{Z}/mn\mathbb{Z}|=m$. Then 
$$|(m\mathbb{Z}/mn\mathbb{Z})(n\mathbb{Z}/mn\mathbb{Z})|=|m\mathbb{Z}/mn\mathbb{Z}|\cdot|n\mathbb{Z}/mn\mathbb{Z}|/|m\mathbb{Z}/mn\mathbb{Z}\cap n\mathbb{Z}/mn\mathbb{Z}|=mn.$$
Since $|\mathbb{Z}/mn\mathbb{Z}|=mn$, we have $\mathbb{Z}/mn\mathbb{Z}=(m\mathbb{Z}/mn\mathbb{Z})(n\mathbb{Z}/mn\mathbb{Z})$. 
