For a nonempty subset $A$ of a metric space, $x \in \overline{A}$ iff $d(x,A) = 0$. 
Let $(X, \rho)$ be a metric space and $x \in X, A \subset X$ ($A \neq \varnothing$). Then $x \in \overline{A}$ iff $d(x,A)=0$.

I am facing difficulties showing that  $d(x,A)=0$ implies that $x \in \overline{A}$.
I have thought the following:
Let $d(x,A)=0$. We suppose that $x \in X \setminus{\overline{A}}$. This means that there is an $\epsilon>0$ such that $\{ y \in X: \rho(x,y)< \epsilon\} \subset X \setminus{\overline{A}}$.
How can we continue in order to get a contradiction?
 A: Hint: 


*

*How do we define $d(x, A)$?  

*What does $d(x,A) = 0$ mean? 

*Why does the fact that $\{y \in X : \rho(x,y) < \epsilon\} \subset X - \overline{A}$ contradict $d(x, A) = 0$?
Let me answer these questions in layman's terms:


*

*$d(x,A)$ can be thought of as, in some sense, the smallest that the distance between the point $x$ and stuff in $A$ can get (it can't get any smaller than $d(x,A)$).  It's defined as $\inf \{ d(x,z) : z \in A \}$.  Since it's the infimum, this means we can find distances as close as we want to the number $d(x,A)$.

*So $d(x,A) = 0$ means that for any positive number $\epsilon$, we can always find something from $A$ that is closer to $x$ than $\epsilon$-distance.  Specifically, for each $\epsilon > 0$, we can find $z \in A$ with $d(x,z) < \epsilon$.

*Ok, well on the other hand, if $\{y \in X : \rho(x,y) < \epsilon\} \subset X - \overline{A}$, then $\{y \in X : \rho(x,y) < \epsilon\} \subset X - A$.  This is telling us that everything in $X$ that is less than $\epsilon$-distance from $x$ must be in $X - A$.  So nothing less than $\epsilon$-distance from $x$ can be in $A$, because it's all in $X - A$.  That means everything in $A$ is at least $\epsilon$-distance from $x$.
But we just said we can find stuff from $A$ that is less than $\epsilon$-distance from $x$, and now we are saying everything in $A$ is at least $\epsilon$-distance from $x$.  These two statements contradict each other!
A: As $A \subseteq \overline{A}$ we also have that $\{y \in X: \rho(x,y) < \varepsilon \} \subseteq X \setminus A$.
The latter means that if $a \in A$, $d(x,a) \ge \varepsilon$ (or else $a$ would be in the left hand side, but not in the right hand side).
So $d(x,A) = \inf \{d(x,a): a \in A \} \ge \varepsilon > 0$ in that case, contradiction.
A: Suppose $d(x,A)=\inf\{\rho(x,y):y\in A\}=0$. Let $\delta>0$; then, by assumption, there exists $y\in A$ such that $\rho(x,y)<\delta$, that is, $y$ belongs to the open ball with center $x$ and radius $\delta$.
A: You can show this using sequences: If $d(x, A)$ then $0 = \inf_{a \in A} \rho(x,a)$, so for every $n \geq 1$ there exists some $a_n \in A$ with $\rho(x,a_n) < \frac{1}{n}$. Thus $(a_n)_{n \geq 1}$ is a sequence in $A$ with $a_n \to x$ as $n \to \infty$. Thus $x$ lies in the sequential closure of $A$, which conincides with the closure $\overline{A}$ because $X$ is a metric space.
A: $d(x,A)=0\implies \inf\{d(x,a):a\in A\}=0$
$\implies \inf\{d(x,a):a\in A\}<\epsilon \forall \epsilon>0\implies \forall \epsilon>0 \exists a\in A$ such that $d(x,a)<\epsilon\rightarrow  (1)$.
Consider an open ball $B(x,\epsilon)$ where $\epsilon>0$ is arbitrary.To show $x\in \overline{A}$ it is enough to show that $B(x,\epsilon)\cap A\setminus\{x\}\neq \emptyset$ 
and it  is true by $1$.(verify)
