Centralizer is closed in T0 topological group

Centralizer of one element
Let $$G$$ be a T0 topological group and $$g \in G$$. Then, $$C_G(g)$$ (the centralizer of $$g$$ in $$G$$) is a closed subset, and hence a closed subgroup, of $$G$$.

Centralizer of a subset
Let $$G$$ be a T0 topological group and $$S$$ be a subset of $$G$$. Then, the subgroup $$C_G(S)$$ (the centralizer of $$S$$ in $$G$$) is a closed subset, and hence a closed subgroup, of $$G$$.

Centralizer of one element
Consider the following map:

$$G \to G$$

given by:

$$x \mapsto [g,x]$$

This map is continuous, by the continuity of group operations, and hence the inverse image of a closed set is closed. $$C_G(g)$$ is precisely the inverse image of the identity element, and is hence a closed subgroup.

Centralizer of a subset
The centralizer of a subset is the intersection of the centralizers of all elements in it, each of which is closed, and an arbitrary intersection of closed subsets is closed.