We note that we can partition the set of integers $\mathbb Z $ into the set of odd integers and even integers, specifically, we have $$\mathbb Z = 2\mathbb Z \cup (2\mathbb Z +1),$$ where $2\mathbb Z = \{ 2n: n\in \mathbb Z \}$ and $2\mathbb Z +1 = \{ 2n+1: n\in \mathbb Z \}.$ Let's put this fact in other words, we can write $\mathbb Z $ as a union of two sets, let's say $A=\{ 2n: n\in \mathbb Z \}$ and $B=\{ 2n+1: n\in \mathbb Z \},$ with parameter is running through $\mathbb Z.$
I'm curious to know how this fact goes in higher dimensions, in other words, what happens if we replace $\mathbb Z \times \mathbb Z$ in above observations?
Can we write $\mathbb Z \times \mathbb Z$ as union of two sets (or more sets) and each sets the parameter is running through $\mathbb Z \times \mathbb Z$?
Side note: (1) Roughly speaking this kind of trick is useful to partition the series in higher dimension in many situations. (2)$\mathbb Z \times \mathbb Z = (A\cup B) \times (A\cup B).$
The natural partitions of $\mathbb Z^n$ along this line are given by the cosets of a subgroup of finite index, that is, a subgroup generated by $n$ linearly independent vectors.
The number of classes is exactly the absolute value of the determinant of the matrix whose columns are the coordinate of the generators.
For example, take $v_1=(1,2)$ and $v_2=(4,1)$. Then the subgroup $H=\mathbb Z v_1 + \mathbb Z v_2$ has index $7$, which corresponds to the seven lattice points inside the parallelogram defined by $0, v_1, v_2, v_1+v_2$. If these points are $p_1, \dots, p_7$, then $\mathbb Z^2 = (p_1 + H) \cup \cdots \cup (p_7 + H)$.