I've seen answers to similar questions in SE but I need just this
How to show $d(x,A)=0$ iff $x$ is in the closure of $A$?
In a metric $(X,d)$, prove that for each subset $A$, $x\in\bar{A}$ if and only if $d(x,A)=0.$
I've seen answers to similar questions in SE but I need just this
How to show $d(x,A)=0$ iff $x$ is in the closure of $A$?
In a metric $(X,d)$, prove that for each subset $A$, $x\in\bar{A}$ if and only if $d(x,A)=0.$
($\Rightarrow$) Suppose $d(a,X) = 0$. If $a \not \in \text{cl}(X)$, then $\exists r_{>0}$ such that no $y \in X$ has the property $d(a,y)<r$. Now we have $a \not \in X \Rightarrow d(a,x)>0, \forall x \in X \Rightarrow d(a,X)>0$, which is a contradiction.
($\Leftarrow$): We prove the contrapositive. Let $(Y, d)$ be a metric space, $a\in Y$ and $X\subseteq Y$. Suppose $0<d(a,X) = \inf\{d(a,x) : x \in X\}$. Let $\delta := d(a,X)$. Then $B_\delta(a) = \{y \in Y: d(a,y) < \delta\}$ is an open set that is disjoint from $X$. So $X \subseteq Y\setminus B_\delta(a)$ and the latter is a closed set. Since $\bar{X}$ is the smallest closed set containing $X$ we get $\bar{X}\subseteq (Y\setminus B_\delta(a))$ which implies $B_\delta(a)\cap \bar{X} = \emptyset$ therefore $a\notin \bar{X}$ since $a\in B_\delta(a)$.