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

general-topologyreal-analysis

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.

Best Answer

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 )$.