Constructing an isomorphism to show two groups are isomorphic For each $n\geq 2$, consider $C_n = \{ (a,b) \in \mathbb{Z}^2 : a \equiv b \mod \: n\}$. I want to show that $C_n$ is isomorphic to $\mathbb{Z} \times \mathbb{Z}$. To do this, I know I need to construct a bijection that preserves products as in the definition of an isomorphism. I’m at a loss for how to construct such a bijection, because I don’t see how any function I can think of can be both injective and surjective. Any guidance?
 A: The bijection $f:C_n\to\mathbb Z^2$ may be constructed as follows:
$$f(a,b)=\left(a,\frac{b-a}n\right)$$
Its inverse is
$$f^{-1}(a,b)=(a,bn+a)$$
$f$ is a homomorphism because
$$f(a,b)+f(c,d)=\left(a,\frac{b-a}n\right)+\left(c,\frac{d-c}n\right)=\left(a+c,\frac{(b+d)-(a+c)}n\right)=f(a+c,b+d)$$
$f$ is an injection: suppose $f(a,b)=f(a',b')=(c,d)$. Then $a=a'$, and manipulating $\frac{b-a}n=\frac{b'-a'}n$ we get $b=b'$ too. $f$ is surjective because of the inverse function demonstrated above. Thus $f$ is a bijection.
A: Look at the problem from a slightly different perspective: $(a,b)\in C_n \iff n\mid(a-b)\iff b=a+nk$ for some $k\ge0$.
This means that the pair $(a,k)$ (where $k=\frac{a-b}{n}$) defines a bijection from $\mathbb{Z}^2$ to $C_n$ and it is not difficult to prove that it is also an isomorphism: indeed the map $f(a,k)=(a,a+kn)$ is a homomorphism since $f((a,k)+(c,h))=f(a+c,k+h)=(a+c,a+kn+c+hn)=(a+c,a+c+kn+hn)=(a,a+kn)+(c,c+hn)=f(a,k)+f(c,h)$.
Edit:Just recall that when you consider the (finite) cartesian product of groups the operation is defined componetwise.
