Showing $\mathbb Z_4 \times \mathbb Z_2$ to be a group I've been posed the question:

Let $P$ be the pairs $(a,b)$ where $a \in \Bbb Z_4$, and $b \in \Bbb Z_2$
An operation, $*$, is defined by: $$(a,b)*(c,d)=(a+c  \pmod 4, b+d \pmod 2)$$ for all $(a,c),(b,d)\in P$

How do I show that this is a group?
I know how to do this with multiplication tables by working through the axioms but I don't know how to apply these to this question, nor if that's the best approach
 A: Associativity follows from that of $(\Bbb Z_4, +_4)$ and of $(\Bbb Z_2, +_2)$.
The identity is $(0\pmod 4, 0\pmod 2)$. (Why?)
The inverse of $(a,b)$ under $*$ is given by $(-a, -b)$ since $$\begin{align}(a,b)*(-a, -b)&=(a+(-a)\pmod 4, b+(-b)\pmod 2)\\
&=(0\pmod 4, 0\pmod 2).
\end{align}$$
Closure follows from the closure of $\Bbb Z_4$ under $+_4$ and of $\Bbb Z_2$ under $+_2$.
A: In general, the group $G\times H$ (for groups $G,H$) with elements in the cartesian product (the set) of $G$ and $H$, and the group operation defined component-wise: The multiplication of $(g_1,h_1),(g_2,h_2)\in G\times H$ being defined by $(g_1,h_1)(g_2,h_2)=(g_1g_2,h_1h_2)$ always gives a group. This is because the associativity follows from the group structure of $G$ and $H$, and the identity is $(1_G,1_H)$. You can check the other group axioms, which all follow from the fact that $G,H$ are groups. The group $G\times H$ is called the direct product of $G$ and $H$.
In particular, you just need that $\mathbb Z_4$ and $\mathbb Z_2$ to be groups to prove your conclusion in this case.
