The distance between two sets inside euclidean space Let $A,B \subseteq \mathbb{R}^d$ be non-empty sets. Define their distance to be
$$ d(A,B) = \inf \{ \|x-y\| : x \in A, \; \; y \in B \} $$
For any $A,B$, I want to prove that $d(A,B) = d( \overline{A}, \overline{B} )$.
My Attempt
Put $\alpha = d(A,B)$. Therefore, $\alpha = \|x_0 - y_0 \|$ for some $x_0 \in A$ and some $y_0 \in B$. But, notice $x_0 \in \overline{A}$ and $y_0 \in \overline{B}$ by definition. hence
$$ \| x_0 - y_0\| \geq \inf\{ \|x' - y'\| : x' \in \overline{A}, \; \; y' \in \overline{B} \} =  d( \overline{A}, \overline{B} )$$
$$\therefore d(A,B) \geq d( \overline{A}, \overline{B} )$$
I am stuck trying to show the other direction: $d(A,B) \leq d( \overline{A}, \overline{B} )$
Can someone help me? thanks a lot
Note that the function $\Phi:\mathbb R^d\times \mathbb R^d\to\mathbb R^+$ defined by $\Phi(x,y)=\Vert x-y\Vert$ is continuous, and that $\overline A\times \overline B=\overline{A\times B}$. So, in order to prove what you want, it is enough to show that if $\Phi:X\to\mathbb R^+$ is a continuous function on a topological space $X$, then $\inf\, \Phi(M)=\inf\, \Phi (\overline M)$ for any (nonempty) set $M\subset X$. Now, you have $\Phi(M)\subset \Phi(\overline M)\subset \overline{\Phi(M)}$, the second inclusion being true because $\Phi$ is continuous. So $\inf\, \overline{\Phi(M)}\leq \inf\, \Phi(\overline M)\leq \inf\, \Phi(M)$. To conclude, it remains to observe that for any (nonempty) set $E\subset\mathbb R^+$ you have $\inf\, E\in \overline E$, so that $\inf \, E=\inf\overline E$. Aplying this with $E=\Phi(M)$, this gives $\inf\, \Phi(\overline M)=\inf \,\Phi(M)$ as required.
Note, why do you always have $d(A,B)\geq d(\bar{A},\bar{B})$?

if $d(\bar{A},\bar{B}) = d$ then $\exists x_1,x_2,...\in \bar{A}$ and $y_1,y_2,...\in \bar{B}$, for $\epsilon&gt;0$, $\exists N$ such that $d(x_n,y_n)\leq d+\epsilon$ for $n&gt;N$

now find a sequence $x_1',x_2',...\in A$ and $y_1',y_2',...\in B$ which also does the job, i.e.
for $\epsilon&gt;0$, $\exists N$ such that $d(x_n',y_n')\leq d+\epsilon$ for $n&gt;N$ (how? use definition of closure)

For a proper proof: Distance between two sets in a metric space is equal to the distance between their closures