If we let $G_1,...,G_n$ be groups,
how can we prove that the direct product $G_1 \times .... \times G_n$ is abelian if and only if each of $G_1,...,G_n$ is abelian.
Please if someone can help and guide with this question...
Keep in mind that two elements of $G_1 \times .... \times G_n$ are equal if and only if all of their components are equal, and that the operation on $G_1 \times .... \times G_n$ is made componentwise.
So $(a_1, \dots, a_n) \cdot (b_1, \dots, b_n) = (b_1, \dots, b_n) \cdot (a_1, \dots, a_n)$ if and only if...
The forward direction should be clear. For the reverse direction, suppose there is some $G_i$ which is not abelian, meaning that there are $a,b\in G_i$ such that $ab\neq ba.$
Now consider $xy$ and $yx$ where $x= (1,1,\cdots, a, \cdots, 1), y= (1,1,\cdots, b, \cdots, 1) \in G_1 \times G_2 \cdots \times G_n$. What does this say about the abelian-ness of the direct product?