Let $G$ be a connected Lie group and let $\mathfrak g$ its Lie algebra. We know that $$(*) \quad G \, \mbox{is a abelian if and only if } \mathfrak g \, \mbox{is abelian}.$$ I search a counterexample of $(*) $ when $G$ is not connected.
Thank you in advance
The Lie algebra of $O(2)$ is abelian, yet the Lie group $O(2)$ is non-abelian. We have $$ \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} \neq \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}. $$