Countable Sets That Reach Every Open Region
A countable basis describes open sets throughout a space. A different kind of countability asks for only a countable collection of points, positioned so that every open region contains at least one of them. The preceding tutorial established that every second-countable space is separable. Here we study separability itself: what density means in this setting, how separability behaves under continuous maps, and what changes when a metric is available.
The distinction between points and open sets is important. A countable dense subset need not be a basis, and in a general topological space it need not provide enough information to construct one. For metric spaces, however, the distances to a countable dense set can be combined with rational radii to produce a countable basis.
Definition and an Open-Set Test for Density
Density can be checked without calculating a closure explicitly. Recall the neighborhood characterization of closure: a point lies in the closure of a set exactly when every open neighborhood of that point meets the set.
Proof. Suppose first that \(D\) is dense, so \(\overline{D}=X\). Let \(U\) be a nonempty open set and choose \(x\in U\). Since \(x\in\overline{D}\), every open neighborhood of \(x\) meets \(D\); in particular, \(U\cap D\ne\varnothing\).
Conversely, suppose every nonempty open set meets \(D\). Fix \(x\in X\). Every open neighborhood \(U\) of \(x\) is nonempty, so it meets \(D\). The neighborhood characterization gives \(x\in\overline{D}\). This holds for each \(x\in X\), hence \(\overline{D}=X\). If \(X=\varnothing\), both conditions hold for \(D=\varnothing\). \(\square\)
This test is often the practical way to prove density: take an arbitrary nonempty open set and find a point of the proposed dense subset inside it. It also makes clear that a dense set can be much smaller than the whole space. Density does not require containing every point; it requires meeting every nonempty open region.
Worked Example: A Countable Dense Subset of the Plane
Consider \(\mathbb{R}^2\) with its usual Euclidean topology and let \(D=\mathbb{Q}\times\mathbb{Q}\). This set is countable because it is a product of two countable sets. We verify that it is dense.
Let \(U\subseteq\mathbb{R}^2\) be nonempty and open, and choose \((x,y)\in U\). There is \(\varepsilon>0\) such that the Euclidean ball of radius \(\varepsilon\) around \((x,y)\) lies in \(U\). Choose rationals \(p,q\) with \(|p-x|<\varepsilon/3\) and \(|q-y|<\varepsilon/3\). Then \[ \sqrt{(p-x)^2+(q-y)^2} <\sqrt{2}\,\varepsilon/3 <\varepsilon. \] Thus \((p,q)\in U\cap D\). Every nonempty open set meets \(D\), so \(D\) is dense and \(\mathbb{R}^2\) is separable.
The calculation uses a countable set of points but does not require a countable list of all open sets. The open-set test lets us verify density by considering an arbitrary open neighborhood.
Continuous Images Preserve Separability
A continuous map may identify points or change the shape of a space, but it cannot send a dense subset so far away that an open part of the image is missed. The correct conclusion concerns the image equipped with its subspace topology; without surjectivity, it does not say that the image is dense in the entire target space.
Proof. Choose a countable dense subset \(D\subseteq X\). Its image \(f[D]\) is countable. We show that \(f[D]\) is dense in \(f[X]\).
Let \(V\) be a nonempty open subset of \(f[X]\). By the subspace topology theorem, there is an open set \(O\subseteq Y\) such that \(V=O\cap f[X]\). Choose \(y\in V\). Since \(y\in f[X]\), there is \(x\in X\) with \(f(x)=y\), and \(x\in f^{-1}(O)\). Continuity implies that \(f^{-1}(O)\) is open in \(X\); it is nonempty because it contains \(x\). Density of \(D\) therefore gives \(d\in D\cap f^{-1}(O)\). Then \(f(d)\in f[D]\), and \(f(d)\in O\cap f[X]=V\). Thus every nonempty open subset of \(f[X]\) meets \(f[D]\). The open-set test shows that \(f[D]\) is dense in \(f[X]\), proving the result. If \(X=\varnothing\), its image is empty and the conclusion holds as well. \(\square\)
Worked Example: A Countable Dense Set on the Circle
Let \(f:\mathbb{R}\to\mathbb{R}^2\) be given by \(f(t)=(\cos t,\sin t)\). This map is continuous, and its image is the unit circle \(S^1=\{(u,v)\in\mathbb{R}^2:u^2+v^2=1\}\). The rationals \(\mathbb{Q}\) are countable and dense in \(\mathbb{R}\). The continuous-image theorem shows that \(f[\mathbb{Q}]\) is countable and dense in \(S^1\), with the subspace topology.
For instance, the values \(f(q)\) need not include every point of the circle. Their density says instead that every nonempty relatively open arc of the circle contains some \(f(q)\). This is exactly the conclusion the theorem supplies: density in the image, not equality of the image of the dense set with the whole image.
Separability and Second-Countability in Metric Spaces
In a metric space, a countable dense set gives a way to build a countable basis. Use points of the dense set as centers and positive rational numbers as radii. The resulting balls can be chosen small enough to fit inside any prescribed open neighborhood.
Proof. Let \((X,d)\) be a separable metric space and choose a countable dense subset \(D\subseteq X\). Consider the family \[ \mathcal{B}=\{B_r(a):a\in D,\ r\in\mathbb{Q},\ r>0\}, \] where \(B_r(a)=\{z\in X:d(z,a)<r\}\). This family is countable because it is indexed by the countable set \(D\times\mathbb{Q}_{>0}\), and its members are open sets.
We verify the basis property. Let \(U\subseteq X\) be open and \(x\in U\). There is \(\varepsilon>0\) such that \(B_\varepsilon(x)\subseteq U\). By density, choose \(a\in D\) with \(\delta=d(x,a)<\varepsilon/3\). Since \(\delta<\varepsilon-\delta\), there is a positive rational number \(r\) satisfying \[ \delta<r<\varepsilon-\delta. \] The first inequality gives \(x\in B_r(a)\). If \(z\in B_r(a)\), the triangle inequality gives \[ d(z,x)\leq d(z,a)+d(a,x)<r+\delta<\varepsilon. \] Consequently \(z\in B_\varepsilon(x)\subseteq U\), so \(x\in B_r(a)\subseteq U\). Every point of every open set therefore lies in a member of \(\mathcal{B}\) contained in that open set. Hence \(\mathcal{B}\) is a countable basis. If \(X=\varnothing\), the empty family is a countable basis, so the conclusion also holds in that case. \(\square\)
Combining this theorem with the result from “Second-Countable Spaces” gives a useful equivalence: a metric space is separable if and only if it is second-countable. The metric matters in the direction just proved: it lets us turn centers and radii into basis neighborhoods. For general topological spaces, separability alone need not give a countable basis.
Worked Example: A Separable Metric Space with a Countable Basis
Let \(C([0,1])\) denote the set of continuous real-valued functions on \([0,1]\), equipped with the metric \(d(f,g)=\sup_{x\in[0,1]}|f(x)-g(x)|\). The polynomials with rational coefficients form a countable family and are dense in this metric, by the Weierstrass approximation theorem together with approximation of finitely many real coefficients by rationals. Thus this metric space is separable.
The theorem then guarantees a countable basis consisting of balls centered at rational-coefficient polynomials with positive rational radii. For example, if \(p\) is such a polynomial and \(r\) is a positive rational, one of the basis sets is \[ \{g\in C([0,1]):\sup_{x\in[0,1]}|g(x)-p(x)|<r\}. \] The theorem does not claim these balls are the only open sets; rather, every open set is a union of such basis members. This illustrates how the metric converts a countable dense collection into a countable description of the topology.
Separability Need Not Pass to Subspaces
Every subspace of a second-countable space is second-countable, as proved earlier in the course. Separability behaves differently in general: a subspace of a separable space need not be separable. The following construction makes the distinction explicit.
Worked Example: A Separable Space with a Nonseparable Subspace
Let \(A\) be an uncountable set, let \(N\) be a countably infinite set disjoint from \(A\), and put \(X=A\cup N\). Define a basis to consist of the sets \(N\setminus F\) and \(\{a\}\cup(N\setminus F)\), where \(F\) ranges over finite subsets of \(N\) and \(a\in A\).
These sets satisfy the basis conditions. They cover \(X\): sets of the first kind contain every point of \(N\), and a set of the second kind contains each specified \(a\in A\). For the intersection condition, two sets of the first kind intersect in \(N\setminus(F\cup G)\), which is another set of the first kind. A set of the first kind and one of the second intersect in a set of the first kind. Two sets of the second kind with distinct \(A\)-points intersect in a set of the first kind; if their \(A\)-points agree, their intersection is of the second kind. Thus they generate a topology.
Every basis member meets \(N\), since removing a finite subset from the infinite set \(N\) leaves points. Therefore every nonempty open set meets \(N\), and the open-set test shows that \(N\) is dense in \(X\). The space \(X\) is separable.
Now give \(A\) the subspace topology inherited from \(X\). For each \(a\in A\), the basic open set \(\{a\}\cup N\) intersects \(A\) in \(\{a\}\). Thus every singleton in \(A\) is open in the subspace, so \(A\) has the discrete topology. A dense subset of a discrete space must contain every point: if \(a\) were omitted, the nonempty open set \(\{a\}\) would not meet it. Since \(A\) is uncountable, it has no countable dense subset. Hence \(A\) is not separable, despite being a subspace of the separable space \(X\).
A Metric Space That Is Not Separable
Separability is not automatic even for metric spaces. A useful way to prove nonseparability is to find uncountably many points that stay a fixed positive distance apart. Small balls around those points are disjoint, so a dense set must provide a different point for each ball.
Worked Example: Bounded Sequences with the Supremum Metric
Let \(\ell^\infty\) be the set of bounded real sequences, with metric \(d(x,y)=\sup_{n\geq1}|x_n-y_n|\). For each subset \(S\subseteq\mathbb{N}\), let \(x^S\) be the sequence whose \(n\)-th term is \(1\) if \(n\in S\) and \(0\) otherwise. There are uncountably many such sequences, since the collection of subsets of \(\mathbb{N}\) is uncountable.
If \(S\ne T\), some index belongs to exactly one of \(S,T\), so at that coordinate \(|x^S_n-x^T_n|=1\). At every coordinate the difference is at most \(1\), giving \(d(x^S,x^T)=1\). The open balls \(B_{1/3}(x^S)\) are pairwise disjoint: if a point \(z\) belonged to both \(B_{1/3}(x^S)\) and \(B_{1/3}(x^T)\), then the triangle inequality would give \[ 1=d(x^S,x^T)\leq d(x^S,z)+d(z,x^T)<2/3, \] a contradiction.
Every one of these balls is nonempty and open. A dense subset must meet each one, and because the balls are pairwise disjoint, those intersections must supply distinct points. There are uncountably many balls, so no countable set can meet them all. Thus \(\ell^\infty\) is not separable.
What Separability Tells Us
A countable dense set provides a countable collection of points that detects every nonempty open region. Continuous maps preserve this property in their images. In metric spaces, it has an additional consequence: rational-radius balls centered at the dense set form a countable basis, so separability and second-countability are equivalent there.
Two pitfalls are worth keeping in view. First, density is relative to a topology: a subset may be dense in one space and fail to be dense when placed in a different space. Second, separability is not generally inherited by subspaces, even though second-countability is. The constructed example separates these properties; the metric theorem explains why the distinction disappears for metric spaces.
Check Your Understanding
Use the definitions and results above to answer the following questions.
- How can density be tested using nonempty open sets?
- Why does continuity ensure that the image of a dense set is dense in the image space?
- In the metric-space theorem, why are rational radii sufficient to refine an arbitrary open neighborhood?
- Which earlier result combines with the metric-space theorem to give an equivalence?
- Why does the constructed subspace \(A\) have no countable dense subset?
- In the supremum-metric example, why must a dense set meet uncountably many distinct balls with distinct points?