Example of a positiv operator which is neither injective nor has a closed range. Let $E$ be a complex Hilbert space, $\mathcal{L}(E)$ be the algebra of all bounded linear operators on $E$.

I hope to get an example of $S\in \mathcal{L}(E)^+$ such that $S$ is neither injective nor has a closed range.

And thank you!
 A: Hint: Take $E = \ell^2$ and choose the multiplication operator
$$(S x)_n = a_n \, x_n$$
for a sequence $(a_n)_{n \in \mathbb N}$.
Now, you should figure out which properties of $(a_n)$ ensure that


*

*$S$ is bounded

*$S$ is positive

*$S$ is not injective

*$S$ has not a closed range

A: You can modify my example below. Probably what @gerw meant:
Consider $B : \ell^2 \to \ell^2$ given by:
$$B(x_1, x_2, x_3, \ldots) = \left(0, \frac12 x_2, \frac13 x_3, \ldots\right), \quad\text{for all } (x_n)_{n=1}^\infty \in \ell^2$$
$B$ is bounded:
$$\|Bx\|_2 = \left\|\left(0, \frac12 x_2, \frac13 x_3, \ldots\right)\right\|_2 = \sqrt{\sum_{n=2}^\infty \frac{|x_n|^2}{n^2}} \le \sqrt{\sum_{n=1}^\infty |x_n|^2} = \|x\|_2$$
$B$ is positive. For $x \in \ell^2$ we have:
$$\langle Bx, x\rangle = \left\langle(x_1, x_2, x_3, \ldots), \left(0, \frac12 x_2, \frac13 x_3 \right)\right\rangle = \sum_{n=2}^\infty \frac{|x_n|^2}{n} \ge 0$$
$B$ is not injective:
$$B(0,0,0, \ldots ) = (0, 0, 0, \ldots ) = B(1,0,0, \ldots)$$
$\operatorname{Im} B$ is not closed:
Consider the sequence $$\left(B(\underbrace{1, 1, \ldots, 1}_{n}, 0, 0, \ldots)\right)_{n=1}^\infty = \left(\left(0, \frac12, \ldots, \frac1n, 0, 0, \ldots\right)\right)_{n=1}^\infty$$
in $\operatorname{Im} B$. It converges to $\left(0, \frac12, \ldots, \frac1n, \frac1{n+1}, \ldots\right) \in \ell^2 \setminus \operatorname{Im} B$.

The below discussion is in fact for positive-definite operators, which satisfy $\langle Sx, x\rangle > 0$ for all $x \ne 0$.
Such an operator $S$ cannot exist. That is because positivity of a linear map implies injectivity. 
$S$ is injective if and only if $\operatorname{Ker} S = \{0\}$. If $S$ is not injective, then $\operatorname{Ker} S \ne \{0\}$ so take $x \in \operatorname{Ker} S$, $x \ne 0$. We have:
$$\langle Sx, x\rangle = \langle 0, x\rangle = 0$$
which contradicts the positivity of $S$.

Here is an injective example.
Consider the linear map $A : \ell^2 \to \ell^2$ given by:
$$A(x_1, x_2, x_3, \ldots) = \left(x_1, \frac12 x_2, \frac13 x_3, \ldots\right), \quad\text{for all } (x_n)_{n=1}^\infty \in \ell^2$$
$A$ is bounded:
$$\|Ax\|_2 = \left\|\left(x_1, \frac12 x_2, \frac13 x_3, \ldots\right)\right\|_2 = \sqrt{\sum_{n=1}^\infty \frac{|x_n|^2}{n^2}} \le \sqrt{\sum_{n=1}^\infty |x_n|^2} = \|x\|_2$$
$A$ is positive. For $x \ne 0$ we have:
$$\langle Ax, x\rangle = \left\langle(x_1, x_2, x_3, \ldots), \left(x_1, \frac12 x_2, \frac13 x_3 \right)\right\rangle = \sum_{n=1}^\infty \frac{|x_n|^2}{n} > 0$$
$\operatorname{Im} A$ is not closed:
Let $(e_n)_{n=1}^\infty$ be the canonical basis for $\ell^2$. Since $A(ne_n) = e_n$, we conclude that $(e_n)_{n=1}^\infty \subseteq \operatorname{Im} A$, so $\operatorname{Im} A$ is dense in $\ell^2$. If it were closed, we would have $\operatorname{Im} A = \ell^2$, but this is not the case because for example $\left(\frac1n\right)_{n=1}^\infty \in \ell^2 \setminus \operatorname{Im} A$.
