In mathematics, a subset of a topological space is called **nowhere dense** or **rare**^{[1]} 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.
The order of operations is important.
For example, the set of rational numbers, as a subset of the real numbers, ℝ, has the property that its *interior* has an empty *closure*, but it is not nowhere dense; in fact it is dense in ℝ.

The surrounding space matters: a set A may be nowhere dense when considered as a subset of a topological space X, but not when considered as a subset of another topological space Y. Notably, a set is always dense in its own subspace topology.

A countable union of nowhere dense sets is called a **meagre set**.
Meager sets play an important role in the formulation of the Baire category theorem.

## Characterizations

Let X be a topological space and S a subset of X. Then the following are equivalent:

- S is nowhere dense in X;
- (definition) the interior of the closure of S (both taken in X) is empty;
- the closure of S in X does not contain any non-empty open subset of X;
*S*∩*U*is not dense in any nonempty open subset U of X;- the complement in X of the closure of S is dense in X;
^{[1]} - every non-empty open subset V of X contains a non-empty open subset U of X such that
*U*∩*S*= ∅;^{[1]} - the closure of S is nowhere dense in X (according to any defining condition other than this one);
^{[1]}- to see this, recall that a subset of X has empty interior if and only if its complement is dense in X.

- (only for the case
*S*closed) S is equal to its boundary.^{[1]}

## Properties and sufficient conditions

- Suppose
*A*⊆*B*⊆*X*.- If A is nowhere dense in B then A is nowhere dense in X.
- If A is nowhere dense in X and B is an open subset of X then A is nowhere dense in B.
^{[1]}

- Every subset of a nowhere dense set is nowhere dense.
^{[1]} - The union of finitely many nowhere dense sets is nowhere dense.

Thus the nowhere dense sets form an ideal of sets, a suitable notion of negligible set.

The union of countably many nowhere dense sets, however, need not be nowhere dense.
(Thus, the nowhere dense sets need not form a sigma-ideal.)
Instead, such a union is called a **meagre set** or a **set of first category**.

## Examples

- The boundary of every open set and of every closed set is nowhere dense.
^{[1]} - The empty set is nowhere dense and in a discrete space, the empty set is the only nowhere dense subset.
^{[1]} - In a T
_{1}space, any singleton set that is not an isolated point is nowhere dense. - ℝ is nowhere dense in ℝ
^{2}.^{[1]} - ℤ is nowhere dense in ℝ but the rationals ℚ are
*not*.^{[1]} *S*= { 1/*n*:*n*∈ ℕ} is nowhere dense in ℝ: although the points get arbitrarily close to 0, the closure of the set is*S*∪ { 0 }, which has empty interior (and is thus also nowhere dense in ℝ).^{[1]}- ℤ ∪ [(
*a*,*b*) ∩ ℚ] is**not**nowhere dense in ℝ: it is dense in the interval [*a*,*b*], and in particular the interior of its closure is (*a*,*b*). - A vector subspace of a topological vector space is either dense or nowhere dense.
^{[1]}

## Open and closed

- A nowhere dense set need not be closed (for instance, the set { 1/
*n*:*n*∈ ℕ } is nowhere dense in the reals), but is properly contained in a nowhere dense closed set, namely its closure (which would add 0 to the example set). Indeed, a set is nowhere dense if and only if its closure is nowhere dense. - The complement of a closed nowhere dense set is a dense open set, and thus the complement of a nowhere dense set is a set with dense interior.
- The boundary of every open set is closed and nowhere dense.
- Every closed nowhere dense set is the boundary of an open set.

## 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.

For one 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 and n, and the intervals around them: (*a*/2^{n} − 1/2^{2n+1}, *a*/2^{n} + 1/2^{2n+1}).
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... 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 (else the complement of its closure would be a nonempty open set with measure zero, which is impossible).

## See also

## References

## Bibliography

- Khaleelulla, S. M. (1982).
*Counterexamples in Topological Vector Spaces*. Lecture Notes in Mathematics.**936**. Berlin, Heidelberg, New York: Springer-Verlag. ISBN 978-3-540-11565-6. OCLC 8588370. - Rudin, Walter (1991).
*Functional Analysis*. International Series in Pure and Applied Mathematics.**8**(Second ed.). New York, NY: McGraw-Hill Science/Engineering/Math. ISBN 978-0-07-054236-5. OCLC 21163277. - Narici, Lawrence; Beckenstein, Edward (2011).
*Topological Vector Spaces*. Pure and applied mathematics (Second ed.). Boca Raton, FL: CRC Press. ISBN 978-1584888666. OCLC 144216834. - Schaefer, Helmut H.; Wolff, Manfred P. (1999).
*Topological Vector Spaces*. GTM.**8**(Second ed.). New York, NY: Springer New York Imprint Springer. ISBN 978-1-4612-7155-0. OCLC 840278135. - Trèves, François (2006) [1967].
*Topological Vector Spaces, Distributions and Kernels*. Mineola, N.Y.: Dover Publications. ISBN 978-0-486-45352-1. OCLC 853623322.