# Dense-in-itself

In mathematics, a subset ${\displaystyle A}$ of a topological space is said to be dense-in-itself if ${\displaystyle A}$ contains no isolated points.

Every dense-in-itself closed set is perfect. Conversely, every perfect set is dense-in-itself.

A simple example of a set which is dense-in-itself but not closed (and hence not a perfect set) is the subset of irrational numbers (considered as a subset of the real numbers). This set is dense-in-itself because every neighborhood of an irrational number ${\displaystyle x}$ contains at least one other irrational number ${\displaystyle y\neq x}$. On the other hand, this set of irrationals is not closed because every rational number lies in its closure. For similar reasons, the set of rational numbers (also considered as a subset of the real numbers) is also dense-in-itself but not closed.

The above examples, the irrationals and the rationals, are also dense sets in their topological space, namely ${\displaystyle \mathbb {R} }$. As an example that is dense-in-itself but not dense in its topological space, consider ${\displaystyle \mathbb {Q} \cap [0,1]}$. This set is not dense in ${\displaystyle \mathbb {R} }$ but is dense-in-itself.

It is also interesting to note, although tautological, that the domain of a continuous function must be the union of dense-in-itself sets and/or isolated points.Template:Fact