Show that a subset $A$ is dense in $X$ $\Leftrightarrow$ for every nonempty open set $U$ we have $A∩U \neq\varnothing$ Let $X$ be a topological space, and let $A$ be a subset. Show that $\overline{A} = X\ ($the subset $A$ is dense in $X) \Leftrightarrow$ for every nonempty open set $U$, $A∩U\neq\varnothing$.
 A: HINT: For any $x\in X$, $x\in\operatorname{cl}A$ if and only if every open nbhd of $x$ contains a point of $A$.
A: Intuitively, it helps to remember that $\mathrm{Cl}_XA$ is the smallest closed set that contains $A$, and in this case, since $\mathrm{Cl}_XA=X$, it's also the only one that does.
$(\Rightarrow)$
Assume $A$ is dense. By definition, $\mathrm {Cl}_X(A)=X$. The only possible points in $X\setminus A$ are boundary points of $A$, which are individually characterized by the fact that each of their neighborhoods, including open ones, intersect $\mathrm{Int}A$. Since $\mathrm{Int} A\subset A$, they also intersect $A$. Also (trivially), for each point $a\in A$, each of its neighborhoods, including open ones, intersect $A$. Thus every open set in topological space X intersects A.
$(\Leftarrow)$
Suppose the contrary conclusion, i.e. that $A$ is not dense, $\mathrm{Cl}_X A\neq X.$ Then $U := X\setminus\mathrm{Cl}_X A \neq \emptyset$. Since it is a complement of a closure, it is open. Since $A\subset \mathrm{Cl}_X A$, there must hold $A\cap U = \emptyset$. By contraposition, we have $U\neq\emptyset, A \cap U \neq \emptyset \Rightarrow \mathrm{Cl}_XA=X$.
$\tag*{$\square$}$
A: Hint : $\overline{A}$ is the intersection of all the closed subsets containing $A$.
A: You have to prove that $e\in X\setminus\bar{A}$, if an only if there exists a neighbouhood $U$, for that $A\cap U= \varnothing $.
$\Rightarrow $ If $e\in X\setminus\bar{A}$, then it's clear that the nonempty set $X\setminus\bar{A}$ is open and contains $e$. So there exists a neighbourhood $U$ of $e$, s.t. $U\subset X\setminus \bar{A}$ and $A\cap U= \varnothing $.
$\Leftarrow $ Suppose that there is a neighbourhood $U$ of $e$ in $X$, s.t $A\cap U= \varnothing $, then we get $C= X\setminus U$ must be closed, $e\in X\setminus C$ and $A\subset C$. You know that $\bar{A}$ is the smallest closed set countaining $A$, so we have $\bar{A}\subset C$ and thus $e\in X\setminus \bar{A}$.
