[Math] the difference between dense and closed sets

examples-counterexamplesgeneral-topologyterminology

I am self studying topology and is a bit stuck on the difference between dense and closed sets. Intuitively, a dense set is a set where all elements are close to each other and a closed set is a set having all of its boundary points.

But to make this more concrete, can someone give me an example of a closed set that is not dense and a dense set that is not closed?

Thanks!

Best Answer

$[0,1]$ is a closed subset of $\mathbb R$ that is not dense. It contains all of its limit points, so it is closed. Some points in $\mathbb R$, for example $2$, are not limit points of this set, so the set is not dense.

$\mathbb Q$ is a dense subset of $\mathbb R$ that is not closed. It is not closed because it does not contain all of its limit points. For example $\sqrt 2$ is a limit point of this set because every open neighborhood of $\sqrt 2$ contains some rational numbers. It is dense because every point in $\mathbb R$ is one of its limit points.