Tutorials › Topology (Undergraduate) › Dense Complements and Nowhere Dense Sets

Closed Sets, Closure, Interior and Boundary · Tutorial 124 of 799

Dense Complements and Nowhere Dense Sets

Learn how nowhere dense sets are characterized by dense open subsets of their complements, and how to tell this apart from a set being dense.

Intermediate 10 min read

What You'll Learn

  • Use the interior of the closure to test whether a set is nowhere dense
  • Prove the equivalence between nowhere density and containing a dense open subset in the complement
  • Identify the largest open set disjoint from a given set
  • Compute dense open complements for concrete subsets of the real line
  • Distinguish a nowhere dense set from a dense set, including the empty-space case

Nowhere Dense Sets and Their Complements

A set can be small in the topological sense of nowhere dense even when it is not closed. The right way to find an open set disjoint from it is therefore usually to remove its closure, not just the set itself. The resulting characterization connects nowhere density to dense open sets and makes precise why “the complement contains a dense open set” does not mean that the original set is dense.

Throughout, \((X,\mathcal{T})\) is a topological space. Recall that \(A\subseteq X\) is dense if \(\overline{A}=X\). Equivalently, every nonempty open subset of \(X\) intersects \(A\): if an open set misses \(A\), each of its points has a neighborhood missing \(A\), so none of those points is in \(\overline{A}\); conversely, a point outside \(\overline{A}\) has an open neighborhood missing \(A\). A set is nowhere dense if the interior of its closure is empty.

Definition: A subset \(A\subseteq X\) is nowhere dense when \(\operatorname{int}\overline{A}=\varnothing\). A subset \(G\subseteq X\) is dense open when it is open and \(\overline{G}=X\).

The closure in the definition matters: a set that has empty interior need not be nowhere dense if its closure has nonempty interior. We will show that the open set \(X\setminus\overline{A}\), rather than necessarily \(X\setminus A\), provides the key test.

The Dense-Open-Complement Characterization

Theorem: For any topological space \(X\) and any \(A\subseteq X\), \(A\) is nowhere dense if and only if there is a dense open set \(G\) such that \(G\subseteq X\setminus A\).

Proof. Suppose first that \(A\) is nowhere dense, so \(\operatorname{int}\overline{A}=\varnothing\). Set \(G=X\setminus\overline{A}\). The closure \(\overline{A}\) is closed, so \(G\) is open. Also, \(A\subseteq\overline{A}\), hence \(G\subseteq X\setminus A\). To verify density, suppose a nonempty open set \(U\) missed \(G\). Then \(U\subseteq X\setminus G=\overline{A}\), so \(U\subseteq\operatorname{int}\overline{A}\), contradicting \(\operatorname{int}\overline{A}=\varnothing\). Thus every nonempty open set meets \(G\), and \(G\) is dense.

Conversely, suppose \(G\) is dense and open and \(G\subseteq X\setminus A\). Then \(A\subseteq X\setminus G\). The set \(X\setminus G\) is closed, so \(\overline{A}\subseteq X\setminus G\). If \(\operatorname{int}\overline{A}\) were nonempty, it would be a nonempty open set contained in \(X\setminus G\), and therefore disjoint from \(G\). This contradicts the density of \(G\). Hence \(\operatorname{int}\overline{A}=\varnothing\), and \(A\) is nowhere dense. \(\square\)

The theorem gives a specific choice of \(G\): when \(A\) is nowhere dense, \(X\setminus\overline{A}\) is dense and open. It is also the largest open set disjoint from \(A\). Indeed, it is open and misses \(A\). If \(V\) is any open set disjoint from \(A\), then \(A\subseteq X\setminus V\), where \(X\setminus V\) is closed. The definition of closure gives \(\overline{A}\subseteq X\setminus V\), so \(V\subseteq X\setminus\overline{A}\).

Worked Example: Removing a Single Point

Let \(X=\mathbb{R}\) with its standard topology and \(A=\{0\}\). We will find a dense open subset of \(X\setminus A\).

The set \(\{0\}\) is closed, since its complement is open: for any \(x\ne0\), the interval \((x-|x|/2,x+|x|/2)\) contains \(x\) and does not contain \(0\). Thus \(\overline{A}=\{0\}\). This closed set has empty interior. In fact, every open neighborhood \((-r,r)\) of \(0\), with \(r>0\), contains \(r/2\ne0\), so no open neighborhood of \(0\) is contained in \(A\).

Consequently \(A\) is nowhere dense, and the theorem gives \(G=\mathbb{R}\setminus\{0\}\). This set is open by the closedness just checked. It is dense: any nonempty open subset of \(\mathbb{R}\) contains an open interval, and an open interval contains a point other than \(0\). Thus \(G\subseteq\mathbb{R}\setminus A\) is dense and open.

Check: although the complement of \(A\) is dense and open, \(A\) itself is not dense. Its closure is \(\{0\}\), not \(\mathbb{R}\).

Why the Closure Cannot Be Omitted

Worked Example: A Nowhere Dense Set That Is Not Closed

In \(\mathbb{R}\) with its standard topology, let \(A=\{1/n:n\in\mathbb{N}\}\). We compute its closure and use it to construct the dense open set.

First, \(0\in\overline{A}\): for every \(r>0\), choose \(n\in\mathbb{N}\) with \(n>1/r\). Then \(0<1/n<r\), so the neighborhood \((-r,r)\) meets \(A\). Every point \(1/n\) is in \(\overline{A}\) because it belongs to \(A\).

Now let \(x\notin \{0\}\cup A\). If \(x<0\), the neighborhood \((x-|x|/2,x+|x|/2)\) lies below \(0\) and misses \(A\). If \(x>0\), choose \(N\in\mathbb{N}\) so large that \(1/N<x/2\). For \(n\geq N\), \(1/n\leq1/N<x/2\), so \(x-1/n>x/2\). The finitely many terms \(1/n\) with \(n<N\) are all different from \(x\). If there are any such terms, the minimum of their positive distances from \(x\), together with \(x/2\), is positive; a ball about \(x\) of radius less than that minimum misses every term of \(A\). If there are no such terms, any radius less than \(x/2\) works. Therefore no point outside \(\{0\}\cup A\) lies in \(\overline{A}\), and \(\overline{A}=\{0\}\cup A\).

This closure has empty interior. A neighborhood of \(0\) contains negative points, which are not in \(\overline{A}\). For a neighborhood of \(1/n\) of radius \(r>0\), take \(\delta=\min(r/2,1/(2n(n+1)))\) and \(y=1/n+\delta\). If \(n=1\), then \(y>1\), so \(y\notin\overline{A}\). If \(n\geq2\), then \(1/n<y<1/(n-1)\), so \(y\) is not any reciprocal \(1/m\); also \(y\ne0\). In both cases \(y\) lies in the neighborhood and outside \(\overline{A}\). Thus \(A\) is nowhere dense.

The theorem gives \(G=\mathbb{R}\setminus(\{0\}\cup A)\), a dense open subset of \(\mathbb{R}\setminus A\). But \(\mathbb{R}\setminus A\) is not open: every neighborhood of \(0\) contains \(1/n\) for some \(n\), so \(0\in\mathbb{R}\setminus A\) has no neighborhood contained in \(\mathbb{R}\setminus A\). This shows why the dense open set is obtained by removing \(\overline{A}\), not necessarily by taking the complement of \(A\).

Dense Sets Are a Different Condition

Worked Example: The Rationals Are Dense but Not Nowhere Dense

Let \(A=\mathbb{Q}\subseteq\mathbb{R}\), with the standard topology on \(\mathbb{R}\). Every nonempty open interval \((a,b)\) contains a rational: choose \(n\in\mathbb{N}\) with \(n(b-a)>1\), and let \(m\) be the least integer strictly greater than \(na\). Then \(na<m\leq na+1<nb\), so \(a<m/n<b\). It follows that every nonempty open set meets \(\mathbb{Q}\), and \(\overline{\mathbb{Q}}=\mathbb{R}\).

Since \(\operatorname{int}\mathbb{R}=\mathbb{R}\), the rationals are not nowhere dense. In fact, no dense open set can be contained in \(\mathbb{R}\setminus\mathbb{Q}\): the characterization would imply that \(\mathbb{Q}\) is nowhere dense, contrary to the closure calculation. The condition in the theorem concerns a dense open subset of the complement; it does not say that the set itself is dense.

For comparison, \(\{0\}\) is nowhere dense but not dense, as the first example showed. When \(X\ne\varnothing\), a set cannot be both dense and nowhere dense: density gives \(\overline{A}=X\), hence \(\operatorname{int}\overline{A}=\operatorname{int}X=X\ne\varnothing\). If \(X=\varnothing\), the only subset is \(\varnothing\), which is both dense and nowhere dense; its complement \(X\) is open and dense in \(X\). This is the degenerate exception.

A Nonexample: An Interval

Worked Example: Why the Complement of an Interval Has No Dense Open Subset

Let \(A=(0,1)\subseteq\mathbb{R}\) with the standard topology. Its closure is \([0,1]\): every neighborhood of either endpoint meets \((0,1)\), every point of \((0,1)\) belongs to the closure, and points outside \([0,1]\) have neighborhoods missing \((0,1)\). The interior of \([0,1]\) is \((0,1)\), which is nonempty. Therefore \(A\) is not nowhere dense.

One can also see directly why no dense open set lies in \(\mathbb{R}\setminus A\). If an open set \(G\) is disjoint from \((0,1)\), it cannot contain \(0\) or \(1\), since every open neighborhood of either endpoint intersects \((0,1)\). Thus \(G\subseteq(-\infty,0)\cup(1,\infty)\), and the nonempty open interval \((1/3,2/3)\) misses \(G\). Hence \(G\) is not dense.

Common pitfall. A tempting but invalid step is to claim that the complement of any nowhere dense set is itself open. For \(A=\{1/n:n\in\mathbb{N}\}\), this would wrongly label \(\mathbb{R}\setminus A\) open. The point \(0\) belongs to that complement, but every neighborhood of \(0\) contains \(1/n\) for some \(n\), so no such neighborhood is contained in \(\mathbb{R}\setminus A\). The correct construction is \(\mathbb{R}\setminus\overline{A}\), which is open and dense.

The characterization is useful whenever a proof needs an open region avoiding a set. For a nowhere dense set, removing its closure produces such a region and leaves no nonempty open set outside it. Conversely, finding even one dense open set contained in the complement certifies that the closure of the original set has empty interior.

Check Your Understanding

For each question, distinguish carefully between the set being dense, the set being open, and the existence of a dense open subset of its complement.

  1. In \(\mathbb{R}\) with the standard topology, find a dense open subset of the complement of \(\mathbb{Z}\), and justify why it is dense.
  2. Can a nonempty nowhere dense subset of a space also be dense? Explain using the definitions.
  3. For \(A=\{1/n:n\in\mathbb{N}\}\), why is \(\mathbb{R}\setminus\overline{A}\) open while \(\mathbb{R}\setminus A\) is not?
  4. Show that if \(G\) is dense and open, then \(X\setminus G\) is nowhere dense.
  5. What is the relationship between density and nowhere density for the unique subset of the empty space?