Show that the center of a direct product is the direct product of centers:
Z(G_1 x G_2 x ... x G_n)=Z(G_1) x Z(G_2) x ... x Z(G_n).
Deduce that a direct product of groups is abelian if and only if each of the factors is abelian.

I know that G_1 x G_2 x ... x G_n is isomorphic to G_1G_2...G_n.