# a dense subspace of inner product space whose codimension is 1

Is there an example of an inner product space $$V$$ and a dense subspace $$D$$ whose codimension is $$1$$?

In other words, there exists $$z\in V$$ such that every element of $$V$$ can be written in the form $$e+\lambda z$$ for some $$e\in E$$ and some scalar $$\lambda$$.

• Every infinte dimensional inner product space has a discontinuous linear functional $f$ and the kernel of such a functional is dense and has codimension $1$. Jan 30, 2021 at 0:19
• @KaviRamaMurthy. So if we consider the infinite dimensional inner product space $V=C[0,1]$, can you give me $f$ explicitly? or the dense subspace $D$? Jan 31, 2021 at 0:48
• What is your inner product on $C[0,1]$? Jan 31, 2021 at 4:34
• @KaviRamaMurthy. it is given by $(f,g)=\int_0^1{f(t)\overline{g(t)}}dt$. Jan 31, 2021 at 15:17
• Take a continuous function $g$ which is integrable but not bounded. Then $f \to \int fg$ is a discontinuous linear functional on your sapce. Jan 31, 2021 at 23:17

So let $$X$$ be a normed space with infinite dimension. Take $$\{x_n\}$$ a linearly independent subset of $$X$$ (which is possible, since $$X$$ has infinite dimension) and extend it to a Hamel basis of $$X$$, say $$\{x_n\}_{n=1}^\infty\cup Z$$, where $$Z\subset X\setminus(\{x_n\}_{n=1}^\infty)$$. We define a functional on the basis and we extend it linearly on all $$X$$. We simply set $$f(x_n)=n\cdot\|x_n\|$$ and $$f(z)=0$$ for all $$z\in Z$$. Note that $$f$$ cannot be bounded: if $$|f(x)|\leq c\|x\|$$ for all $$x\in X$$ for some $$c>0$$, then $$n\|x_n\|\leq c\|x_n\|$$ for all $$n$$, which is impossible since $$\mathbb{N}$$ has no upper bound.