Centralizer of one element on a compact connected Lie group Exercise 16.2 from Daniel Bump - Lie Groups.
Let $G$ be a compact connected Lie group and let $g\in G$. Show that
the centralizer $C_{G(g)}$ of $g$ is connected.
I have some problems verifying this, i have tried to use that in that case the exponential map is surjective, and things of maximal torus, but i have not achieved it, i would appreciate some answer.
 A: This is not true in general. Consider $SO(3)$ and the matrix $$ \begin{bmatrix} 
  1 & 0 & 0\\ 0 & -1 & 0 \\ 0&0&-1
\end{bmatrix} $$
Then $C_G(g)=\left\{ \begin{bmatrix} 
  a & 0 & 0\\ 0 & \pm \cos \theta & \mp \sin \theta \\ 0&\sin\theta&\cos\theta
\end{bmatrix}: a\in \{\pm 1\}, \theta\in \mathbb{R}  \right\}   $.
We can fix the problem statement by adding that $G$ is simply connected. Then we can argue using a long exact sequence in homotopy groups.
A: Observe that $C(g)=C(<g>)$ i.e the centralizer of an element is the centralizer of the subgroup generated by it. Next observe that $C(H)=C(\overline{H})$ for any subgroup of $H\subset G$. This means that the centralizer of $g$ is equal to the centralizer of $\overline{<g>}$. 
$\overline{<g>}$ is a compact abelian subgroup of $G$. If it's connected then its a torus. For a torus we have the follwing

Theorem 16.6( Daniel Bump - Lie Groups.). Let $G$ be a compact connected Lie group and $S \subset G$ a torus
  (not necessarily maximal). Then the centralizer $C_{G}(S)$ is a closed connected
  Lie subgroup of $G$.

Every element of a compact connected lie group is contained in a maximal torus. And for a torus we have:

Corollary 15.1( Daniel Bump - Lie Groups.). Each compact torus $T$ has a generator. Indeed, generators are dense in $T$ .

This means that the assertion is true for a dense set in $G$. 
In general I dont think its true. A counter example will need to be a an element with a discrete closure subgroup. There are no counter examples in the unitary group as elements commute if they have the same eigenspaces. We can diagonelize a matrix and degenerate it’s eagenvalues to 1 while preserving the eigenspaces. This means the assertion is true in the unitary group.
