TITLE: Show that any set in a metric space can be written as the intersection of open sets
QUESTION [6 upvotes]: Show that any set contained in the metric space $(X, d)$ can be
  written as the intersection of open sets.

Definitions: A set $A \subseteq X$ is open if $\forall x \in A$, $\exists \varepsilon>0$ such that $B_{\varepsilon}(x) \subseteq A$. A set $C \subseteq X$ is closed if and only if $X \setminus C$ is open. 
I also know that the intersection of a finite collection of open sets is open and that any open ball contained in $X$ is open. How can I prove this question?

REPLY [18 votes]: Singletons $\{a\}$ are closed sets, so their complements are open. For any set $A \subseteq X$ consider the following:
$$A=\bigcap_{a \in A^{c}}\{a\}^c.$$
Observe that each $\{a\}^c$ is open and once you verify the set equality (which is not that difficult) you have $A$ as the intersection of open sets.