Let $(X,d)$ a metric space and $A$ a subset of $X$, show
$$d(x,A)=d(x,\text{Cl}(A))$$
Where $d(x,A)=\inf\{d(x,y):y\in A\}$.
Let $(X,d)$ a metric space and $A$ a subset of $X$, show
$$d(x,A)=d(x,\text{Cl}(A))$$
Where $d(x,A)=\inf\{d(x,y):y\in A\}$.
$\newcommand{\cl}{\operatorname{Cl}}$
Since $A\subset \cl(A)$, $d(x,A)\ge d(x,\cl(A))$. On the other hand, suppose for a contradiction that $D=d(x,A)>d(x,\cl(A))$. Let $B$ be the open ball of radius $D$ centered at $x$. Then $B$ contains no points of $A$, but $B$ contains some point of $y\in\cl(A)$. Then $B$ is a neighborhood of $y$ containing no points of $A$, a contradiction.
Let $a \in A$, then $a \in \operatorname{Cl}(A)$ so $d(x,a) \le d(x, \operatorname{Cl}(A))$
So $d(x, \operatorname{Cl}(A))$ is an upper bound for $\{d(x,a) \mid a \in A\}$ and $d(x,A)$ is the smallest lower bound for that set, so $$d(x,A ) \le d(x,\operatorname{Cl}(A))\tag{1}$$
Now let $\varepsilon>0$ and $a \in \operatorname{Cl}(A)$. Then there is some $a' \in A$ such that $d(a,x') < \varepsilon$ because $a \in \operatorname{Cl}(A)$. Also, $d(x,a) \le d(x,A)$ by definition, so by the triangle inequality: $$d(x,a) \le d(x,a')+d(a',a) \le d(x,A) + d(a',a) < d(x,A) + \varepsilon$$
so for any $\varepsilon >0$, $d(x,A)+ \varepsilon$ is an upper bound for $\{d(x,a) \mid a \in \operatorname{Cl}(A)\}$ and so
$$\forall \varepsilon>0: d(x,\operatorname{Cl}(A)) \le d(x,A) + \varepsilon\tag{2}$$
and $(1)$ and $(2)$ together imply $d(x,A) = d(x,\operatorname{Cl}(A))$ as required.