Claim. The center of $(G_1\times G_2,\star)$ is $Z(G_1)\times Z(G_2)$, where $Z(G_i)$ is the center of $G_i$, for $i=1,2$.
I'm trying to figure out a proof for this and got myself a little bit confused. My thought process was to show that if the two groups $G_1$ and $G_2$ are Abelian groups that the direct product of these two Abelian groups is also Abelian, then the claim would follow by the result of them being Abelian.
If that is the correct way to approach this proof, what does this then say about the center of the direct product if they happened to not be Abelian groups? Is that possible? Does it mean there only exists a center if it's Abelian?
Sorry if my question is kind of stupid. Just trying to understand the problem and how to proceed.