Direct product of abelian groups

Solution 1:

The main point in this problem is that two elements of $$G_1 \times \cdots \times G_n$$ are equal iff their components are equal. You can use this fact for showing both directions. In fact since the operation on $$G_1 \times \cdots \times G_n$$ is made component-wise. So $$(a_1, \dots, a_n) \cdot (b_1, \dots, b_n) = (b_1, \dots, b_n) \cdot (a_1, \dots, a_n)$$ then $$(a_1b_1, \dots, a_nb_n) = (b_1a_1, \dots, b_na_n)$$ and so $$\forall ~i, ~a_ib_i=b_ia_i$$ and vice versa.

Solution 2:

HINT: $G_1 \times \cdots \times G_n \rightarrow G_i: (g_1,\ldots,g_n) \mapsto g_i$ is a homomorphism and the homomorphic image of an abelian group is abelian.