Suppose $G$ is a compact Lie group, we know the center of $G$ is a compact Abelian subgroup, so it must be isomorphic to a direct product of finite abelian subgroup and a torus.
Now suppose the center is not finite (i.e the torus part of the center is not trivial), then can we split the torus out? For example, if the torus part is $S^1$, can we claim $G$ is a direct product of $S^1$ and some subgroup $H$ of $G$. I think this is true, but I am not sure.
If this is not true, can anyone provide me with an counterexample? Thank you!