Prove $H \times G$ is commutative iff $H, G$ are commutative This is another proof question I am asking about, can someone give me tips on how to answer these questions?
My question says:
"Let $H,G$ be arbitrary groups. Prove that $H \times G$ is commutative (abelian) if and only if both groups $H, G$ are commutative"
I don't get how to prove that $H $ and $G$ are commutative in general. Seeing as they are arbitrary groups, they can be anything right? How do I go about trying to prove this?

Hints:


*

*The direct product $H\times K$ is defined so that it contains subgroups (isomorphic to) $H$ and $K$, and that all elements of the first subgroup commute with all elements of the second one, and the union of these subgroups generates the whole group.

*For any set of elements that all commute among each other, all products of such elements also commute among each other.

*Any subgroup of an Abelian group is Abelian
