Do bounded linear operators on a Banach space which are injective or have dense range form an open subspace? We proved a theorem in our functional analysis class showing that the subspace of bijective bounded linear operators between two Banach spaces $X$ and $Y$ is open in the space $B(X,Y)$ of bounded linear operators. 
It was mentioned that the subspace of $(i)$ injective operators and $(ii)$ operators with dense range, however, are not open in $B(X,Y)$. 
I tried coming up with counterexamples, but was not able to do so. Admittedly, I tried in finite dimension, and maybe the counterexamples come from infinite dimension? I'd like to see counterexamples to each of these cases. I'd appreciate some help in this, thanks.
 A: Consider $X=Y=\ell^2(\Bbb N)$. Let $A(\sum_n x_n e_n)=\sum_n 2^{-n}\,x_ne_n$. $A$ is an injection, however for any $n$ you have $$(A-2^{-n}\Bbb 1)(e_n)=0$$
so $A-2^{-n}\Bbb1$ is never an injection. But for any $\epsilon>0$ you have an $n$ with $A-2^{-n}\Bbb1\in B_\epsilon(A)$. Also $A$ has dense range (since it contains the finitely supported sequences), but you can also verify that $\pi_n (A-2^{-n}\Bbb1)=0$ where $\pi_n$ is the orthogonal projection onto $\mathrm{span}(e_n)$. So the range of $A-2^{-n}\Bbb1$ must lie in the kernel of $\pi_n$, which is a closed subspace of $\ell^2$. So $A-2^{-n}\Bbb1$ also never has dense range.
A: Take the following operator $T:l^1\to l^1$, 
$$
Tx = (x_1,x_2/2,x_3/3,\dots,x_k/k,\dots).
$$
This operator is injective, not boundedly invertible on its range, hence its range is not closed. If we set $Y:=\overline{R(T)}$ then range of $T$ is dense in $Y$.
However, $T$ can be approximated by non-injective  operators with non-dense range: Define $T_n$ by
$$
T_nx = (x_1,x_2/2,x_3/3,\dots,x_n/n,0,0,\dots).
$$
Then $T_n$ is not injective and has not dense range in $Y$. But
$$
\|(T-T_n)x\|_{l^1} = \sum_{k=n+1}^\infty k^{-1}|x_k|\le n^{-1} \|x\|_{l^1},
$$
hence $\|T-T_n\|_{\mathcal L(l^1,l^1)}\to 0$ for $n\to\infty$.
