# Nowhere dense set 3

Let $M \subset X,$ where $X$ is a metric space. Prove that if $M$ is nowhere dense(rare) in X, then the set $(X \setminus \overline{M}),$ is dense in $X$.

Actually, the converse is also true ,but I was able to prove the converse. With this side, I tried the following,

Given $x\in \overline{M}$, since $M$ is rare, we have $\mathrm{Int}(\overline{M})= \emptyset$. This means, $\forall r>0 \quad B(x,r) \cap (X \setminus \overline{M}) \ne \emptyset.$, In particular, we can take $r=1$ So, there exist an element $x_1 \in B(x,r) \cap (X \setminus \overline{M})$. Then , since $B(x,r) \cap (X \setminus \overline{M})$ is an open set, $\exists r_1 \leq \frac{1}{2}$ s.t $B(x_1, r_1) \in B(x,r) \cap (X \setminus \overline{M})$.

I'm trying to construct a sequence that converges to $x$, but I could not proceed from here. Was my starting point is wrong? If not, give me a direction to finish the proof.

Given $x \in X$ , we need to show that if $U\subset X$ is an open set containing $x$ ,it holds that $U \cap (X-\overline M) \ne \emptyset$.

if $x \in X-\overline M$ this is trivial.

otherwise $x \in \overline M$. $M$ is rare, so if $x \in U$ we have $U \cap(X- \overline M) \ne \emptyset$.

You are trying to show that $\overline{X \setminus \overline M} = X$. One way of describing the closure of a set is that $$x \in \overline A \iff \forall r > 0\ B(x,r) \cap A \not= \emptyset.$$

Select any point $x \in X$. Now select any number $r > 0$.

As you observed, since $\overline M$ has empty interior, $B(x,r) \not \subset \overline M$. This means $B(x,r)$ contains a point of $X \setminus \overline M$.

Thus $B(x,r) \cap (X \setminus \overline M) \not= \emptyset$ for all $r > 0$. This means $x \in \overline{X \setminus \overline M}$.