Theorem: If $n,m > 1$ are coprime numbers, then: $\Bbb{Z}_{nm}\cong \Bbb{Z}_n \oplus \Bbb{Z}_m$ (a ring isomorphism)

Remark: For example, $\Bbb{Z}{15}\cong \Bbb{Z}3 \oplus \Bbb{Z}5$, but $\Bbb{Z}{120}\cong \Bbb{Z}{10} \oplus \Bbb{Z}{12}$, as 10 and 12 are not coprime

Proof: Suppose that $n,m>1$ are coprime.

Define a function:

$f:\Bbb{Z}{nm} \rightarrow \Bbb{Z}n \oplus \Bbb{Z}m$ by $f(a) = (a{(mod\ n)}, a{(mod\ m)})\ \forall\ a\in \Bbb{Z}{nm}$

This is a ring homomorphism:

$f(1)=1,\ f(a+b)=f(a)+f(b),\ f(ab)=f(a)f(b)$ Exercise: Verify

Proof: Let us show that f is surjective

Pick $s \in \Bbb{Z}_n,\ t \in \Bbb{Z}m$. We aim to show that $(s,t)\in Im(f),$ namely, that there is $x\in \Bbb{Z}{nm}$

For which $f(x)=(s,t)=(x_{mod\ n}, x_{mod\ m})$

Namely: $\begin{matrix} x=s(mod\ n)\\ x=t(mod\ m) \end{matrix}$

Since $n, m$ are coprime, by the Euclidean Algorithm. There is a linear combination:

$un+vm=1\ |\ u,v\in \Bbb{Z}$

(For example, 5,7 are coprime we have a linear combination $3\cdot 5+(-2)\cdot 7 = 1$)

Consider $x=t\cdot un+s\cdot vm \in \Bbb{Z}$, (consider $x_{(mod\ nm)}$)

We claim that $x\equiv s_{(mod\ n)},\ x\equiv t_{(mod\ m)}$ $x_{(mod n)}\equiv tun+svm_{(mod\ n)}$ ← $tun=0$

$\equiv svm_{(mod\ n)} \equiv s\cdot (1-un){(mod\ n)} \equiv s-sun{(mod\ n)}$ ← $sun=0$

$\equiv s_{(mod\ n)}$ $x_{(mod m)}\equiv tun+svm_{(mod\ m)}$ ← $svm=0$

$\equiv tun_{(mod\ m)} \equiv t\cdot (1-vm){(mod\ m)} \equiv t-tvm{(mod\ m)}$ ← $tvm=0$

$\equiv t_{(mod\ m)}$