How to show that the set $Z(G)=\{z \in G : \forall g \in G, z * g = g * z\}$ is a subgroup of $(G, *)$? I have shown that the neutral element is in $Z(G)$. I have also shown that the law is closed in $Z(G)$. 
However, I'm not sure how to prove that $\forall x \in Z(G), \exists x' \in Z(G)$ such that $x * x' = x' * x = e$, where $e$ is the neutral element.
I would like to post what I've tried so far, but everything I think of immediately leads to a dead end. How do I go about solving this? Also, we don't know if $G$ is a commutative group. Thank you.
 A: You're phrasing it as though you want to prove that $Z(G)$ is a group, not that it is a subgroup of $G$. This distinction is technically just fiction, but the thought process changes a bit: you know that $x'$ exists as an element of $G$. The only thing you need to show is that it is also contained in $Z(G)$.
In other words, you need to show that if $xg=gx$ for all $g\in G$, then $x'g=gx'$ for all $g\in G$ as well. One way to show this is by
$$
x'g=x'ge\\
=x'gxx'\\
=x'xgx'\\
=egx'=gx'
$$
A: If we're writing primes for inverses, then if $x \in Z(G)$ then $x'g = (g'x)' = (xg')'= gx'$ so $x' \in Z(G)$.
A: To see that it is closed:
let $a, b \in Z(G)$ and show that $ab \in Z(G)$. 
To do this, note that for any $g \in G$, we have that $ga=ag$ and $gb=bg$. In other words, since we have inverses:
$gag^{-1}=a$ and $gbg^{-1}=b$. 
So, $ab=gag^{-1}gbg^{-1}$. Now use associativity and deduce the result.
To see inverses: using the same trick as above, if $gag^{-1}=a$ for all $g \in G$, then $g^{-1}a^{-1}g=a^{-1}$ for  all $g^{-1} \in G$, which is equivalent to all $g \in G$. Note that $a^{-1}$ denotes the usual inverse of $a \in G$.
A: If $x\in Z(G)$, there is a $x'\in G$ such that $xx'=x'x=e$. So, the problem is to prove that $x'\in Z(G)$. Take $g\in G$. Now, take $g'\in G$ such that $gg'=g'g=e$. Then $xg'=g'x$ (since $x\in Z(G)$), but it follows from this that $gx'=x'g$, as we wanted to prove.
