Nowhere dense set

In mathematics, a subset of a topological space is called nowhere dense or rare if its closure has empty interior. In a very loose sense, it is a set whose elements are not tightly clustered (as defined by the topology on the space) anywhere. For example, the integers are nowhere dense among the reals, whereas the interval (0, 1) is not nowhere dense.

A countable union of nowhere dense sets is called a meagre set. Meagre sets play an important role in the formulation of the Baire category theorem, which is used in the proof of several fundamental results of functional analysis.

Definition
Density nowhere can be characterized in different (but equivalent) ways. The simplest definition is the one from density: "A subset $S$ of a topological space $X$ is said to be dense in another set $U$ if the intersection $S \cap U$ is a dense subset of $U.$ $S$ is ' or ' in $X$ if $S$ is not dense in any nonempty open subset $U$ of $X.$" Expanding out the negation of density, it is equivalent to require that each nonempty open set $$U$$ contains a nonempty open subset disjoint from $$S.$$ It suffices to check either condition on a base for the topology on $$X.$$  In particular, density nowhere in $$\R$$ is often described as being dense in no open interval.

Definition by closure
The second definition above is equivalent to requiring that the closure, $$\operatorname{cl}_X S,$$ cannot contain any nonempty open set. This is the same as saying that the interior of the closure of $$S$$ is empty; that is,"$\operatorname{int}_X \left(\operatorname{cl}_X S\right) = \varnothing.$"Alternatively, the complement of the closure $$X \setminus \left(\operatorname{cl}_X S\right)$$ must be a dense subset of $$X;$$ in other words, the exterior of $$S$$ is dense in $$X.$$

Properties
The notion of nowhere dense set is always relative to a given surrounding space. Suppose $$A\subseteq Y\subseteq X,$$ where $$Y$$ has the subspace topology induced from $$X.$$ The set $$A$$ may be nowhere dense in $$X,$$ but not nowhere dense in $$Y.$$  Notably, a set is always dense in its own subspace topology. So if $$A$$ is nonempty, it will not be nowhere dense as a subset of itself. However the following results hold:
 * If $$A$$ is nowhere dense in $$Y,$$ then $$A$$ is nowhere dense in $$X.$$
 * If $$Y$$ is open in $$X$$, then $$A$$ is nowhere dense in $$Y$$ if and only if $$A$$ is nowhere dense in $$X.$$
 * If $$Y$$ is dense in $$X$$, then $$A$$ is nowhere dense in $$Y$$ if and only if $$A$$ is nowhere dense in $$X.$$

A set is nowhere dense if and only if its closure is.

Every subset of a nowhere dense set is nowhere dense, and a finite union of nowhere dense sets is nowhere dense. Thus the nowhere dense sets form an ideal of sets, a suitable notion of negligible set. In general they do not form a 𝜎-ideal, as meager sets, which are the countable unions of nowhere dense sets, need not be nowhere dense. For example, the set $$\Q$$ is not nowhere dense in $$\R.$$

The boundary of every open set and of every closed set is closed and nowhere dense. A closed set is nowhere dense if and only if it is equal to its boundary, if and only if it is equal to the boundary of some open set (for example the open set can be taken as the complement of the set). An arbitrary set $$A\subseteq X$$ is nowhere dense if and only if it is a subset of the boundary of some open set (for example the open set can be taken as the exterior of $$A$$).

Examples

 * The set $$S=\{1/n:n=1,2,...\}$$ and its closure $$S\cup\{0\}$$ are nowhere dense in $$\R,$$ since the closure has empty interior.
 * $$\R$$ viewed as the horizontal axis in the Euclidean plane is nowhere dense in $$\R^2.$$
 * $$\Z$$ is nowhere dense in $$\R$$ but the rationals $$\Q$$ are not (they are dense everywhere).
 * $$\Z \cup [(a, b) \cap \Q]$$ is  nowhere dense in $$\R$$: it is dense in the open interval $$(a,b),$$ and in particular the interior of its closure is $$(a,b).$$
 * The empty set is nowhere dense. In a discrete space, the empty set is the  nowhere dense set.
 * In a T1 space, any singleton set that is not an isolated point is nowhere dense.
 * A vector subspace of a topological vector space is either dense or nowhere dense.

Nowhere dense sets with positive measure
A nowhere dense set is not necessarily negligible in every sense. For example, if $$X$$ is the unit interval $$[0, 1],$$ not only is it possible to have a dense set of Lebesgue measure zero (such as the set of rationals), but it is also possible to have a nowhere dense set with positive measure. One such example is the Smith–Volterra–Cantor set.

For another example (a variant of the Cantor set), remove from $$[0, 1]$$ all dyadic fractions, i.e. fractions of the form $$a/2^n$$ in lowest terms for positive integers $$a, n \in \N,$$ and the intervals around them: $$\left(a/2^n - 1/2^{2n+1}, a/2^n + 1/2^{2n+1}\right).$$ Since for each $$n$$ this removes intervals adding up to at most $$1/2^{n+1},$$ the nowhere dense set remaining after all such intervals have been removed has measure of at least $$1/2$$ (in fact just over $$0.535\ldots$$ because of overlaps ) and so in a sense represents the majority of the ambient space $$[0, 1].$$ This set is nowhere dense, as it is closed and has an empty interior: any interval $$(a, b)$$ is not contained in the set since the dyadic fractions in $$(a, b)$$ have been removed.

Generalizing this method, one can construct in the unit interval nowhere dense sets of any measure less than $$1,$$ although the measure cannot be exactly 1 (because otherwise the complement of its closure would be a nonempty open set with measure zero, which is impossible).

For another simpler example, if $$U$$ is any dense open subset of $$\R$$ having finite Lebesgue measure then $$\R \setminus U$$ is necessarily a closed subset of $$\R$$ having infinite Lebesgue measure that is also nowhere dense in $$\R$$ (because its topological interior is empty). Such a dense open subset $$U$$ of finite Lebesgue measure is commonly constructed when proving that the Lebesgue measure of the rational numbers $$\Q$$ is $$0.$$ This may be done by choosing any bijection $$f : \N \to \Q$$ (it actually suffices for $$f : \N \to \Q$$ to merely be a surjection) and for every $$r > 0,$$ letting $$U_r ~:=~ \bigcup_{n \in \N} \left(f(n) - r/2^n, f(n) + r/2^n\right) ~=~ \bigcup_{n \in \N} f(n) + \left(- r/2^n, r/2^n\right)$$ (here, the Minkowski sum notation $$f(n) + \left(- r/2^n, r/2^n\right) := \left(f(n) - r/2^n, f(n) + r/2^n\right)$$ was used to simplify the description of the intervals). The open subset $$U_r$$ is dense in $$\R$$ because this is true of its subset $$\Q$$ and its Lebesgue measure is no greater than $$\sum_{n \in \N} 2 r / 2^n = 2 r.$$ Taking the union of closed, rather than open, intervals produces the F$\sigma$-subset $$S_r ~:=~ \bigcup_{n \in \N} f(n) + \left[- r/2^n, r/2^n\right]$$ that satisfies $$S_{r/2} \subseteq U_r \subseteq S_r \subseteq U_{2r}.$$ Because $$\R \setminus S_r$$ is a subset of the nowhere dense set $$\R \setminus U_r,$$ it is also nowhere dense in $$\R.$$ Because $$\R$$ is a Baire space, the set $$D := \bigcap_{m=1}^{\infty} U_{1/m} = \bigcap_{m=1}^{\infty} S_{1/m}$$ is a dense subset of $$\R$$ (which means that like its subset $$\Q,$$ $$D$$ cannot possibly be nowhere dense in $$\R$$) with $$0$$ Lebesgue measure that is also a nonmeager subset of $$\R$$ (that is, $$D$$ is of the second category in $$\R$$), which makes $$\R \setminus D$$ a comeager subset of $$\R$$ whose interior in $$\R$$ is also empty; however, $$\R \setminus D$$ is nowhere dense in $$\R$$ if and only if its in $$\R$$ has empty interior. The subset $$\Q$$ in this example can be replaced by any countable dense subset of $$\R$$ and furthermore, even the set $$\R$$ can be replaced by $$\R^n$$ for any integer $$n > 0.$$