Proof

We prove that the centralizer of a set X is a subgroup. The other cases are left to the reader.

Hence the centralizer of X is a subgroup of G.