Neighbourhood of Point Contains Point of Subset iff Distance is Zero

Theorem
Let $M = \left({X, d}\right)$ be a metric space.

Let $A \subseteq X$ be a non-empty subset of $X$.

Let $x \in X$.

Then every neighborhood of $x$ contains a point of $A$ :
 * $d \left({x, A}\right) = 0$

where $d \left({x, A}\right)$ denotes the distance from $x$ to $A$.

Proof
Let $x \in X$ and suppose that every neighborhood of $x$ contains a point in $A$.

Every open ball $B_\epsilon \left({x}\right)$ centered at $x$ can be seen as a neighborhood of $x$ in $M$.

But then this implies that for every $\epsilon \in \R_{\gt 0}$ there must exists a $y \in A$ such that:
 * $d \left({x, y}\right) \lt \epsilon$

From this it is seen that $d \left({x, A}\right) = 0$.

For the converse suppose that $d \left({x, A}\right) = 0$ for some $x \in X$.

Let $S$ be a neighborhood of $x$ in $M$.

From the definition of a neighborhood, there exists an open ball centered at $x$ such that:
 * $B_\epsilon \left({x}\right) \subseteq S$

But $\epsilon \gt 0$ and so because $d \left({x, A}\right) = 0$ there must exists a $y \in A$ such that:
 * $d \left({x, y}\right) \lt \epsilon \implies B_\epsilon \left({x}\right) \cap A \ne \varnothing$

If otherwise then $\epsilon$ would be a lower bound for $\left\{{d \left({x, y}\right) : y \in A}\right\}$ that's greater than $0$, which is a contradiction.

Then from Set Intersection Preserves Subsets we have $B_\epsilon \left({x}\right) \cap A \subseteq S \cap A$ and so:
 * $B_\epsilon \left({x}\right) \cap A \ne \varnothing \implies S \cap A \ne \varnothing$

Hence the result.