In
topology and related areas of
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a
subset ''A'' of a
topological space
In mathematics, a topological space is, roughly speaking, a Geometry, geometrical space in which Closeness (mathematics), closeness is defined but cannot necessarily be measured by a numeric Distance (mathematics), distance. More specifically, a to ...
''X'' is said to be dense in ''X'' if every point of ''X'' either belongs to ''A'' or else is arbitrarily "close" to a member of ''A'' — for instance, the
rational number
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example,
The set of all ...
s are a dense subset of the
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s because every real number either is a rational number or has a rational number arbitrarily close to it (see
Diophantine approximation
In number theory, the study of Diophantine approximation deals with the approximation of real numbers by rational numbers. It is named after Diophantus of Alexandria.
The first problem was to know how well a real number can be approximated ...
).
Formally,
is dense in
if the smallest
closed subset of
containing
is
itself.
The of a topological space
is the least
cardinality of a dense subset of
Definition
A subset
of a
topological space
In mathematics, a topological space is, roughly speaking, a Geometry, geometrical space in which Closeness (mathematics), closeness is defined but cannot necessarily be measured by a numeric Distance (mathematics), distance. More specifically, a to ...
is said to be a of
if any of the following equivalent conditions are satisfied:
- The smallest closed subset of containing is itself.
- The closure of in is equal to That is,
- The interior of the complement of is empty. That is,
- Every point in either belongs to or is a limit point of
- For every every
neighborhood
A neighbourhood (Commonwealth English) or neighborhood (American English) is a geographically localized community within a larger town, city, suburb or rural area, sometimes consisting of a single street and the buildings lining it. Neigh ...
of intersects that is,
- intersects every non-empty open subset of
and if
is a
basis of open sets for the topology on
then this list can be extended to include:
- For every every
neighborhood
A neighbourhood (Commonwealth English) or neighborhood (American English) is a geographically localized community within a larger town, city, suburb or rural area, sometimes consisting of a single street and the buildings lining it. Neigh ...
of intersects
- intersects every non-empty
Density in metric spaces
An alternative definition of dense set in the case of
metric spaces is the following. When the
topology of
is given by a
metric, the
closure of
in
is the
union of
and the set of all
limits of sequences of elements in
(its ''limit points''),
Then
is dense in
if
If
is a sequence of dense
open sets in a complete metric space,
then
is also dense in
This fact is one of the equivalent forms of the
Baire category theorem.
Examples
The
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s with the usual topology have the
rational number
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example,
The set of all ...
s as a
countable
In mathematics, a Set (mathematics), set is countable if either it is finite set, finite or it can be made in one to one correspondence with the set of natural numbers. Equivalently, a set is ''countable'' if there exists an injective function fro ...
dense subset which shows that the
cardinality of a dense subset of a topological space may be strictly smaller than the cardinality of the space itself. The
irrational numbers are another dense subset which shows that a topological space may have several
disjoint dense subsets (in particular, two dense subsets may be each other's complements), and they need not even be of the same cardinality. Perhaps even more surprisingly, both the rationals and the irrationals have empty interiors, showing that dense sets need not contain any non-empty open set. The intersection of two dense open subsets of a topological space is again dense and open.
[Suppose that and are dense open subset of a topological space If then the conclusion that the open set is dense in is immediate, so assume otherwise. Let is a non-empty open subset of so it remains to show that is also not empty. Because is dense in and is a non-empty open subset of their intersection is not empty. Similarly, because is a non-empty open subset of and is dense in their intersection is not empty. ]
The empty set is a dense subset of itself. But every dense subset of a non-empty space must also be non-empty.
By the
Weierstrass approximation theorem, any given
complex-valued continuous function defined on a
closed interval