# Proving that a set $A$ is dense in $M$ iff $A^c$ has empty interior

Prove that a set $A$ is dense in a metric space $(M,d)$ iff $A^c$ has empty interior.

Attempt:

I think I proved the converse correctly, but I'm not sure how to start the forward direction.

$(\Leftarrow)$ Assume $A^c$ has empty interior. Show that $M=\operatorname{cl}(A)$, where $\operatorname{cl}(A)$ denotes the closure of $A$. We also note that $\operatorname{cl}(A)=(\operatorname{int}(A^c))^c=\emptyset^c=M$, where $\operatorname{int}(A^c)$ denotes the set of interior points of $A^c$.

$\blacksquare$

Any help would be appreciated. Thanks.

This stems from the more general fact (see this question) that given $A \subseteq X$ $$\operatorname{Int} (A) = X \setminus \overline{ X \setminus A },$$ or, equivalently, $\operatorname{Int}( X \setminus A ) = X \setminus \overline{A}$. (Note that this is valid in all topological spaces, not just metric spaces.)

So $A$ is dense if and only if $X = \overline{A}$ if and only if $\varnothing = X \setminus X = X \setminus \overline{A} = \operatorname{Int} ( X \setminus A )$.

$\implies$

Suppose that $A$ is dense in $M$. Then $cl(A)=M$. If $M$ is empty then the result is trivial. So assume $M\ne\phi$. The $cl(A)\ne \phi$. Then clearly, $A\ne \phi$ otherwise $A=\phi=cl(\phi)\ne M$. Thus $A\ne \phi \implies A^c=\phi$ and so its interior. $\blacksquare$

Converse what you have proved seems to be right.

• What if $A = \mathbb{Q}$ and $M = \mathbb{R}$? – fixedp Sep 19 '14 at 8:27
• $\mathbb{Q}$ is dense in $\mathbb{R}$. Also the set of irrationals has empty interior. – Hirak Sep 19 '14 at 8:33
• True, I suggest you take another look at the last implication in your proof. – fixedp Sep 19 '14 at 8:45
• @fixedp, Correct !! I will rectify that soon ! Thanks – Hirak Sep 20 '14 at 7:15
• why $A \neq \emptyset \Rightarrow A^{c} = \emptyset$? – user286485 Oct 11 '16 at 20:46

Just recall that in any topological space $$X$$ the closure of the complement is equal to the complement of the interior. Formally $$(E^\circ)^c=\overline{(E^c)}$$ for any $$E\subseteq X$$. Take $$E^\circ=\emptyset$$ for one implication. Assume $$E^c$$ to be dense to get the other implication.