[proofplan]
We split the [Lie algebra](/page/Lie%20Algebra) $\mathfrak g$ of $G$ into its central abelian part and its semisimple derived part using an $\operatorname{Ad}(G)$-invariant [inner product](/page/Inner%20Product). The central summand integrates inside $G$ to the identity component of the center, which is a torus, while the derived summand is integrated by a simply connected compact semisimple Lie group $K$. Multiplication gives a homomorphism from the product of these two factors onto $G$ whose differential is an isomorphism, so its kernel is discrete. Since the source is compact and connected, the kernel is finite and central, and centrality identifies it as a subgroup of $T^k\times Z(K)$.
[/proofplan]
[step:Split the compact Lie algebra into its central and semisimple summands]
Let $\mathfrak g:=\operatorname{Lie}(G)$ denote the Lie algebra of $G$, and let
\begin{align*}
\mathfrak z:=\mathfrak z(\mathfrak g):=\{X\in\mathfrak g:[X,Y]=0\text{ for every }Y\in\mathfrak g\}
\end{align*}
be its center. Let
\begin{align*}
\mathfrak s:=[\mathfrak g,\mathfrak g]
\end{align*}
denote the derived Lie subalgebra, the real linear span of all brackets $[X,Y]$ with $X,Y\in\mathfrak g$.
Because $G$ is compact, averaging any real inner product on $\mathfrak g$ over $G$ with respect to normalized Haar probability measure gives an $\operatorname{Ad}(G)$-invariant real inner product $(\cdot,\cdot)_{\mathfrak g}$ on $\mathfrak g$ (citing a result not yet in the wiki: Existence of Ad-invariant inner product on compact Lie algebra). Its infinitesimal invariance says that, for all $X,Y,Z\in\mathfrak g$,
\begin{align*}
([X,Y],Z)_{\mathfrak g}+(Y,[X,Z])_{\mathfrak g}=0.
\end{align*}
If $Z\in\mathfrak z$, then $[X,Z]=0$ for every $X\in\mathfrak g$, and therefore
\begin{align*}
([X,Y],Z)_{\mathfrak g}=0
\end{align*}
for every $X,Y\in\mathfrak g$. Hence $\mathfrak s\subseteq \mathfrak z^\perp$.
Conversely, if $U\in\mathfrak s^\perp$, then for every $X,Y\in\mathfrak g$,
\begin{align*}
([U,X],Y)_{\mathfrak g}=-(X,[U,Y])_{\mathfrak g}.
\end{align*}
Since $[U,Y]\in\mathfrak s$ and $X$ is arbitrary, this identity alone does not yet force $[U,X]=0$. We use the standard compact Lie algebra structure theorem instead: a compact Lie algebra decomposes orthogonally as the [direct sum](/page/Direct%20Sum) of its center and its derived semisimple ideal (citing a result not yet in the wiki: Compact Lie algebra decomposition into center plus semisimple derived algebra). Applied to $\mathfrak g$, it gives
\begin{align*}
\mathfrak g=\mathfrak z\oplus\mathfrak s
\end{align*}
as an orthogonal direct sum of ideals, and $\mathfrak s$ is a compact semisimple Lie algebra.
[guided]
We first isolate the two Lie-algebraic pieces that should become the two group factors. Let
\begin{align*}
\mathfrak g:=\operatorname{Lie}(G)
\end{align*}
denote the Lie algebra of $G$, let
\begin{align*}
\mathfrak z:=\mathfrak z(\mathfrak g):=\{X\in\mathfrak g:[X,Y]=0\text{ for every }Y\in\mathfrak g\}
\end{align*}
be its center, and let
\begin{align*}
\mathfrak s:=[\mathfrak g,\mathfrak g]
\end{align*}
denote the derived Lie subalgebra. The point is that a compact connected Lie group splits into a central abelian part and a semisimple commutator part, and these are the two Lie-algebraic pieces that will integrate to the factors $T^k$ and $K$.
To make that splitting precise, we use compactness. Averaging any real inner product on $\mathfrak g$ over $G$ with respect to normalized Haar probability measure gives an $\operatorname{Ad}(G)$-invariant real inner product $(\cdot,\cdot)_{\mathfrak g}$ on $\mathfrak g$ (citing a result not yet in the wiki: Existence of Ad-invariant inner product on compact Lie algebra). Infinitesimal invariance says that for all $X,Y,Z\in\mathfrak g$,
\begin{align*}
([X,Y],Z)_{\mathfrak g}+(Y,[X,Z])_{\mathfrak g}=0.
\end{align*}
Now take $Z\in\mathfrak z$. Then $[X,Z]=0$ for every $X\in\mathfrak g$, so for every $X,Y\in\mathfrak g$,
\begin{align*}
([X,Y],Z)_{\mathfrak g}=0.
\end{align*}
This means that every bracket is orthogonal to the center, and therefore
\begin{align*}
\mathfrak s\subseteq\mathfrak z^\perp.
\end{align*}
The reverse inclusion is not forced by the displayed orthogonality identity alone. Indeed, if $U\in\mathfrak s^\perp$, then for every $X,Y\in\mathfrak g$ we have
\begin{align*}
([U,X],Y)_{\mathfrak g}=-(X,[U,Y])_{\mathfrak g}.
\end{align*}
Since $[U,Y]\in\mathfrak s$ and $X$ is arbitrary, this relation by itself does not yet imply that $[U,X]=0$. At this point we invoke the standard compact Lie algebra decomposition theorem: a compact Lie algebra decomposes orthogonally as the direct sum of its center and its derived semisimple ideal (citing a result not yet in the wiki: Compact Lie algebra decomposition into center plus semisimple derived algebra). Applied to $\mathfrak g$, it gives
\begin{align*}
\mathfrak g=\mathfrak z\oplus\mathfrak s
\end{align*}
as an orthogonal direct sum of ideals, and $\mathfrak s=[\mathfrak g,\mathfrak g]$ is a compact semisimple Lie algebra. This is the Lie-algebraic splitting that the rest of the proof integrates to the global product decomposition.
[/guided]
[/step]
[step:Integrate the central summand as a torus inside $G$]
Let $Z(G)$ denote the center of $G$, and define
\begin{align*}
C:=Z(G)^\circ
\end{align*}
to be the identity component of $Z(G)$. Since $Z(G)$ is a closed subgroup of the compact Lie group $G$, the subgroup $C$ is a compact connected abelian Lie group. Therefore there exists an integer $k\geq 0$ and an isomorphism of Lie groups
\begin{align*}
\alpha:T^k\to C.
\end{align*}
Moreover,
\begin{align*}
\operatorname{Lie}(C)=\mathfrak z.
\end{align*}
Indeed, the Lie algebra of $Z(G)$ consists exactly of the elements $X\in\mathfrak g$ whose one-parameter subgroup $\exp_G(tX)$ commutes with every element of $G$; because $G$ is connected, this is equivalent to $[X,Y]=0$ for every $Y\in\mathfrak g$.
Thus the central summand $\mathfrak z$ is integrated by the compact torus $C\cong T^k$ inside $G$.
[/step]
[step:Integrate the semisimple summand by a simply connected compact group]
Since $\mathfrak s$ is a compact semisimple Lie algebra, the standard integration theorem for compact semisimple Lie algebras gives a simply connected compact semisimple Lie group $K$ with
\begin{align*}
\operatorname{Lie}(K)\cong\mathfrak s
\end{align*}
(citing a result not yet in the wiki: Existence and compactness of the simply connected Lie group integrating a compact semisimple Lie algebra). Fix a Lie algebra isomorphism
\begin{align*}
\theta:\operatorname{Lie}(K)\to\mathfrak s.
\end{align*}
Composing $\theta$ with the inclusion $\mathfrak s\hookrightarrow\mathfrak g$ gives a Lie algebra homomorphism from $\operatorname{Lie}(K)$ to $\mathfrak g$. Since $K$ is simply connected, [Lie's second theorem](/theorems/8809) integrates this Lie algebra homomorphism to a unique Lie [group homomorphism](/page/Group%20Homomorphism)
\begin{align*}
\beta:K\to G
\end{align*}
whose differential at the identity is the inclusion $\mathfrak s\hookrightarrow\mathfrak g$ under the identification $\theta$ (citing a result not yet in the wiki: Lie algebra homomorphisms from simply connected Lie groups integrate uniquely).
[/step]
[step:Construct the product homomorphism with isomorphic differential]
Define a map
\begin{align*}
\Phi:T^k\times K\to G
\end{align*}
by
\begin{align*}
\Phi(a,u):=\alpha(a)\beta(u)
\end{align*}
for $a\in T^k$ and $u\in K$. Since $\alpha(T^k)=C\subseteq Z(G)$, every element $\alpha(a)$ commutes with every element of $\beta(K)$. Therefore $\Phi$ is a Lie group homomorphism:
\begin{align*}
\Phi(a,u)\Phi(b,v)=\alpha(a)\beta(u)\alpha(b)\beta(v)=\alpha(ab)\beta(uv)=\Phi(ab,uv).
\end{align*}
Let $\mathfrak t_k:=\operatorname{Lie}(T^k)$. The differential of $\alpha$ at the identity is an isomorphism
\begin{align*}
d\alpha_e:\mathfrak t_k\to\mathfrak z.
\end{align*}
Using the product identification
\begin{align*}
\operatorname{Lie}(T^k\times K)=\mathfrak t_k\oplus\operatorname{Lie}(K),
\end{align*}
the differential of $\Phi$ at the identity is
\begin{align*}
d\Phi_{(e,e)}(A,B)=d\alpha_e(A)+\theta(B).
\end{align*}
Because
\begin{align*}
\mathfrak g=\mathfrak z\oplus\mathfrak s,
\end{align*}
this differential is a real-linear isomorphism from $\mathfrak t_k\oplus\operatorname{Lie}(K)$ onto $\mathfrak g$.
[/step]
[step:Show the product homomorphism is surjective]
Since $d\Phi_{(e,e)}$ is an isomorphism, the [inverse function theorem](/theorems/51) for smooth manifolds implies that $\Phi$ maps a neighbourhood of $(e,e)\in T^k\times K$ onto a neighbourhood of $e\in G$. Because $\Phi$ is a homomorphism, its image
\begin{align*}
H:=\Phi(T^k\times K)
\end{align*}
is a subgroup of $G$ containing a neighbourhood of $e$. Translating this neighbourhood by elements of $H$ shows that $H$ is open in $G$.
The subgroup $H$ is also closed because $T^k\times K$ is compact and $\Phi$ is continuous, so $H$ is compact in the [Hausdorff space](/page/Hausdorff%20Space) $G$. Since $G$ is connected and $H$ is a nonempty subset that is both open and closed, one has
\begin{align*}
H=G.
\end{align*}
Thus $\Phi$ is surjective.
[guided]
The differential computation tells us that $\Phi$ is locally an isomorphism near the identity, but we need a global statement: every element of $G$ must be a product of a central torus element and a semisimple element.
Since $d\Phi_{(e,e)}$ is an isomorphism, the inverse function theorem applies to the smooth map $\Phi:T^k\times K\to G$. It gives open neighbourhoods $U\subseteq T^k\times K$ of $(e,e)$ and $V\subseteq G$ of $e$ such that
\begin{align*}
\Phi(U)=V.
\end{align*}
In particular, the image
\begin{align*}
H:=\Phi(T^k\times K)
\end{align*}
contains an open neighbourhood of the identity element of $G$.
Because $\Phi$ is a group homomorphism, $H$ is a subgroup of $G$. If $h\in H$, then left multiplication by $h$ maps the neighbourhood $V$ homeomorphically onto the open neighbourhood $hV$ of $h$, and $hV\subseteq H$ because $H$ is a subgroup. Therefore every point of $H$ has an open neighbourhood contained in $H$, so $H$ is open in $G$.
We also need a closedness argument. The product $T^k\times K$ is compact because both factors are compact. Since $\Phi$ is continuous, the image $H$ is compact. The Lie group $G$ is Hausdorff, so compact subsets of $G$ are closed. Hence $H$ is closed in $G$.
Now use connectedness. The subset $H$ is nonempty because it contains $e$, and it is both open and closed in the [connected space](/page/Connected%20Space) $G$. Therefore
\begin{align*}
H=G.
\end{align*}
This proves that $\Phi$ is surjective.
[/guided]
[/step]
[step:Identify the kernel as a finite central subgroup]
Define
\begin{align*}
F:=\ker\Phi=\{(a,u)\in T^k\times K:\alpha(a)\beta(u)=e\}.
\end{align*}
Because $d\Phi_{(e,e)}$ is an isomorphism, the Lie algebra of $F$ is
\begin{align*}
\ker d\Phi_{(e,e)}=\{0\}.
\end{align*}
Hence $F$ is a discrete Lie subgroup of $T^k\times K$. Since $T^k\times K$ is compact, every discrete closed subgroup is finite (citing a result not yet in the wiki: Discrete subgroup of a compact group is finite). Thus $F$ is finite.
The kernel of a homomorphism is normal, so $F\trianglelefteq T^k\times K$. We now show it is central. For a fixed element $f\in F$, define the conjugation-orbit map
\begin{align*}
\gamma_f:T^k\times K\to F
\end{align*}
by
\begin{align*}
\gamma_f(x):=xfx^{-1}.
\end{align*}
The map $\gamma_f$ is continuous because multiplication and inversion are continuous. Its domain $T^k\times K$ is connected, while its codomain $F$ is discrete. Therefore $\gamma_f$ is constant. Since $\gamma_f(e,e)=f$, it follows that
\begin{align*}
xfx^{-1}=f
\end{align*}
for every $x\in T^k\times K$. Hence $F\leq Z(T^k\times K)$.
Finally,
\begin{align*}
Z(T^k\times K)=T^k\times Z(K),
\end{align*}
because $T^k$ is abelian and the center of a direct product is the product of the centers. Therefore
\begin{align*}
F\leq T^k\times Z(K).
\end{align*}
[/step]
[step:Pass to the quotient and obtain the required isomorphism]
Since $\Phi:T^k\times K\to G$ is a surjective Lie group homomorphism with kernel $F$, the [first isomorphism theorem](/theorems/791) for Lie groups gives an isomorphism of Lie groups
\begin{align*}
(T^k\times K)/F\cong G.
\end{align*}
The subgroup $F$ is finite and central in $T^k\times K$, and the previous step shows that
\begin{align*}
F\leq T^k\times Z(K).
\end{align*}
Thus $G$ has the asserted form
\begin{align*}
G\cong (T^k\times K)/F,
\end{align*}
where $K$ is simply connected, compact, and semisimple. This proves the theorem.
[/step]