Associativity of Group Direct Product

Theorem
The group direct product $G \times \left({H \times K}\right)$ is isomorphic to $\left({G \times H}\right) \times K$.

Proof
Let $G, H, K$ be groups.

The mapping $\theta: G \times \left({H \times K}\right) \to \left({G \times H}\right) \times K$ defined as:

$\forall g \in G, h \in H, k \in K: \theta \left({\left({g, \left({h, k}\right)}\right)}\right) = \left({\left({g, h}\right), k}\right)$

is to be shown to be a group homomorphism, and that $\theta$ is bijective, as follows:

Injective
Let $\theta \left({\left({g_1, \left({h_1, k_1}\right)}\right)}\right) = \theta \left({\left({g_2, \left({h_2, k_2}\right)}\right)}\right)$.

By the definition of $\theta$, $\left({\left({g_1, h_1}\right), k_1}\right) = \left({\left({g_2, h_2}\right), k_2}\right)$.

By the definition of ordered pairs, $\left({g_1, h_1}\right) = \left({g_2, h_2}\right), k_1 = k_2$.

And so on: $g_1 = g_2, h_1 = h_2$

Thus $\left({g_1, \left({h_1, k_1}\right)}\right) = \left({g_2, \left({h_2, k_2}\right)}\right)$ and $\theta$ is seen to be injective.

Surjective
If $\left({\left({g, h}\right), k}\right) \in \left({G \times H}\right) \times K$, then $g \in G, h \in H, k \in K$.

Thus $\left({g, \left({h, k}\right)}\right) \in G \times \left({H \times K}\right)$ and $\theta \left({\left({g, \left({h, k}\right)}\right)}\right) = \left({\left({g, h}\right), k}\right)$ and $\theta$ is seen to be surjective.

Group Homomorphism
Now let $\left({g_1, \left({h_1, k_1}\right)}\right), \left({g_2, \left({h_2, k_2}\right)}\right) \in G \times \left({H \times K}\right)$. Then:

thus showing that $\theta$ is a homomorphism.

The result follows.