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?

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.
