Solution (source code)

= Solution

Closure of the componentwise operation follows from closure in each factor. For three pairs, <associativity> holds coordinatewise:
$$
\bigl((g_1,g_2)(h_1,h_2)\bigr)(k_1,k_2)
=\bigl((g_1h_1)k_1,(g_2h_2)k_2\bigr)
=\bigl(g_1(h_1k_1),g_2(h_2k_2)\bigr).
$$
The <identity element> is $(e_1,e_2)$ and the <inverse element> of $(g_1,g_2)$ is $(g_1^{-1},g_2^{-1})$. These verify all <group axioms> for the <direct product of groups>. Counting independent choices gives
$$
\boxed{|G_1\times G_2|=|G_1|\,|G_2|.}
$$
The subset $N=G_1\times\{e_2\}$ contains the identity and is closed under products and inverses, so it is a <subgroup>. For any $x=(a,b)$ in the product and $(g,e_2)\in N$,
$$
x(g,e_2)x^{-1}=(aga^{-1},be_2b^{-1})=(aga^{-1},e_2)\in N.
$$
Conjugation by $x^{-1}$ gives the reverse inclusion, and hence
$$
\boxed{xNx^{-1}=N,\qquad N\mathrel{\trianglelefteq}G_1\times G_2.}
$$
This is the definition of a <normal subgroup>.