Density as a Global and a Local Condition
A set can be smaller than its ambient space and still be dense in it. The definition of density uses the closure of the set, which gathers the set together with every point that cannot be excluded from it by an open neighborhood. A second test is often more direct: ask whether each nonempty open set contains at least one point of the set. We will prove that these tests are equivalent, then use them in spaces with different topologies.
Let \((X,\mathcal{T})\) be a topological space. A set is closed if its complement in \(X\) is open. For \(A\subseteq X\), its closure \(\overline{A}\) is the intersection of all closed subsets of \(X\) that contain \(A\). This intersection is itself closed and contains \(A\): arbitrary intersections of closed sets are closed, and \(X\) is one of the closed sets containing \(A\). In particular, \(\overline{A}\) is contained in every closed set that contains \(A\).
The open-set test must say nonempty open set: the empty set is open but does not meet any set. This detail also handles the empty space correctly. If \(X=\varnothing\), its only subset is \(A=\varnothing\), and \(\overline{A}=X\); the condition about nonempty open sets is vacuously satisfied.
The Equivalent Criteria
- \(A\) is dense in \(X\), that is, \(\overline{A}=X\);
- \(A\) meets every nonempty open subset of \(X\).
Proof. Suppose first that \(\overline{A}=X\). Let \(U\) be a nonempty open subset of \(X\), and suppose, for contradiction, that \(U\cap A=\varnothing\). Then \(A\subseteq X\setminus U\). Since \(U\) is open, \(X\setminus U\) is closed. The defining property of the closure gives \(\overline{A}\subseteq X\setminus U\). But \(\overline{A}=X\), so this would imply \(X\subseteq X\setminus U\), which is impossible because \(U\) is nonempty. Therefore \(U\cap A\ne\varnothing\).
Conversely, suppose that \(A\) meets every nonempty open subset of \(X\). We show that every point of \(X\) belongs to \(\overline{A}\). If some \(x\in X\) were outside \(\overline{A}\), then \(U=X\setminus\overline{A}\) would be open, because \(\overline{A}\) is closed. It would also be nonempty, since it contains \(x\). As \(A\subseteq\overline{A}\), we would have \(U\cap A=\varnothing\), contradicting the assumption. Thus every \(x\in X\) lies in \(\overline{A}\), so \(X\subseteq\overline{A}\). Since \(\overline{A}\subseteq X\), we get \(\overline{A}=X\). If \(X=\varnothing\), the conclusion holds as well: there are no points outside \(\overline{A}\), and there are no nonempty open sets. \(\square\)
The proof explains the role of open sets. A nonempty open set disjoint from \(A\) is a direct witness that \(A\) is not dense: its complement is a closed set containing \(A\) but not all of \(X\). Conversely, if the closure misses a point, the complement of the closure supplies such an open set.
Proof. If \(\overline{A}=X\), every closed set containing \(A\) contains \(\overline{A}\), by the definition of closure, and so must equal \(X\). Conversely, \(\overline{A}\) is a closed set containing \(A\). If \(X\) is the only such closed set, then \(\overline{A}=X\), which is the definition of density. \(\square\)
Applying the Open-Set Test
Worked Example: Removing One Point from the Real Line
Give \(\mathbb{R}\) its standard topology and let \(A=\mathbb{R}\setminus\{0\}\). We show that \(A\) is dense, even though it is not all of \(\mathbb{R}\).
Let \(U\) be any nonempty open subset of \(\mathbb{R}\). If \(U\) contains some \(x\ne0\), then \(x\in U\cap A\), so \(U\) meets \(A\). The remaining possibility is that \(U\) contains no nonzero point. Since \(U\) is nonempty, this would force \(U=\{0\}\). But \(\{0\}\) is not open in the standard topology: every open interval containing \(0\) also contains nonzero real numbers. Thus every nonempty open \(U\) meets \(A\), and the theorem gives \(\overline{A}=\mathbb{R}\).
For a direct check at the only point outside \(A\), let \(U\) be an open neighborhood of \(0\). By openness, there is \(\varepsilon>0\) such that \((-\varepsilon,\varepsilon)\subseteq U\). The point \(\varepsilon/2\) lies in this interval, is nonzero, and therefore belongs to \(U\cap A\). Points already in \(A\) belong to its closure because \(A\subseteq\overline{A}\). Hence every real number is in the closure, as claimed.
Check: \(A\ne\mathbb{R}\), since \(0\notin A\), but \(\overline{A}=\mathbb{R}\). Density therefore does not mean that a set contains every point of its space.
Worked Example: A Two-Point Space
Let \(X=\{a,b\}\) with topology \(\mathcal{T}=\{\varnothing,\{a\},X\}\), and take \(A=\{a\}\). The closed sets, found by taking complements of the open sets, are \(\varnothing,\{b\},X\). The only closed set containing \(\{a\}\) is \(X\), so \(\overline{A}=X\).
We can also use the open-set test. The nonempty open sets are \(\{a\}\) and \(X\). Their intersections with \(A\) are \(\{a\}\cap A=\{a\}\) and \(X\cap A=\{a\}\), both nonempty. Thus \(A\) is dense. Notice that \(A\) is a proper subset of \(X\).
For comparison, take \(B=\{b\}\). The nonempty open set \(\{a\}\) misses \(B\), so \(B\) is not dense. Indeed, the closed sets containing \(B\) are \(\{b\}\) and \(X\); their intersection is \(\{b\}\), hence \(\overline{B}=\{b\}\ne X\). The two tests give the same conclusion.
Worked Example: Even Integers in the Cofinite Topology
Let \(X=\mathbb{Z}\) with the cofinite topology: the open sets are \(\varnothing\) and all subsets whose complement in \(\mathbb{Z}\) is finite. Let \(A=\{2k:k\in\mathbb{Z}\}\), the set of even integers. We verify that \(A\) is dense.
Take any nonempty open set \(U\). Its complement \(\mathbb{Z}\setminus U\) is finite. The set \(A\) is infinite: for every positive integer \(n\), the distinct even integers \(2,4,\ldots,2n\) belong to \(A\). Therefore \(A\) cannot be contained in the finite set \(\mathbb{Z}\setminus U\). There must be an even integer in \(U\), which proves \(U\cap A\ne\varnothing\). The open-set criterion now gives \(\overline{A}=\mathbb{Z}\).
As a closure check, the closed sets are \(\mathbb{Z}\) and the finite subsets of \(\mathbb{Z}\), since they are complements of the stated open sets. No finite closed set can contain the infinite set \(A\). Thus the only closed set containing \(A\) is \(\mathbb{Z}\), again giving \(\overline{A}=\mathbb{Z}\).
This example also shows why density depends on the topology. In the discrete topology on \(\mathbb{Z}\), every subset is open. The nonempty open set \(\{0\}\) meets \(A\), but the nonempty open set \(\{1\}\) does not. Hence \(A\) is not dense in the discrete topology on the same underlying set.
Two Useful Consequences and a Common Pitfall
For a subset \(C\subseteq X\), its interior \(\operatorname{int}C\) is the union of all open subsets of \(X\) contained in \(C\). The open-set criterion also gives a complementary way to express density.
Proof. If \(\operatorname{int}(X\setminus A)\ne\varnothing\), then there is a nonempty open set \(U\subseteq X\setminus A\). It is disjoint from \(A\), so the dense-set criterion shows that \(A\) is not dense. Conversely, if \(A\) is not dense, the criterion gives a nonempty open set \(U\) with \(U\cap A=\varnothing\). This means \(U\subseteq X\setminus A\), so \(U\subseteq\operatorname{int}(X\setminus A)\), and the interior is nonempty. These implications prove the equivalence. \(\square\)
Common pitfall. A tempting but incorrect argument is: “\(A=\{a\}\) does not contain \(b\), so it is not dense in \(X=\{a,b\}\).” In the two-point topology above, that conclusion is wrong. The calculation \(\overline{\{a\}}=\{a\}\) silently treats the topology as if it were discrete. In the stated topology the closed sets containing \(\{a\}\) consist only of \(X\), so the correct calculation is \(\overline{\{a\}}=X\). Equivalently, each nonempty open set, \(\{a\}\) or \(X\), meets \(\{a\}\). Always use the open and closed sets of the topology actually specified.
The closure test is convenient when the closed sets containing \(A\) are easy to identify. The open-set test is useful when it is easier to check that no nonempty open region can avoid \(A\). Neither test says that every point outside \(A\) must belong to \(A\); rather, it says that the topology provides no nonempty open set separating those points from \(A\).
Check Your Understanding
For each question, identify the topology being used before applying a density criterion.
- In the standard topology on \(\mathbb{R}\), is \(\mathbb{R}\setminus\{3\}\) dense? Give a proof using nonempty open sets.
- In the discrete topology on a set \(X\), prove that \(A\subseteq X\) is dense if and only if \(A=X\).
- In the two-point space with topology \(\{\varnothing,\{a\},X\}\), determine whether \(\{b\}\) is dense, using both equivalent criteria.
- Prove that if a proper closed subset \(C\) of \(X\) contains \(A\), then \(A\) is not dense in \(X\).
- In the cofinite topology on an infinite set \(X\), explain why every infinite subset of \(X\) is dense.