Let $G = \mathbb Z_6 \times \mathbb Z_4$, and find $[G:H]$ for:
a) $H = \{0\} \times \mathbb Z_4$
b) $H = \langle 2\rangle \times \langle 2\rangle$
Let $G = \mathbb Z_6 \times \mathbb Z_4$, and find $[G:H]$ for:
a) $H = \{0\} \times \mathbb Z_4$
b) $H = \langle 2\rangle \times \langle 2\rangle$
Determine the order of $G: \,|G|$, and the orders of $H$ in each case; then you can easily calculate the index of $H$ in $G$: $$[G:H] = \dfrac{|G|}{|H|}$$
Now, since the order of a group is the number of elements it contains, and the order of the direct product of two sets is given by the product of the orders: $$|G| = |\mathbb Z_6\times \mathbb Z_4| = |\{0, 1, 2, 3, 4, 5\}| \times |\{0, 1, 2, 3\}| = 6 \times 4 = 24$$ and so there are $24$ ordered pairs in $G$.
As for the number of elements of $H$, given
a. $H = \{0\} \times Z_4 = \{(0, 0), (0, 1), (0, 2), (0, 3)\}$. So the order of $H$ in this case is equal to $4 = 1\times 4$.
b. $H = \langle 2\rangle \times \langle 2\rangle = \{(0, 0), (0, 1), (1, 0), (1, 1)\}$. So the order of $H$ in this case is also equal to $4$.
Relevant facts: $$|\mathbb{Z}_n|=n\\ |G\times G'|=|G|\cdot |G'| \\ [G\: :\: H]\cdot|H|=|G|\quad\mbox{(Lagrange's Theorem)}$$