In my functional analysis lecture, we have covered two spectral theorems so far. The first one being:
$\underline{\textbf{Theorem 1:}}$ Suppose $\mathfrak{H}$ is a Hilbert space and $A\in\mathcal{K}(\mathfrak{H})$ is a compact symmetric (i.e., self-adjoint) operator. Then there exists a possibly finite sequence of real nonzero eigenvalues $(\alpha_j)_{j=1}^N$ listed with multiplicity which converges to $0$ if $N=\infty$. One can choose corresponding orthonormal eigenvectors $u_j$ such that every $f\in\mathfrak{H}$ can be written as $$ f = \sum_{j=1}^N \langle u_j,f\rangle u_j + h, $$ where $h$ is in the kernel of $A$, that is, $Ah=0$. Moreover, $u_j\in\operatorname{Ker}(A)^\perp$.
And the second one being:
$\underline{\textbf{Theorem 2:}}$ If $X$ is a $C^\ast$ algebra and $x\in X$ is self-adjoint, then there is an isometric isomorphism $$\Phi:C(\sigma(x))\to C^\ast(x) $$ such that $f(t)=t$ maps to $\Phi(t)=x$ and $f(t)=1$ maps to $\Phi(1)=e$. Moreover, for every $f\in C(\sigma(x))$ we have $$ \sigma(f(x)) = f(\sigma(x)), $$ where $f(x):=\Phi(f)$.
Since the lecture notes do not provide any mention of a relation between these two, I'm writing this post. Any intuition or help is highly appreciated!