Induced Group Product is Homomorphism iff Commutative

Theorem
Let $\left({G, \circ}\right)$ be a group.

Let $H_1, H_2$ be subgroups of $G$.

Let $\phi: H_1 \times H_2 \to G$ be defined such that $\forall \left({h_1, h_2}\right) \in H_1 \times H_2: \phi \left({\left({h_1, h_2}\right)}\right) = h_1 \circ h_2$.

Then $\phi$ is a homomorphism iff every element of $H_1$ commutes with every element of $H_2$.

Corollary
Let $\phi: G \times G \to G$ be defined such that $\forall a, b \in G: \phi \left({\left({a, b}\right)}\right) = a \circ b$.

Then $\phi$ is a homomorphism iff $G$ is abelian.

Proof
We have $\left({h_1, h_2}\right) \circ \left({k_1, k_2}\right) = \left({h_1 \circ k_1, h_2 \circ k_2}\right)$.


 * Suppose $\phi$ is a homomorphism. Then:

This follows whatever $k_1$ and $h_2$ are, and so in order for $\phi$ to be a homomorphism, every element of $H_1$ must commute with every element of $H_2$.


 * Now suppose that every element of $H_1$ commutes with every element of $H_2$.

Let $\left({h_1, h_2}\right), \left({k_1, k_2}\right) \in H_1 \times H_2$. Then:

Thus $\phi$ is shown to be a homomorphism.

Proof of Corollary
$G$ is a Subgroup of Itself, so replace $H_1$ and $H_2$ with $G$ in the main result.