I have the following question on an abstract algebra assignment:
Show that for m,n non-zero positive integers $$Z/mZ\times Z⁄nZ\cong Z⁄mnZ$$ if and only if m and n are relatively prime, that is, $\gcd(m,n)=1$.
Initially, I was going to use $Z/mZ$, $Z/nZ$, and $Z/nmZ$ with the operation fo addition, but thought it might be more interesting take them with multiplication. My draft solution is:
We will show that $Z⁄mZ\times Z⁄nZ\cong Z⁄mnZ$ if and only if $\gcd(m,n)=1$. We shall denote any quotient group of the form $Z⁄kZ$ as $Z_k$. Take $Z_m$, $Z_n$ and $Z_{mn}$ with the operation of multiplication. Define $\varphi$ as the function $$\varphi:Z_{mn}\to Z_m\times Z_n,\quad [x]_{mn}\to([x]_m,[x]_n).$$ We now show that $\varphi$ is a homomorphism.
$$φ([x]_{mn}[y]_{mn})=φ([xy]_{mn})=([xy]_m,[xy]_n)=([x]_m,[x]_n )([y]_m,[y]_n )=\varphi([x]_{mn})φ([y]_{mn}).$$ Hence $\varphi$ is a homomorphism.Now, the kernel of $\varphi$ is $$\text{ker}\varphi=\{x∈Z_{mn}\,|\,\varphi(x)=([e]_m,[e]_n)=([1]_m,[1]_n > )\}.$$ This gives the system of congruences $$x\equiv 1 \mod{m}$$ $$x\equiv 1 \mod{n}.$$ Solutions to the above system can be found using the Chinese Remainder Theorem, which shows that the number of solutions will be $\gcd(m,n)$. The solutions have the form $x_j=(j-1)\times\text{lcm}(m,n)+1$ for each $j\in\{1,...,\gcd(m,n)\}$. We shall now assess two cases for the possible values of $\gcd(m,n)$.
Case 1: In the case where $m$ and $n$ are relatively prime, we have $\gcd(m,n)=1$, so there is one solution to the system of congruences, and the solution is $$x_1=(1-1)\times\text{lcm}(m,n)+1=1.$$ Hence $\text{ker}\varphi=\{1\}=\{e\}$ and the kernel is trivial. It follows that $\varphi$ is injective. We also know that $|{Z_m×Z_n}|=|{Z_{mn}}|=mn$, so it must be the case that $\varphi$ is surjective. We have that $\varphi$ is bijective, and thus $\varphi$ is an isomorphism.
Case 2: In the case where $m$ and $n$ are not relatively prime, we have $\gcd(m,n)>1$, so there are multiple solutions to the system of congruences. It follows that the kernel of $\varphi$ is non-trivial, hence $\varphi$ is not injective, and thus $\varphi$ cannot be an isomorphism.
Therefore, we have shown that $Z⁄mZ\times Z⁄nZ$ is isomorphic to $Z⁄{mnZ}$ if and only if $m$ and $n$ are relatively prime.
I was hoping you could have a look over my solution and let me know if it's correct, or if not, where I've made mistakes.