From Density to Countability
The previous tutorial described density as the ability to approximate every point of a metric space by points from a chosen subset. Separable spaces combine that approximation property with a countability requirement: they can be approximated using a set with only countably many points. The key is not that the space itself must be countable, but that one countable set can come arbitrarily close to all its points.
Throughout, \((X,d)\) is a metric space. As before, balls and closures are taken in the space under discussion. We regard finite sets as countable, so “countable” here means finite or countably infinite. This convention includes the empty space without a special exception.
The definition is relative to the metric, because density is relative to the metric. A countable subset might be dense for one metric and fail to be dense for another. Also, separability does not mean that \(X\) itself is countable: a countable set can have closure equal to a much larger space.
A useful way to recognize separability is through a countable collection of open sets that can describe every open region. This collection is called a base.
A base need not consist of balls, though metric balls are a natural way to build one. The condition says that every point in every open set can be enclosed in a base element that remains inside that open set. The following theorem makes the connection between a countable dense set and a countable base precise.
Proof. First suppose \(X\) is separable, and let \(D\) be a countable dense subset. Consider the collection \[ \mathcal{B}=\{B_q(a):a\in D,\ q\in\mathbb{Q},\ q>0\}. \] This collection is countable: it is indexed by pairs from the countable sets \(D\) and \(\mathbb{Q}_{>0}\). Each member is open, since open balls are open.
We show that \(\mathcal{B}\) is a base. Let \(U\subseteq X\) be open, and take \(x\in U\). Since \(U\) is open, there is an \(r>0\) such that \(B_r(x)\subseteq U\). Density of \(D\) gives \(a\in D\) with \(d(x,a)<r/3\). The interval \((d(x,a),\,r-d(x,a))\) is nonempty, because \(2d(x,a)<2r/3<r\). By density of the rational numbers in the real line, choose a rational \(q\) in that interval. In particular, \[ d(x,a)<q \quad\text{and}\quad q<r-d(x,a). \] The first inequality gives \(x\in B_q(a)\). If \(y\in B_q(a)\), the triangle inequality gives \[ d(y,x)\leq d(y,a)+d(a,x)<q+d(a,x)<r. \] Thus \(B_q(a)\subseteq B_r(x)\subseteq U\). This proves that \(\mathcal{B}\) is a base, so \(X\) is second countable.
Conversely, suppose \(X\) has a countable base \(\mathcal{B}\). From each nonempty member \(B\in\mathcal{B}\), choose a point \(x_B\in B\), and let \(D\) be the set of all chosen points. Since \(\mathcal{B}\) is countable, \(D\) is countable. To prove that \(D\) is dense, take any nonempty open set \(U\). Choose \(x\in U\). The base property gives a \(B\in\mathcal{B}\) with \(x\in B\subseteq U\). This \(B\) is nonempty, so its chosen point \(x_B\) belongs to \(D\cap U\). Every nonempty open set therefore meets \(D\). By the Equivalent Tests for Density from the previous tutorial, \(D\) is dense in \(X\). Hence \(X\) is separable. If \(X\) is empty, the empty collection is a countable base and the empty set is a countable dense subset, so the equivalence still holds. \(\square\)
Building Countable Dense Sets
The first direction of the theorem gives a practical construction: take points from a countable dense set and balls of rational radius around them. These balls form a countable base. In Euclidean spaces, rational coordinates provide the countable set from which the construction starts.
Worked Example: A Countable Dense Subset of Three-Dimensional Space
We show directly that \(\mathbb{Q}^3\) is dense in \(\mathbb{R}^3\) with the Euclidean metric. It is countable because it is a finite Cartesian product of countable sets. Fix \(x=(x_1,x_2,x_3)\in\mathbb{R}^3\) and \(r>0\). Density of \(\mathbb{Q}\) in \(\mathbb{R}\) lets us choose \(q_i\in\mathbb{Q}\) such that \[ |x_i-q_i|<\frac{r}{2\sqrt{3}} \qquad (i=1,2,3). \] Then \(q=(q_1,q_2,q_3)\in\mathbb{Q}^3\), and \[ d_2(x,q) =\sqrt{(x_1-q_1)^2+(x_2-q_2)^2+(x_3-q_3)^2} <\sqrt{3\left(\frac{r}{2\sqrt{3}}\right)^2} =\frac r2 <r. \] Thus every ball centered at every point of \(\mathbb{R}^3\) meets \(\mathbb{Q}^3\). The ball test for density shows that \(\mathbb{Q}^3\) is dense, and its countability proves that \(\mathbb{R}^3\) is separable.
The coordinate tolerance is chosen to control the Euclidean distance after all three squared errors are added. Choosing each coordinate error merely less than \(r\) would not by itself give the required distance bound.
Worked Example: Every Countable Metric Space Is Separable
Let \(X\) be a countable metric space. The subset \(D=X\) is countable and is dense in \(X\): for every \(x\in X\) and every \(r>0\), the point \(x\) itself belongs to \(B_r(x)\cap D\). Hence \(X\) is separable.
This example also includes finite metric spaces. In a finite or countable space, no special approximation construction is needed; the whole space itself is a countable dense subset. The definition of separability becomes more informative when the space is uncountable.
Separability Passes to Subspaces
A countable dense set in \(X\) need not remain dense after intersecting it with a subset \(A\). Nevertheless, if \(X\) is separable, the subspace \(A\) always has some countable dense subset of its own. The countable-base characterization makes this inheritance result straightforward.
Proof. Since \(X\) is separable, the Separability and Second Countability Theorem gives a countable base \(\mathcal{B}\) for \(X\). Consider the collection \[ \mathcal{B}_A=\{B\cap A:B\in\mathcal{B}\}. \] It is countable. Each \(B\cap A\) is open in the subspace \(A\), by the definition of the subspace topology.
To verify the base property, let \(V\) be open in \(A\), and let \(a\in V\). By the definition of the subspace topology, there is an open set \(U\subseteq X\) with \(V=U\cap A\). Since \(a\in U\), the base property in \(X\) gives \(B\in\mathcal{B}\) such that \(a\in B\subseteq U\). Therefore \[ a\in B\cap A\subseteq U\cap A=V. \] So \(\mathcal{B}_A\) is a countable base for \(A\). Applying the Separability and Second Countability Theorem to the metric subspace \(A\) proves that \(A\) is separable. If \(A\) is empty, it is separable by taking the empty dense subset. \(\square\)
The proof establishes a general method: a countable base in an ambient space restricts to a countable base on every subspace. The countable dense subset obtained for \(A\) need not be the intersection of an already chosen dense subset of \(X\) with \(A\).
Worked Example: The Diagonal Line in the Plane Is Separable
Let \(A=\{(x,x):x\in\mathbb{R}\}\subseteq\mathbb{R}^2\), with the restricted Euclidean metric. The set \[ D=\{(q,q):q\in\mathbb{Q}\} \] is countable. We check that it is dense in \(A\). Fix \((x,x)\in A\) and \(r>0\). Choose \(q\in\mathbb{Q}\) such that \(|x-q|<r/2\). Then \((q,q)\in D\), and \[ d_2\big((x,x),(q,q)\big) =\sqrt{(x-q)^2+(x-q)^2} =\sqrt{2}\,|x-q| <\frac{\sqrt{2}}{2}r <r. \] Thus every ball in the subspace centered at a point of \(A\) meets \(D\), so \(D\) is dense in \(A\). The diagonal line is separable, although it is uncountable.
What Separability Does Not Guarantee
Separability is weaker than countability. The diagonal-line example and the rational-coordinate example show that uncountable metric spaces can have countable dense subsets. Conversely, an uncountable metric space need not be separable: the discrete metric makes approximation especially restrictive.
Worked Example: An Uncountable Discrete Metric Space Is Not Separable
Give \(\mathbb{R}\) the discrete metric \(\delta\), where \(\delta(x,y)=0\) if \(x=y\) and \(\delta(x,y)=1\) otherwise. If \(D\subseteq\mathbb{R}\) is dense in this metric, then for every \(x\in\mathbb{R}\) the ball \(B_{1/2}(x)\) must meet \(D\). But \(B_{1/2}(x)=\{x\}\), since \(\delta(x,y)<1/2\) holds exactly when \(y=x\). Hence \(x\in D\) for every \(x\in\mathbb{R}\), which forces \(D=\mathbb{R}\). No countable subset can be dense, so this uncountable discrete metric space is not separable.
More generally, a discrete metric space is separable exactly when its underlying set is countable: every dense subset must be the whole space, and the whole space is dense in itself.
A common pitfall is to assume that intersecting any dense set with a subspace gives a dense set in that subspace. For example, \(\mathbb{Q}\) is dense in the usual metric on \(\mathbb{R}\), but \(\mathbb{Q}\cap\{\sqrt{2}\}=\varnothing\), which is not dense in the one-point subspace \(\{\sqrt{2}\}\). The subspace theorem does not assert that every such intersection works. It guarantees the existence of a countable dense subset chosen for the subspace itself.
The countable-base viewpoint explains why separability is useful beyond finding approximations to individual points. A countable base provides a countable collection of open sets sufficient to describe all open regions of a metric space. It also gives a route to results about subspaces without having to construct a new dense set separately for each one.
Check Your Understanding
Use the definitions and proofs in this tutorial to answer the following questions.
- What does it mean for a metric space to be separable?
- How are balls with centers in a countable dense set and positive rational radii used to form a base?
- Why does choosing one point from each nonempty member of a countable base produce a dense set?
- Why does a countable base for \(X\) give a countable base for a subspace \(A\subseteq X\)?
- Why is an uncountable discrete metric space not separable?
- Why does the Subspaces of Separable Metric Spaces theorem not imply that \(D\cap A\) is dense in \(A\) for every dense \(D\subseteq X\)?