Help with proof Let $X$ be a metric space, $x \in X$ and $S \subset X$. Then,
I have to prove that $x \in Cl(S)$ if and only if, every open ball of $X$ centered at $x$ has non-empty intersection with $S$.
I managed to do the first half of the proof but got stuck with the converse of it.
I checked my book for the converse part, it was proved as follows :
If $dist(x,S)$ is not equal to zero, then either $S$ is empty or
$b(x;dist(x,S)) \cap S$ is empty. I don't really follow this last part.
Up till " either $S$ is empty" it seems alright, but not the part after it.
Any help would be appreciated.
Also my book defines dist(x,S)=inf{d(x,s):s∈S} and Cl(S) = {$x \in X$ : dist(x,S)=0}.
 A: With these definitions, we have to show
$$\operatorname{dist}(x,S) = 0 \iff \bigl(\forall r > 0\bigr) \bigl(S \cap B_r(x) \neq \varnothing\bigr).$$
In the one direction, we have $0 = \operatorname{dist}(x,S) = \inf \{ d(x,s) : s \in S\}$, so that means for all $\varepsilon > 0$ there is an $s_{\varepsilon} \in S$ with $d(x,s_\varepsilon) < \varepsilon$ by the definition of $\inf$. But $d(x,s_\varepsilon) < \varepsilon \iff s_\varepsilon \in S\cap B_\varepsilon(x)$, so every ball centered at $x$ intersects $S$.
In the other direction, we have an $s_r \in S \cap B_{r}(x)$ for all $r > 0$. But $s_r \in S \cap B_r(x)$ means $d(x,s_r) < r$ and hence $\operatorname{dist}(x,S) \leqslant d(x,s_r) < r$, so we have $0 \leqslant \operatorname{dist}(x,S) \leqslant \inf \{ r \in \mathbb{R} : r > 0\} = 0$.
Regarding the converse part of the proof from the book, that shows the contrapositive
$$x \notin \operatorname{Cl}(S) \Rightarrow \bigl(\exists r > 0\bigr)\bigl(S\cap B_r(x) = \varnothing\bigr).$$
If $R := \operatorname{dist}(x,S) > 0$, then either $S$ is empty and $R = \infty$, or $S\neq\varnothing$ and $R < \infty$. In the first case, every ball centered at $x$ has empty intersection with $S$, for example $B_1(x) \cap S = B_1(x)\cap\varnothing = \varnothing$. In the second case, the assertion is that $B_R(x) \cap S = \varnothing$. For if there were an $s \in B_R(x)\cap S$, then $\operatorname{dist}(x,S) \leqslant d(x,s) < R$, contradicting the definition $R = \operatorname{dist}(x,S)$.
