Example for a proper dense subspace?

It's not possible to find an example in a finite dimensional linear normed space. See e.g Planetmath - link to the entry; link to pdf. Or this question Finite-dimensional subspace normed vector space is closed (But this result can be found in many places.)

Perhaps the fact that you have to work with infinite-dimensional spaces (and subspaces) is what makes it difficult. (Until you get used to working in infinite-dimensions and acquire sufficient intuition for such spaces.)


Take $X=c_0$, i.e. the space of all real sequences convergent to zero with the sup-norm $\|x\|=\sup\{|x_n|; n\in\mathbb N\}$.

Take $Y=$set of all sequences, which have only finitely many non-zero values. (Sequences with finite support.)

Clearly $Y$ is a subspace of $X$, and it is not difficult to show that $Y$ is dense in $X$. Indeed, for any $x\in X$ and any $\varepsilon>0$ there is an $N$ such that $|x_n|<\varepsilon$ for $n>N$. Now if you take $y=(x_1,x_2,\dots,x_N,0,0,\dots)$, then $y\in Y$ and $\|y-x\|=\sup_{n>N}|x_n|<\varepsilon$.


Consider $C[0,1]$ with the sup norm. Then, the Stone-Weierstrass theorem says that the space of polynomials is a proper dense subalgebra of $C[0,1]$.

In fact, we actually have the following inclusion of dense subalgebras

$$\mathbb{Q}[x]\subseteq\mathbb{R}[x]\subseteq C[0,1]$$

And so $\mathbb{Q}[x]$ is a dense subalgebra of $C[0,1]$--this incidentally shows that $C[0,1]$ is separable which is not a priori obvious.


Explicit (good) examples have been provided by other users. In fact, thanks to Zorn lemma, for each infinite dimensional normed space $E$, we can find a linear functional $f\colon E\to \mathbb R$ which is not continuous (take $\{e_i\}_{i\in I}$ a Hamel basis, $\{e_{i_k}\}$ with $i_k\in I, k\in\mathbb N$ of norm $1$ and define $f(e_{i_k})=k$ ($0$ for the other vectors). Then we show that the kernel of $f$ is dense in $E$.

Let $\{x_n\}$ a sequence of elements of $E$ of norm $1$ such that $f(x_n)\geq n$. For $y\in E$, we can write $$y=y-\frac{f(y)}{f(x_n)}x_n+\frac{f(y)}{f(x_n)}x_n.$$ Since $f\left(y-\frac{f(y)}{f(x_n)}x_n\right)=f(y)-f(y)=0$, $y-\frac{f(y)}{f(x_n)}x_n\in \ker f$ and $$\lVert \frac{f(y)}{f(x_n)}x_n\rVert=\frac{|f(y)|}{|f(x_n)|}\leq \frac{|f(y)|}n$$ so the sequence $\{y_n=y-\frac{f(y)}{f(x_n)}x_n\}$ is a sequence of elements of $\ker f$ which converges to $y$.