TITLE: Is there an injective operator with a dense nonclosed one-codimensional range?
QUESTION [9 upvotes]: Let $H$ be an infinite dimensional separable Hilbert Space.
Is there an operator $A\in B\left( H\right) $ such that $Im\left(
A\right) \neq \overline{Im\left( A\right) }=H$, $ codim\left(Im%
\left( A\right)\right) =1$
and
 $\ker \left( A\right) =\left\{ 0\right\} $ ?

REPLY [10 votes]: There is no such an operator. More generally, a continuous operator on a Banach space with finite dimensional kernel and cokernel must have a closed image (such operators are called Fredholm). Let me prove this for your specific case. Let $A \colon H \rightarrow H$ be continuous, injective and $\dim H/\operatorname{Im}(A) = 1$. Choose $v \notin \operatorname{Im}(A)$ and note that $\operatorname{Im}(A) + \operatorname{span} \{ v \} = H$. Consider the map $\tilde{A} \colon H \oplus \mathbb{C} \rightarrow H$ given by $\tilde{A}(h,z) = Ah + zv.$ This map is one-to-one, onto and continuous so by the open mapping theorem, it has a continuous inverse $\tilde{A}^{-1} \colon H \rightarrow H \oplus \mathbb{C}$. By the definition of the external direct sum, $H$ is a closed subspace of $H \oplus \mathbb{C}$ and then $\tilde{A}(H) = \operatorname{Im}(A)$ is closed. This proof works verbatim if you consider more generally an injective continuous linear map $A \colon B_1 \rightarrow B_2$ between Banach spaces with codimension one cokernel.