Reconciling a proof with a remark Consider the following

where a theorem is discussed in the finite-dimensional case (and "$(1.2)$" refers to the equations $T=\sum_{j=1}^m \lambda_j E_j$).
Can you help me understand how we get to the expression for $f(T)$ in the last paragraph, after the part of the proof that is shown? By the above theorem, if $f$ is the indicator function, we'd rather should somehow approximate the indicator function by polynomials, as in the proof of the theorem, to see what $f(T)$ is, right? Since the mapping maps into $L(H)$, just applying $f$ to $T=\sum_{j=1}^m \lambda_j E_j$ kinda doesn't make sense, right?
 A: If the spectrum of the self-adjoint matrix $A$ is  $\sigma(A) = \{\lambda_1, \ldots, \lambda_m\}$ then the orthogonal projection onto the eigenspace $\ker (A - \lambda_jI)$ is given by this polynomial in  $A$:
$$P_j = \prod_{i \ne j} \frac{A - \lambda_i}{\lambda_j - \lambda_i}$$
Indeed, let $x = \sum_{k=1}^m x_i$ be the decomposition of $x$ into a sum of eigenvectors. We have
$$P_jx = \sum_{k=1}^m \underbrace{\prod_{i \ne j}\frac{Ax_k - \lambda_ix_k}{\lambda_j - \lambda_i}}_{=0 \text{ if } k \ne j} = \prod_{i \ne j} \frac{Ax_j - \lambda_ix_j}{\lambda_j - \lambda_i} = \prod_{i \ne j} \frac{(\lambda_j - \lambda_i)x_j}{\lambda_j - \lambda_i}  = x_j$$
On the other hand, the continuous function $f : \sigma(A) \to \mathbb{C}$ defined as $f = \chi_{\{\lambda_j\}}$ is also given by
$$f(z) = \prod_{i \ne j} \frac{z - \lambda_i}{\lambda_j - \lambda_i}$$
Indeed, we only have to verify that $f(\lambda_i) = \delta_{ij} \lambda_j$ for all $i \in \{1, \ldots, m\}$, which is clear. Now the continuous functional calculus gives
$$f(A) = \prod_{i \ne j} \frac{A - \lambda_i}{\lambda_j - \lambda_i} = P_j$$
which is precisely the desired result.
A: You do not (always) have to approximate any element of the form $f(T)$ by polynomials. The argument here requires only the spectral theorem you refer to as follows.
First of all, let's make sense of $f(T)$. You are right to be skeptical. The notation $f(T)$ is an abbreviation for the $\Phi(f)$ in the theorem defined on $C(\sigma(T))$. The reason why one avoids $\Phi$ and uses $T$ instead is that there exists a $\Phi$ for each normal operator $T$. In short:
$$
f(T)\text{ is the just } \Phi(f). 
$$
To answer your first question, let $\lambda_1, \lambda_2, \ldots \lambda_n$ be the eigenvalues of some operator $T$ on a finite-dimensional space. Then $\sigma(T) = \lbrace \lambda_1, \lambda_2, \ldots \lambda_n \rbrace$ is a discrete subspace in $\mathbb{C}$. Therefore the indicator map $f_k \colon \sigma(T)\rightarrow \lbrace 0,1 \rbrace$ on $\lbrace \lambda_k \rbrace$ for $1\leq k \leq n$ is continuous (all maps with discrete domain are continuous). Hence we may apply $\Phi$ to $f_k$ and obtain a bounded operator $f_k(T)$. Since the $\lambda$'s are eigenvalues, one has the expression
$$
T = \sum_{i=1}^n \lambda_i E_i,
$$
where $E_1, E_2, \ldots E_n$ are the projections onto the eigenspaces of $T$. The statement given in your reference is that $f_k(T) = E_k$, so we aim to show this.
Here's a good "go-to" strategy for functional calculus problems. First we work in $C(\sigma(T))$ and notice that
$$
\lambda_1 f_1 + \lambda_2 f_2 + \ldots + \lambda_n f_n = \text{id}_{\sigma(T)}.
$$
Applying $\Phi$ to the above, we obtain by (a) in the theorem and linearity (first bullet of (c)) of $\Phi$ that
$$
\lambda_1 f_1(T) + \ldots \lambda_2 f_2(T) = \Phi(\lambda_1 f_1 + \ldots \lambda_n f_n) = \Phi(\text{id}_{\sigma(T)}) = T.
$$
It follows that $E_k = f_k(T)$ for all $1\leq k \leq n$.
