# Necessity of completeness of the inner product space in Riesz representation theorem

I wanted to find a counter example to show that the completeness of the inner product space is necessary in Riesz representation theorem. Please give an example of a bounded linear functional $T$ on an incomplete inner product space $X$ which do not have any inner product representation i.e. there does not exist any $z$ in $X$ s.t. $T(x)= \langle ,z\rangle$ for all $x$ in $X$.

-

You can take $X\subset\ell^2(\mathbb N)$ given by $$X=\{x\in\ell^2(\mathbb N):\ \text{ only finitely many entries of x are nonzero }\}$$ and $$Tx=\sum_{n=1}^\infty\frac{x_n}n$$

-

Take $C[0,1]$ with the $L^2$ inner product. Let $\phi(f) = \int_{1 \over 2}^1 f(t) dt$.

It is straightforward to see that $\phi$ is bounded by Cauchy-Schwarz.

To see that $\phi$ cannot be represented by an element of $C[0,1]$ we proceed by contradiction. Suppose $\phi(f) = \int_0^1 g(t) f(t) dt$. Since $\phi(g) = \|g\|^2 = \int_{1 \over 2}^1 (g(t))^2 dt$, we see that we must have $g(t) = 0$ for all $t \in [0, {1 \over 2}]$. Now choose a sequence of positive continuous functions $f_n$ such that $f_n$ has support on $[{1 \over 2}, {1 \over 2}+ {1 \over n}]$ and $\int_0^1 f_n(t) dt = 1$, then we have $\phi(f_n) = 1$ for all $n$, but continuity of $g$ gives $\lim_n \phi(f_n) = g({1 \over 2}) = 0$, a contradiction.

Addendum: Here is a marginally simpler ending to the above proof: Let $\bar{\phi}(f) = \int_0^{1 \over 2} f(t) dt$ and note that $\phi(f) + \bar{\phi}(f) = \int_0^1 f(t) dt$. Since $\int_0^1 f(t) = \langle 1, f \rangle$, if we have $\phi(f) = \int_0^1 g(t) f(t) dt$, then this gives $\bar{\phi}(f) = \int_0^1 (1-g(t)) f(t) dt$. As above, since $\bar{\phi}(1-g) = \|1-g\|^2 = \int_0^{1 \over 2} (1-g(t))^2 dt$, we see that we must have $g(t) = 1$ for $t \in [{1 \over 2},1]$, which contradicts the continuity of $g$ at $t={1\over 2}$.

-

Let $X$ the space of trigonometric polynomials, which is a dense subspace of $L^2[0,2\pi]$, with respect to the inner product $$\langle f,g \rangle=\frac{1}{2\pi}\int_0^{2\pi} f(x)\,\overline{g(x)}\,dx.$$ Let $h(x)=\sum_{n=1}^\infty\frac{1}{n^2}\sin nx$. Clearly, $h\in L^2[0,2\pi]$, but $h\notin X$, and define on $X$ the bounded linear functional $$\ell{f}=\frac{1}{2\pi}\int_0^{2\pi} f(x)\,\overline{h(x)}\,dx.$$ This is not representable by a trigonometric polynomial!

-