# Every compact subset of real line is spectrum of self-adjoint operator

It is known that if $$H$$ is Hilbert space and $$T$$ is self-adjoint operator on $$H$$, then the spectrum is real and closed. But is every closed or compact subset of real numbers a spectrum of some self-adjoint operator on some $$H?$$ For interval I think we can find the construction but how if the set is a mess, for example, Cantor set?

• How would you do it for an interval? If you are allowing an arbitrary Hilbert space and make the set compact, it is not too hard (keep in mind that such an operator would be diagonalizable and then construct a suitable operator on a sufficiently large Hilbert space... orthonormal bases are you friend). Commented Jul 2, 2023 at 5:44
• @MarianoSuárez-Álvarez I did neither of the two things, but I guess people don't appreciate that there is little indication of effort on the OPs part. Also, nice solution, I would have taken an unnecessarily large Hilbert space. Commented Jul 2, 2023 at 5:48
• @MarianoSuárez-Álvarez You do not need to convince me... I am just pointing out the likely cause, but you probably knew that anyways :) Commented Jul 2, 2023 at 5:51
• @LaurencePW Also note that the empty set is compact and does not arise as the spectrum of any selfadjoint operator math.stackexchange.com/questions/1357881/… Commented Jul 2, 2023 at 8:21
• @SeverinSchraven I guess the map from the $0$-VS to itself has empty spectrum. Although one shouldn't fight too much about the "theory of the empty set", as Siegel warned. Commented Jul 2, 2023 at 20:41

There are bits and pieces in the comments that I put together to an answer.

Empty set: The empty set is compact and does only arise as the spectrum of a self-adjoint operator if the Hilbert space in question is the trivial Hilbert space (see for example here Self-adjoint operator has non-empty spectrum.).

Finite set: It's instructive to see how things play out for a finite set, say $$\Omega=\{\lambda_1, \dots \lambda_n\}$$. Then we can pick $$H=\mathbb{C}^n$$ and $$T: \mathbb{C}^n \rightarrow \mathbb{C}^n, x \mapsto \begin{pmatrix} \lambda_1 & & \\ & \ddots & \\ & & \lambda_n \end{pmatrix} x.$$

General case: Let $$\Omega \subset \mathbb{R}$$ compact and non-empty. Then there exists a dense, countable subset $$\{ \lambda_n \in \Omega \ : \ n\in \mathbb{N} \}$$ in $$\Omega$$ (see Prove if $X$ is a compact metric space, then $X$ is separable.). Now we can consider a similar operator as in the finite case, namely,

$$T: \ell^2(\mathbb{N}, \mathbb{C}) \rightarrow \ell^2(\mathbb{N}, \mathbb{C}), (x_n)_{n\in \mathbb{N}} \mapsto (\lambda_n x_n)_{n\in \mathbb{N}}.$$

With a bit of work (see Spectrum of $l^p$ multiplication operator (Brezis 6.17)) one can show that for such operators one has $$\sigma(T) = \overline{ \{ \lambda_n \ : \ n \in \mathbb{N} \} }.$$

By construction we have that $$\{ \lambda_n \ : \ n \in \mathbb{N}\}$$ is dense in $$\Omega$$. Thus, as $$\Omega$$ is closed, we get $$\sigma(T)= \Omega$$.

If you like bigger Hilbert spaces: Before Mariano Suárez-Álvarez's comment I had a similiar, but uglier construction in mind. Namely, I would have taken a Hilbert space with an orthonormal bases that is large enough to associate to every point in $$\Omega$$ an orthonormal basis vector and then do a similar construction as above. Namely, one can consider the Hilbert space $$\ell^2(\Omega, \mathbb{C}) = \left\{ (x_s)_{s\in \Omega} \subseteq \mathbb{C}^\Omega \ : \ \sum_{s\in \Omega} \vert x_s \vert^2 < \infty \right\}$$ and the scalar product $$\langle (x_s)_{s\in \Omega}, (y_s)_{s\in \Omega} \rangle = \sum_{s\in \Omega} \overline{x_s} y_s.$$ We can define the operator $$T: \ell^2(\Omega, \mathbb{C}) \rightarrow \ell^2(\Omega, \mathbb{C}), (x_s)_{s\in \Omega} \mapsto (s x_s)_{s\in \Omega}.$$ One checks that this operator is bounded and symmetric, thus self-adjoint. Furthermore, $$(\delta_{s_0,s})_{s\in \Omega}$$ is an eigenvector to the eigenvalue $$s_0$$. Furthermore, if $$\lambda\notin \Omega$$, then there exists (as $$\Omega$$ is closed) $$\varepsilon>0$$ such that for all $$s\in \Omega$$ holds $$\vert \lambda -\lambda_s\vert>\varepsilon$$. Thus, the operator $$T-\lambda Id$$ admits the inverse $$A: \ell^2(\Omega, \mathbb{C})\rightarrow \ell^2(\Omega, \mathbb{C}), (x_s)_{s\in \Omega} \mapsto \left( \frac{1}{s-\lambda} x_s \right)_{s\in \Omega}$$ which is bounded (with operator norm bounded by $$\varepsilon^{-1}$$). Thus, if $$\lambda\notin \Omega,$$ then $$\lambda$$ is not in the spectrum of $$T$$ and hence $$\Omega = \sigma(T)$$.