\section{The Continuous Functional Calculus}
\label{section:continuous-functional-calculus}

\begin{theorem}[Spectral Theorem for $C^*$-Algebras]
\label{theorem:spectral-c-star}
    Let $A$ be a unital $C^*$-algebra and $x \in A$ be normal, then the mapping
    \[
    \Phi: \Omega(A[x]) \to \sigma_A(x) \quad \Phi(\psi) = \Gamma_{A[x]}(x)(\psi) = \psi(x)
    \]

    is a homeomorphism. 
\end{theorem}
\begin{proof}
    Firstly, $A[x]$ is commutative by \autoref{proposition:generated-subalgebra-dense}. Thus \autoref{corollary:c-star-algebra-preserve-spectrum} and (3) of \autoref{proposition:gelfand-transform-gymnastics} imply that
    \[
    \Phi(\Omega(A[x])) = \Gamma_{A[x]}(\Omega(A[x])) = \sigma_{A[x]}(x) = \sigma_A(x)
    \]

    and $\Phi$ is a surjection onto $\sigma_A(x)$. 

    On the other hand, the \hyperref[Gelfand-Naimark Theorem]{theorem:gelfand-naimark} implies that $\psi(x^*) = \ol{\psi(x)}$ for any $\psi \in \Omega(A[x])$. Since $A[x]$ is the smallest $C^*$-algebra containing $x$, any element $\psi \in \Omega(A[x])$ is uniquely determined by $\psi(x)$. Therefore $\Phi$ is injective. 

    Finally, since $\Omega(A[x])$ is equipped with the weak* topology and $\Phi$ is the evaluation map at $x$, it is continuous. 

    By \autoref{proposition:compact-hausdorff-homeomorphism}, $\Phi$ is a homeomorphism. 
\end{proof}

\begin{definition}[Continuous Functional Calculus]
\label{definition:continuous-functional-calculus}
    Let $A$ be a unital $C^*$-algebra and $x \in A$ be normal, then there exists a unique continuous unital *-homomorphism
    \[
    C(\sigma_A(x); \complex) \to A[x] \quad f \mapsto f(x)
    \]

    such that:
    \begin{enumerate}
        \item $\one(x) = 1_A$. 
        \item $\text{Id}(x) = x$.
        \item $\overline{\text{Id}}(x) = x^*$.
    \end{enumerate}

    Moreover,
    \begin{enumerate}[start=3]
        \item Under the identification $\Omega(A[x]) = \sigma_A(x)$, for each $f \in C(\sigma_A(x); \complex)$, $f(x) = \Gamma^{-1}_{A[x]}(f)$.
        \item The mapping $f \mapsto f(x)$ is a unital *-isomorphism.  
        \item For each $U \subset \complex$ open and $f \in C(U; \complex)$, the mapping
        \[
        \bracs{x \in A|\sigma_A(x) \subset U} \to A \quad x \mapsto f(x)
        \]

        is continuous. 
        \item Let $B$ be a unital $C^*$-algebra and $\Phi: A \to B$ be a unital *-homomorphism, then for any $x \in A$ and $f \in C(\sigma_A(x); \complex)$, $\Phi(f(x)) = f(\Phi(x))$.
    \end{enumerate}
\end{definition}
\begin{proof}
    (1), (4), (5): By the \hyperref[Spectral Theorem]{theorem:spectral-c-star}, $\Omega(A[x])$ and $\sigma_A(x)$ may be identified. For each $f \in C(\sigma_A(x); \complex)$, define $f(x) = \Gamma^{-1}_{A[x]}(f)$, then the mapping $f \mapsto f(x)$ is a unital *-isomorphism by the \hyperref[Gelfand-Naimark Theorem]{theorem:gelfand-naimark}. 

    (2): The identification 
    \[
    \Phi: \Omega(A[x]) \to \sigma_A(x) \quad \Phi(\psi) = \Gamma_{A[x]}(x)(\psi) = \psi(x)
    \]

    given by the Spectral Theorem implies that $\Gamma_{A[x]}(x) = \text{Id}$.

    (3): The mapping $f \mapsto f(x)$ is a *-homomorphism. 

    (6): Fix $x \in A$ and let $K \in \cn_U(\sigma_A(x); \complex)$ be compact. By \autoref{proposition:spectrum-continuous}, there exists $r > 0$ such that $\sigma_A(y) \subset K$ for all $y \in B_A(x, r)$. 

    Let $\eps > 0$. By the \hyperref[Stone-Weierstrass Theorem]{theorem:complex-stone-weierstrass}, there exists $p \in \complex[z, \ol z]$ such that $\sup_{\lambda \in K}|p(\lambda) - f(\lambda)| < \eps$. In which case, 
    \begin{align*}
    \norm{f(x) - f(y)}_A &\le \norm{f(x) - p(x)}_A + \norm{f(y) - p(y)}_A + \norm{p(x) - p(y)}_A \\
    &\le \norm{p(x) - p(y)}_A + 2\eps
    \end{align*}

    for all $y \in B_A(x, r)$. Since $p$ is a continuous map on $A$, there exists $\delta \in (0, r)$ such that $\norm{p(x) - p(y)}_A < \eps$ for all $y \in B_A(x, \delta)$. Therefore $\norm{f(x) - f(y)}_A < 3\eps$ for all $y \in B_A(x, \delta)$. 

    (Uniqueness): By the \hyperref[Stone-Weierstrass Theorem]{theorem:complex-stone-weierstrass}.
\end{proof}

\begin{theorem}[Spectral Mapping Theorem (Continuous)]
\label{theorem:spectral-mapping-continuous}
    Let $A$ be a unital $C^*$-algebra and $x \in A$ be normal, then:
    \begin{enumerate}
        \item For every $f \in C(\sigma_A(x); \complex)$, $\sigma_A(f(x)) = f(\sigma_A(x))$. 
        \item For every $f \in C(\sigma_A(x); \complex)$ and $g \in C(\sigma_A(f(x)); \complex)$, $(f \circ g)(x) = f(g(x))$.
    \end{enumerate}
\end{theorem}
\begin{proof}
    (1): Since $f(x) \in A[x]$, by \autoref{proposition:gelfand-transform-gymnastics} and definition of the \hyperref[continuous functional calculus]{definition:continuous-functional-calculus}, 
    \[
    \sigma_A(f(x)) = \sigma_{A[x]}(f(x)) = \Gamma_{A[x]}(f(x))(\sigma_A(x)) = f(\sigma_A(x))
    \]

    (2): Firstly, the theorem holds directly if $f, g \in \complex[z, \ol z]$ are polynomials in $z$ and $\ol z$. 

    Suppose that $g \in \complex[z, \ol z]$ but $f$ is arbitrary. By the \hyperref[Stone-Weierstrass Theorem]{theorem:complex-stone-weierstrass}, there exists $\seq{p_n} \subset \complex[z, \ol z]$ such that $p_n \to f$ uniformly on $\sigma_A(x)$. By property (6) of the \hyperref[continuous functional calculus]{definition:continuous-functional-calculus}, 
    \[
    (g \circ f)(x) = \limv{n}(g \circ f_n)(x) = \limv{n}g(f_n(x)) = \limv{n}g(f(x))
    \]

    Finally, suppose that both $f$ and $g$ are arbitary. By the \hyperref[Stone-Weierstrass Theorem]{theorem:complex-stone-weierstrass}, there exists $\seq{p_n} \subset \complex[z, \ol z]$ such that $p_n \to g$ uniformly on $\sigma_A(f(x))$. By continuity of the continuous functional calculus, 
    \[
    (g \circ f)(x) = \limv{n}(g_n \circ f)(x) = \limv{n}g_n(f(x)) = \limv{n}g(f(x))
    \]
\end{proof}



\begin{corollary}
\label{corollary:normal-spectrum-identity}
    Let $A$ be a unital $C^*$-algebra and $x \in A$ be normal, then:
    \begin{enumerate}
        \item $x$ is self-adjoint if and only if $\sigma(x) \subset \real$. 
        \item $x$ is unitary if and only if $\sigma(x) \subset \partial B_\complex(0, 1)$. 
        \item $x$ is a projection if and only if $\sigma(x) \subset \bracs{0, 1}$. 
    \end{enumerate}
\end{corollary}

\begin{corollary}
\label{corollary:sum-of-unitaries}
    Let $A$ be a unital $C^*$-algebra, then
    \begin{enumerate}
        \item For any $x \in A_{sa}$, there exists a unitary element $u \in A$ such that $x = (u + u^*)/(2\norm{x}_A)$. 
        \item For any $x \in A$, there exists unitary elements $u, v \in A$ such that $x = (u + u^*)/(\norm{x}_A) + i(v + v^*)/(2\norm{x}_A)$. 
    \end{enumerate}
\end{corollary}
\begin{proof}
    (1): Assume without loss of generality that $\norm{x}_A \le 1$. In which case, $\sigma(x) \subset [-1, 1]$, and $f(\lambda) = \lambda + i\sqrt{1 - \lambda^2}$ is defined and continuous on $[-1, 1]$. Furthermore, $|f(\lambda)| = 1$ for all $\lambda \in [-1, 1]$. Thus \autoref{corollary:normal-spectrum-identity} implies that $f(x)$ is unitary. Finally, since $f + \ol f = 2\text{Id}$, $x = (f(x) + \ol{f(x)})/(2\norm{x}_A)$.
\end{proof}

\begin{corollary}
\label{corollary:star-homomorphism-continuous}
    Let $A, B$ be unital $C^*$-algebras and $\Phi: A \to B$ be an injective unital *-homomorphism, then for each $x \in A$,
    \begin{enumerate}
        \item $\sigma_B(\Phi(x)) = \sigma_A(x)$. 
        \item $\norm{\Phi(x)}_B = \norm{x}_A$.
    \end{enumerate}
\end{corollary}
\begin{proof}[Proof, {{\cite[10.7]{Zhu}}}. ]
    (1): Since $\Phi(G(A)) \subset G(B)$, $\sigma_B(\Phi(x)) \subset \sigma_A(x)$. If $\sigma_B(\Phi(x)) \subsetneq \sigma_A(x)$, then \hyperref[Urysohn's Lemma]{lemma:urysohn} implies that there exists $C(\sigma_A(x); \complex)$ such that $f|_{\sigma_B(\Phi(x))} = 0$ but $f \ne 0$. In which case, by (7) of the \hyperref[continuous functional calculus]{definition:continuous-functional-calculus}, $\Phi(f(x)) = f(\Phi(x)) = 0$, which contradicts the fact that $\Phi$ is injective. 

    (2): By \autoref{corollary:c-star-unique-norm}, $\Phi$ is isometric. 
\end{proof}


