In mathematics, a nowhere dense set in a topological space is a set whose 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 R, has the property that the interior has an empty closure, but it is not nowhere dense; in fact it is dense in R. Equivalently, a nowhere dense set is a set that is not dense in any nonempty open set.
The surrounding space matters: a set A may be nowhere dense when considered as a subspace of a topological space X but not when considered as a subspace of another topological space Y. A nowhere dense set is always dense in itself.
Every subset of a nowhere dense set is nowhere dense, and the union of finitely many nowhere dense sets is nowhere dense. That is, 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. The concept is important to formulate the Baire category theorem.
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/2n in lowest terms for positive integers a and n, and the intervals around them: (a/2n − 1/22n+1, a/2n + 1/22n+1). Since for each n this removes intervals adding up to at most 1/2n+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.