Dense Sets in a Metric Space
We will now look at a new concept regarding metric spaces known as dense sets which we define below.
Definition: Let $(M, d)$ be a metric space and let $S \subseteq M$. Then $S$ is said to be Dense in $M$ if for every $x \in M$ and for every $r > 0$ we have that $B(x, r) \cap S \neq \emptyset$, i.e., every open ball in $(M, d)$ contains a point of $S$. |
In any metric space $(M, d)$ the whole set $M$ is always dense in $M$. Furthermore, the empty set $\emptyset$ is not dense in $M$.
For a less trivial example, consider the metric space $(\mathbb{R}, d)$ where $d$ is the usual Euclidean metric defined for all $x, y \in \mathbb{R}$ by $d(x, y) = \mid x - y \mid$, and consider the subset $\mathbb{Q} \subset \mathbb{R}$ of rational numbers.
The set $\mathbb{Q}$ is dense in $\mathbb{R}$ because for any open ball, i.e., for any $x \in \mathbb{R}$ and for any $r > 0$ we have that the open interval $(x - r, x + r)$ contains a rational number as we saw on The Density of Real Numbers Theorem page.
For a counterexample, consider the set $\mathbb{Z} \subset \mathbb{R}$ of integers. We claim that $\mathbb{Z}$ is not dense in $\mathbb{R}$. To show this, consider the following ball:
(1)Clearly $\mathbb{Z} \cap (0, 1) = \emptyset$ and so $\mathbb{Z}$ is not dense in $\mathbb{R}$.
We will now look at a nice theorem which tells us that for a metric space $(M, d)$ a set $S \subseteq M$ is dense in $M$ if and only if its closure equals $M$.
Theorem 1: Let $(M, d)$ be a metric space and let $S \subseteq M$. Then, $S$ is dense in $M$ if and only if $\bar{S} = M$. |
Recall from the Adherent, Accumulation, and Isolated Points in Metric Spaces page that $\bar{S}$ denotes the closure of $S$, and we defined the closure of $S$ to be the set of adherent points of $S$.
- Proof: $\Rightarrow$ Suppose that $S$ is dense in $M$. Then for all $x \in M$ and all $r > 0$ we have that:
- So every $x \in M$ is an adherent point of $S$. The set of all adherent points of $S$ is the closure of $S$, so $\bar{S} = M$.
- $\Leftarrow$ Suppose that $\bar{S} = M$. Then every point of $M$ is an adherent point of $S$, i.e., for all $x \in M$ and for all $r > 0$ we have that:
- Therefore $S$ is dense in $M$. $\blacksquare$