[Math] What does it exactly mean for a subspace to be dense

analysisfunctional-analysisreal-analysis

My understanding of rationals being dense in real numbers:

I know when we say the rationals are dense in real is because between any two rationals we can find a irrational number. In other words we can approximate irrational numbers using rationals. I think a more precise definition would be is that any open ball around a irrational number will contain a rational number.

If what I said is correct, I am trying to think about what it means for $C[a,b]$ (which are the continuous complex valued functions on [a.b]) to be dense subspace of $L^2[a,b]$. From what I said above, I want to say that all functions in $L^2[a,b]$ can be approximated by functions from $C[a,b]$. Is the intuition correct here, what would the precise definition in this case?

Best Answer

Given a metric space $(X,\rho)$, we say that a subset $A$ of $X$ is dense in $X$ if, for each $\epsilon >0$ and $x\in X$ $$\tag 1 B(x,\epsilon)\cap A\neq \varnothing$$

This can be put more succinctly as ${\rm cl}\; A=X$. That is, the closure of $A$ is $X$. The assertion in $(1)$ is saying that $A$ is "everywhere": no matter what point we pick in $X$; and no matter how small a ball we choose, there will always be an element $a$ of $A$ in $B(x,\epsilon)$. And this means $\rho(x,a)<\epsilon$. So, the answer is "yes": we can approximate any $x\in X$ by any $a\in A$ within any prescribed degree of accuracy.

As an example, polynomials are dense in $C[a,b]$ with the $\sup$ metric. Given $f\in C[a,b]$, and $\epsilon >0$ we can find a polynomial $P$ such that $$\lVert f-P\rVert_\infty=\sup_{x\in [a,b]}|f(x)-P(x)|<\epsilon$$

ADD As Brian as commented, in the case of metric spaces we can translate the above to the following:

Let $(X,\rho)$ be a metric space, $A$ a subset of $X$. Then $A$ is dense in $X$ if and only if for each $x\in X$ there exists a sequence of points $\langle x_n\rangle$ in $A$ such that $x_n\to x$.

The proof is not complicated, so I invite you to give it.

The above happens to be true in metric spaces, but is not true in general, that is, for any topological space $(X,\mathscr T)$.

Related Question