Let $T \in L(\mathcal H)$ and $w(T) := \{ \langle Tx,x \rangle : \|x\| = 1\}$ be the numerical range of $T$. My question concerns a part of the proof of $\sigma(T) \subseteq \overline{w(T)}$:
First, let $\lambda \notin \overline{w(T)}$ and $c:= d(\lambda,w(T)) > 0$. Then it's easy to show that: $ c \le \|(\lambda I - T)x\|$ for $x \in \mathcal H, \|x\| = 1 $.
By that, in the proof, it is followed that $(\lambda I - T)$ is invertible and $(\lambda I - T)^{-1}: \operatorname{ran}(\lambda I - T) \to \mathcal H$ (which is continuous by the Open Mapping Theorem).
The thing is that the proof doesn't stop here because next you show that $\operatorname{ran}(\lambda I - T) = \mathcal H$.
Here is my question: Is there a (linear) operator $T: \mathcal H \to \operatorname{ran}(T) \subset \mathcal H$ that is injective? What about, when $T$ is closed in $\mathcal H$?
There is such an operator. For instance, consider the "right-shift operator" on $\ell^2$ given by $$ T(x_1,x_2,\dots,x_n,\dots) = (0,x_1,x_2,\dots,x_n,\dots) $$ Verify that $T$ is injective, but $\operatorname{ran}(T)$ is a (closed) subspace of $\mathcal H$ with codimension $1$. Since $T$ is a bounded operator, it is also closed.