In mathematics, a subset
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
The above examples, the irrationals and the rationals, are also dense sets in their topological space, namely