[proofplan]
We first identify the identity component as a closed normal Lie subgroup: closedness and normality follow from general properties of identity components in topological groups, and the Lie subgroup structure follows from the closed subgroup theorem. Compactness then makes the component group finite because a compact Lie group has open connected components, so its component quotient is compact and discrete. Finally, conjugation by an element of $G$ restricts to an automorphism of $G^\circ$, and changing the element inside its [connected component](/page/Connected%20Component) changes this automorphism only by an inner automorphism of $G^\circ$. In the semisimple case, the standard root-datum description of automorphisms of compact connected semisimple Lie groups translates this canonical outer action into automorphisms of the appropriate root datum.
[/proofplan]
[step:Show that the identity component is a compact normal Lie subgroup]
Let $G^\circ$ denote the connected component of $e$ in the underlying [topological space](/page/Topological%20Space) of $G$. Since connected components are connected by definition, $G^\circ$ is connected.
We first show that $G^\circ$ is a subgroup. Let $m: G^\circ\times G^\circ \to G$ be the restriction of the continuous map $(x,y)\mapsto xy^{-1}$ on $G\times G$. The space $G^\circ\times G^\circ$ is connected, and $m(e,e)=e$. Hence $m(G^\circ\times G^\circ)$ is a connected subset of $G$ containing $e$, so it is contained in the connected component $G^\circ$. Therefore $xy^{-1}\in G^\circ$ for all $x,y\in G^\circ$, and $G^\circ\le G$.
The identity component of any topological space is closed when the space is locally connected; a Lie group is a smooth manifold and hence locally path-connected, so its connected components are open and closed. Thus $G^\circ$ is closed in $G$. Since $G$ is compact and $G^\circ$ is closed, $G^\circ$ is compact. By the closed subgroup theorem for Lie groups, the closed subgroup $G^\circ\le G$ is an embedded Lie subgroup.
It remains to prove normality. For each $g\in G$, define the conjugation homeomorphism $C_g:G\to G$ by $C_g(x):=gxg^{-1}$ for $x\in G$. The image $C_g(G^\circ)$ is connected because $C_g$ is continuous, and it contains $e$ because $C_g(e)=e$. Hence $C_g(G^\circ)\subset G^\circ$. Applying the same argument to $g^{-1}$ gives $C_{g^{-1}}(G^\circ)\subset G^\circ$, and applying $C_g$ to this inclusion gives $G^\circ\subset C_g(G^\circ)$. Therefore $C_g(G^\circ)=G^\circ$ for every $g\in G$, so $G^\circ\trianglelefteq G$.
[guided]
The first point is that the identity component is not merely a connected subset; in a topological group it is forced to be a subgroup. Define $m:G^\circ\times G^\circ\to G$ by $m(x,y):=xy^{-1}$ for $(x,y)\in G^\circ\times G^\circ$. The domain $G^\circ\times G^\circ$ is connected because it is a product of connected spaces, and $m$ is continuous because multiplication and inversion in a Lie group are continuous. Since $m(e,e)=e$, the image $m(G^\circ\times G^\circ)$ is a connected subset of $G$ containing $e$. By definition, $G^\circ$ is the largest connected subset of $G$ containing $e$, so
\begin{align*}
m(G^\circ\times G^\circ)\subset G^\circ.
\end{align*}
This says exactly that $xy^{-1}\in G^\circ$ whenever $x,y\in G^\circ$, which proves $G^\circ\le G$.
Next we use the manifold structure. A Lie group is locally path-connected, and in a locally [path-connected space](/page/Path-Connected%20Space) connected components are open; connected components are also closed as maximal connected subsets. Therefore $G^\circ$ is closed in $G$. Because $G$ is compact, every closed subset of $G$ is compact, so $G^\circ$ is compact. The closed subgroup theorem then applies: a closed subgroup of a Lie group carries a unique embedded Lie subgroup structure compatible with the inclusion. Thus $G^\circ$ is a compact connected Lie subgroup.
Finally we verify normality. Fix $g\in G$ and define $C_g:G\to G$ by $C_g(x):=gxg^{-1}$ for $x\in G$. This map is a homeomorphism, with inverse $C_{g^{-1}}$. Since $G^\circ$ is connected, its image $C_g(G^\circ)$ is connected. Since $C_g(e)=e$, this connected image contains the identity. Therefore
\begin{align*}
C_g(G^\circ)\subset G^\circ.
\end{align*}
Applying the same inclusion to $g^{-1}$ gives
\begin{align*}
C_{g^{-1}}(G^\circ)\subset G^\circ.
\end{align*}
Applying $C_g$ to both sides yields
\begin{align*}
G^\circ\subset C_g(G^\circ).
\end{align*}
Combining both inclusions gives $C_g(G^\circ)=G^\circ$. Since this holds for every $g\in G$, the subgroup $G^\circ$ is normal in $G$.
[/guided]
[/step]
[step:Prove that the component group is finite]
Since $G$ is a Lie group, its connected components are open. Therefore the [quotient group](/theorems/790) $\pi_0(G):=G/G^\circ$ has the discrete [quotient topology](/page/Quotient%20Topology). Let $q: G\to \pi_0(G)$, $g\mapsto gG^\circ$, be the quotient map. Since $G$ is compact and $q$ is continuous, $\pi_0(G)$ is compact. A compact discrete topological space is finite: the [open cover](/page/Open%20Cover) by singleton sets has a [finite subcover](/page/Finite%20Subcover). Hence $\pi_0(G)$ is a finite group.
[/step]
[step:Restrict conjugation to automorphisms of the identity component]
For each $g\in G$, define $c_g:G^\circ\to G^\circ$ by $c_g(x):=gxg^{-1}$ for $x\in G^\circ$. This map is well-defined because $G^\circ\trianglelefteq G$. It is smooth because the conjugation map $C_g:G\to G$ is smooth and $G^\circ\le G$ is an embedded Lie subgroup. It is a Lie [group homomorphism](/page/Group%20Homomorphism), since for all $x,y\in G^\circ$,
\begin{align*}
c_g(xy)=gxyg^{-1}=(gxg^{-1})(gyg^{-1})=c_g(x)c_g(y).
\end{align*}
Its inverse is the smooth map $c_{g^{-1}}$, so $c_g\in\operatorname{Aut}(G^\circ)$.
Let
\begin{align*}
\operatorname{Inn}(G^\circ):=\{c_a:a\in G^\circ\}\le \operatorname{Aut}(G^\circ)
\end{align*}
be the inner automorphism group of $G^\circ$. This subgroup is normal in $\operatorname{Aut}(G^\circ)$ because, for every $\varphi\in\operatorname{Aut}(G^\circ)$ and every $a\in G^\circ$, one has $\varphi\circ c_a\circ \varphi^{-1}=c_{\varphi(a)}$. Let
\begin{align*}
\operatorname{Out}(G^\circ):=\operatorname{Aut}(G^\circ)/\operatorname{Inn}(G^\circ)
\end{align*}
be its outer automorphism group.
[/step]
[step:Show that the outer automorphism depends only on the connected component]
Define a map $\Theta:\pi_0(G)\to \operatorname{Out}(G^\circ)$ by $\Theta(gG^\circ):=c_g\operatorname{Inn}(G^\circ)$. We prove that this is well-defined. Suppose $g_1,g_2\in G$ represent the same element of $\pi_0(G)$. Then there exists $a\in G^\circ$ such that $g_2=g_1a$. For every $x\in G^\circ$,
\begin{align*}
c_{g_2}(x)=(g_1a)x(g_1a)^{-1}=g_1(axa^{-1})g_1^{-1}=c_{g_1}(c_a(x))
\end{align*}
Thus
\begin{align*}
c_{g_2}=c_{g_1}\circ c_a
\end{align*}
Since $c_a\in\operatorname{Inn}(G^\circ)$, the automorphisms $c_{g_1}$ and $c_{g_2}$ determine the same coset in $\operatorname{Out}(G^\circ)$. Hence $\Theta$ is well-defined.
Now let $g,h\in G$. For every $x\in G^\circ$,
\begin{align*}
c_{gh}(x)=(gh)x(gh)^{-1}=g(hxh^{-1})g^{-1}=c_g(c_h(x))
\end{align*}
Therefore
\begin{align*}
c_{gh}=c_g\circ c_h
\end{align*}
Passing to cosets in $\operatorname{Out}(G^\circ)$ gives
\begin{align*}
\Theta((gG^\circ)(hG^\circ))=\Theta(gG^\circ)\Theta(hG^\circ)
\end{align*}
So $\Theta$ is a group homomorphism.
[/step]
[step:Interpret the outer action through the root datum in the semisimple case]
Assume now that $G^\circ$ is semisimple. Let $T\le G^\circ$ be a maximal torus, let $\mathfrak g^\circ$ be the [Lie algebra](/page/Lie%20Algebra) of $G^\circ$, and define its complexification by
\begin{align*}
\mathfrak g^\circ_{\mathbb C}:=\mathfrak g^\circ\otimes_{\mathbb R}\mathbb C.
\end{align*}
Define the character lattice by
\begin{align*}
X^*(T):=\operatorname{Hom}_{\mathrm{cts}}(T,S^1)
\end{align*}
and define the cocharacter lattice by
\begin{align*}
X_*(T):=\operatorname{Hom}_{\mathrm{cts}}(S^1,T).
\end{align*}
Let $R\subset X^*(T)$ denote the root system of $\mathfrak g^\circ_{\mathbb C}$ with respect to $T$, and let $R^\vee\subset X_*(T)$ denote the corresponding coroot system. The root datum of $G^\circ$ with respect to $T$ is the quadruple
\begin{align*}
(X^*(T),R,X_*(T),R^\vee).
\end{align*}
By the [[Conjugacy Theorem for Maximal Tori](/theorems/9720)][citetheorem:9720], every automorphism of $G^\circ$ carries $T$ to a maximal torus, and after composing with an inner automorphism of $G^\circ$ its effect may be read on the fixed torus $T$. The induced automorphism of $T$ preserves $X^*(T)$, $X_*(T)$, $R$, and $R^\vee$; equivalently, it preserves the root datum of $G^\circ$.
The precise standard input is the automorphism form of root-datum classification for compact connected semisimple groups. Applied to the compact connected semisimple Lie group $G^\circ$ with maximal torus $T$ and positive root system $R^+$, it gives a natural identification
\begin{align*}
\operatorname{Out}(G^\circ)\cong \operatorname{Aut}(\mathcal R_b(G^\circ,T,R^+)).
\end{align*}
Equivalently, automorphisms preserving $T$ act on the root datum, and two such automorphisms determine the same outer automorphism of $G^\circ$ precisely when their root-datum actions differ by the Weyl-[group action](/page/Group%20Action) of $W(G^\circ,T)$. After choosing a positive root system, each Weyl orbit of chambers has a unique representative preserving the chosen positive chamber, so automorphisms of the root datum modulo the Weyl group are equivalently automorphisms of the corresponding based root datum. The classification statement in [[Classification by Root Data](/theorems/9751)][citetheorem:9751] applies because $G^\circ$ is compact, connected, and semisimple.
[guided]
The point requiring care is the quotient by inner automorphisms. An arbitrary automorphism $\varphi\in\operatorname{Aut}(G^\circ)$ need not preserve the chosen maximal torus $T$. However $\varphi(T)$ is again a maximal torus, and the [Conjugacy Theorem for Maximal Tori][citetheorem:9720] gives an element $a\in G^\circ$ such that
\begin{align*}
a\varphi(T)a^{-1}=T.
\end{align*}
Therefore the automorphism $c_a\circ\varphi$ preserves $T$. Since $c_a$ is inner, $\varphi$ and $c_a\circ\varphi$ define the same element of $\operatorname{Out}(G^\circ)$.
Once an automorphism preserves $T$, it acts on continuous characters by precomposition and on cocharacters by composition. These actions preserve the roots and coroots because the differential of a Lie group automorphism carries the root-space decomposition of $\mathfrak g^\circ_{\mathbb C}$ relative to $T$ to the corresponding root-space decomposition relative to $T$. Hence it gives an automorphism of
\begin{align*}
(X^*(T),R,X_*(T),R^\vee).
\end{align*}
What ambiguity remains? Define the normalizer of $T$ in $G^\circ$ by
\begin{align*}
N_{G^\circ}(T):=\{a\in G^\circ:aTa^{-1}=T\}.
\end{align*}
If an inner automorphism also preserves $T$, then it is represented on $T$ by conjugation by an element of $N_{G^\circ}(T)$, and its effect on the root datum is the Weyl-group action of $W(G^\circ,T):=N_{G^\circ}(T)/T$. Thus passing from automorphisms to outer automorphisms is exactly the operation of quotienting root-datum automorphisms by this Weyl ambiguity.
Choosing a positive root system removes the Weyl ambiguity in the standard way: each Weyl orbit of chambers has a unique representative carrying the chosen positive chamber to itself. Thus root-datum automorphisms modulo the Weyl group are the same data as automorphisms of the based root datum. The semisimple root-datum classification in [Classification by Root Data][citetheorem:9751] applies because $G^\circ$ is compact, connected, and semisimple, and it gives the precise identification
\begin{align*}
\operatorname{Out}(G^\circ)\cong \operatorname{Aut}(\mathcal R_b(G^\circ,T,R^+)).
\end{align*}
In this identification, inner automorphisms account exactly for the Weyl-group ambiguity on the unbased root datum, while based root-datum automorphisms supply representatives of the remaining outer automorphism classes.
[/guided]
Therefore the homomorphism $\Theta:\pi_0(G)\to \operatorname{Out}(G^\circ)$ is recorded by a homomorphism from $\pi_0(G)$ to the automorphism group of the based root datum, equivalently to root-datum automorphisms modulo the Weyl group.
In these terms, after choosing positive roots, the based root-datum automorphisms are Dynkin diagram automorphisms subject to preservation of the relevant character and cocharacter lattices. For a non-simply connected or non-adjoint semisimple group, this lattice condition is exactly the central quotient data: only those diagram automorphisms compatible with the chosen finite central quotient descend to automorphisms of $G^\circ$. This proves the asserted semisimple interpretation.
[/step]