Bounded Self-adjoint operator with finite spectrum if $S$ be a self-adjoint bounded operator and $\sigma(S)=\left\{\lambda_{1}, \dots, \lambda_{n}\right\} .$ show that there exist projections operator $P_{1}, \dots, P_{n} \in B(H)$ that $\sum_{j=1}^{n} P_{j}=I$ and $P_i P_j=0$ if $j \neq k$ and $S=\sum_{j=1}^{n} \lambda_{j} P_{j}$.
I can see how we can define projection operator for each term in spectrum but I can't show that they are complete in the sense $\sum_{j=1}^{n} P_{j}=I$. actually its strange for me that in general self-adjoint bounded operator with finite spectrum have a complete set of projection operator.
 A: For $S$ as described, one has $p(S)=0$ where
$$
         p(\lambda)=\prod_{k=1}^{n}(\lambda-\lambda_k).
$$
This follows from
$\;\;$ (a) $p(S)^*=p(S)$, and
$\;\;$ (b) $\sigma(p(S))=p(\sigma(S))=\{0\}$,
which forces the self-adjoint operator $p(S)$ to be the $0$ operator.
The Lagrange polynomials
$$
         p_k(\lambda)=\frac{\prod_{j\ne k}(\lambda-\lambda_j)}{\prod_{j\ne k}(\lambda_k-\lambda_j)}.
$$
satisfy $p_{k}(\lambda_j)=\delta_{k,j}$, which gives
$$
     p_1(\lambda)+p_2(\lambda)+\cdots+p_n(\lambda)=1.
$$
This forces $p_1(S)+p_2(S)+\cdots+p_n(S)=I$. And
$$
         p_k(S)p_k(S)=p_k(S) \\
         p_k(S)p_l(S)=(p_kp_l)(S)=0,\;\; k\ne l.
$$
This is because $p_k(\lambda)^2=p_k(\lambda)$ for $\lambda\in\sigma(S)$, and because $p_k(\lambda)p_l(\lambda)=0$ for $\lambda\in\sigma(S)$ whenever $k\ne l$. These have the desired properties.
Finally,
\begin{align}
           S &= S(p_1(S)+p_2(S)+\cdots+p_n(S)) \\
             &= \lambda_1 p_1(S)+\lambda_2 p_2(S)+\cdots+\lambda_n p_n(S)
\end{align}
The projections you want are $P_k = p_k(S)$.
A: When you want to prove something about self-adjoint operators on a Hilbert space, your first instinct should be to think about the continuous functional calculus.
Recall that the functional calculus is an isometric $*$-morphism
$$\phi: C(\sigma(S)) \to B(H): f \mapsto f(S)$$
that sends the inclusion $z: \sigma(S) \hookrightarrow \mathbb{C}$ to $S$ and $1$ to $\text{id}_H$.
Since the spectrum is finite, it is discrete and the characteristic functions $f_i = \chi_{\{\lambda_i\}}$ are continuous on the spectrum. Let $P_i:= f_i(S) \in B(H)$. Now, note that on $\sigma(S)$, the following identities hold:
$$z = \sum_i \lambda_i f_i$$
$$f_i f_j = 0, \quad i \neq j$$
$$f_i^2 = f_i = \overline{f_i}$$
Hence, since the functional calculus is a unital $*$-morphisms that maps $z$ to $S$, we find that these identities are also satisfied for the images, and this is what you want.

Remark: The same is true (with the same proof) when we replace $B(H)$ with a unital $C^*$-algebra.
