# Need help showing this map is well-defined.

Let $g: \mathbb{Z}_m \times \mathbb{Z}_n \to \mathbb{Z}_d$, where $d=\gcd(m,n)$. If $g: (a,b) \mapsto ab \bmod d$. Then this is supposedly well defined. I want to know how to show this mathematically, by equating two tuples together, but also need to know what role does the gcd play in making this map well defined. Thank you for your answer.

• Note $a \equiv a' \pmod m \implies a \equiv a' \pmod d$ – steven gregory Oct 19 '16 at 17:23

You need to show that $(a,b)\equiv(a',b')$ implies $ab\bmod d=a'b'\bmod d$. Here, $(a,b)\equiv(a',b')$ means that $a\equiv a'\pmod m$ and $b\equiv b'\pmod n$.
Hint $\$ If $\ d\mid m,n,\$ e.g. if $\, d = \gcd(m,n),\$ then
\qquad\ \begin{align} A&\equiv a\pmod m\\ B&\equiv b\pmod n\end{align}\,\Rightarrow\, \begin{align} A&\equiv a\pmod d\\ B&\equiv b\pmod d\end{align}\,\Rightarrow\ AB\equiv ab\pmod d
The first arrow follows by transitivity of "divides" e.g. $\ d\mid m\mid A\!-\!a\,\Rightarrow\, d\mid A\!-\!a$