# Show that any set in a metric space can be written as the intersection of open sets

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?

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.
• Therefore the property relies not on $X$ being a metric space, but on it being a $T_1$ topological space Jul 24, 2017 at 8:54
• @JeppeStigNielsen $X=\Bbb R$ and $A=X-\{0\}$ does not work with that trick (though it is even open by itself) Jul 24, 2017 at 13:30
• @HagenvonEitzen You are right, thank you for that easy counterexample. (Addition: My method even fails for an open bounded interval inside $X=\mathbb{R}$.) I really felt like using the distance there. Is it true that any subset of a metric space is a countable intersection of open sets? Jul 24, 2017 at 13:41
• @JeppeStigNielsen In a uniform space, the intersection of all uniform neighbourhoods of a set is the closure of the set. For metric spaces, we can do with a countable intersection and have $$\bigcap_{n = 1}^{\infty} \biggl\{ x \in X : \operatorname{dist}(A,x) < \frac{1}{n}\biggr\} = \overline{A}.$$ Jul 24, 2017 at 14:15