Spectrum of operator in infinite dimensional hilbert space We know that if a complex hilbert space $H$ is separable, then for every compact set $K$, there exists a bounded linear operator $T : H \to H$ s.t $\sigma (T) = K$. My question is if this still holds if $H$ is not separable. Can you construct such an operator? Thanks 
 A: The following is true only when $K$ is not finite. 
Pick $p\in K$ such that $p$ is a limit point of $K$. Let $L$ be a separable closed subspace of $H$, let $A: L \to L$ be an operator with $\sigma(A) = K$. Let $L^\perp$ be the orthogonal complement such that $H = L \oplus L^\perp$. Define $\tilde A: H\to H$, 
$$\tilde A(l + l^\perp) = Al + p l^\perp\ .$$
Claim: $\sigma(\tilde A) = \sigma(A)$. 
Let $z\notin \sigma( A)$. Then $(A - z)^{-1} : L \to L$ exists as bounded operator. As $z\neq p$, define 
$$B(l + l^\perp) = (A - z)^{-1}l + \frac{1}{p-z} l^\perp\ .$$
Then $B$ is bounded and $B = (\tilde A  -z)^{-1}$. Thus $z\notin \sigma(\tilde A)$ and $\sigma(\tilde A) \subset \sigma(A)$.
Now let $z\notin \sigma(\tilde A)$, $z\neq p$. Then $(\tilde A - z)^{-1}$ exists as bounded linear operator on $H$. Let $B$ be the restriction of $(\tilde A - z)^{-1}$ to $L$. Let $y\in L$, then
$$y = (\tilde A - z)B y = (\tilde A - z) (a + a^\perp) = (A-z)a + (p-z)a^\perp$$
(we write $By = a+ a^\perp$). Thus $y = (A-z)a$ and $(p-z)a^\perp = 0$. The condition implies that $a^\perp=0$ and hence $B$ has image in $L$. Thus $B$ is the inverse of $A - z$ and $z\notin \sigma(A)$. Hence
$$\rho(\tilde A) \setminus \{p\} \subset \rho(A) \Rightarrow \sigma(A) \subset \sigma(\tilde A) \cup \{p\}$$
Thus $\sigma(A) \subset \sigma(\tilde A) \cup \{p\} \subset \sigma(A) \cup \{p\} = \sigma(A)$ as $p\in \sigma(A)$. Hence $\sigma(A) =\sigma(\tilde A) \cup \{p\}$, or 
$$\sigma(A) \setminus\{p\} = \sigma(\tilde A)\ .$$
As $p$ is a limit point of $K$ and $\sigma(\tilde A)$ is closed, we have 
$$\sigma(A) = \sigma(\tilde A)\ .$$
