# Dense subspaces of Hilbert space with trivial intersection

I am looking for an example of a Hilbert space $\mathcal H$ and dense subspaces $U_1,U_2\subset \mathcal H$ such that $U_1\cap U_2 = \{0\}$. The best I have achieved is one-dimensional intersection, take $L^2([0,1])$ as the Hilbert space and for $U_1$ the simple functions and for $U_2$ the polynomials.

• See this. Dec 31, 2016 at 14:03

Take $U_1$ as defined by you and take $U_2 := \operatorname{span}\{x^n: n\geq 1\}.$ By Stone-Weierstraß this is $\|\cdot\|_\infty$-dense in $C_0(0,1)$, but then also $\|\cdot\|_2$-dense in $C_0(0,1)$ since this norm is weaker on $C_0(0,1)$. Since $C_0(0,1)$ is $\|\cdot\|_2$-dense in $L^2(0,1)$, $U_2$ must also be $\|\cdot\|_2$-dense in $L^2(0,1)$. Now $\{0,1\}$ has zero measure so $U_2$ is even dense in $L^2[0,1]$.