Let $X$ be a metric space with metric $d$. Let $x\in X$ and let $A$ be a subset of $X$ and define $$d(x,A)=\inf\{d(x,a)\mid a\in A\}.$$ Prove that $d(x,A)=d(x,\mathrm{cl}(A))$ where $\mathrm{cl}(A)$ is the closure of $A$.

First of all, one direction is obvious: $d(x,\mathrm{cl}(A))\leq d(x,A)$, but I have a hard time proving the reverse direction.

  • $\begingroup$ Um... don't you mean $d(x, cl(A)) \ge d(x,A)$ is obvious? $\endgroup$
    – fleablood
    Jan 16, 2017 at 1:16
  • 3
    $\begingroup$ @fleablood- since $A \subset \bar{A}$, the inf is taken over a larger set, so it is smaller. $\endgroup$ Jan 16, 2017 at 1:26

3 Answers 3


I will be using the notation $\overline{A}$ to mean the closure of set $A$.

Let $y\in \overline{A}$. Using the result found in here, we get $d(y,A)=0$. Let $\epsilon>0$. Then $\epsilon >d(y,A)$. Thus, there exits $a\in A$ such that $d(y,a)<\epsilon$. Thus $$d(x,A)\leq d(x,a)\leq d(x,y)+d(y,a)<d(x,y)+\epsilon.$$

Hence, $$d(x,A)< d(x,y)+\epsilon\quad \text{for all }\epsilon>0.$$


$$d(x,A)\leq d(x,y).$$

Thus, $$d(x,A)\leq d(x,y)\quad \text{for all }y\in\overline{A}.$$

Hence, $$d(x,\overline{A})=\inf\{d(x,y):y\in\overline{A}\}\geq d(x,A).$$

You already said that $d(x,\overline{A})\leq d(x,A)$ is obvious.

Hope this help.


Let $f: X\to \Bbb R$ the continuous function given by $f(y)=d(x,y)$. You want to calculate $d(x,A)=\inf f(A)$. Since $f$ is continuous, $\newcommand{cl}{\operatorname{cl}}f^{-1}(\cl(f(A)))\supseteq\cl A$.

So $f(\cl(A))\subseteq f(f^{-1}(\cl(f(A))))\subseteq\cl f(A)$. Hence, $d(x,\cl A)=\inf f(\cl(A))\ge \inf\cl f(A)$.

However, since the $\inf$ of a subset of $\Bbb R$ is the least limit of a sequence in it, it holds $\inf S=\inf\cl S$. Therefore $$d(x,\cl A)=\inf f(\cl(A))\ge \inf\cl f(A)=\inf f(A)=d(x,A)$$


Suppose $y \in cl(A)$. If $y\in A$ there isn't anything significant to notice. $d(x,y) \in D= \{d(x,a)|a \in A\}$ and $d(x,y) \ge \inf D = d(x,A)$.

If $y \not \in A$ then $y$ is a limit point of $A$ so for any $\epsilon > 0$ there is a $w \in A$ so that $d(w,y) < \epsilon$ and $d(x,w) \le d(x,y) + d(w,y) $ so $d(x,y) \ge d(x,w) - d(w,y) > d(x,w) -\epsilon \ge d(x,A) -\epsilon$.

So $\epsilon$ is arbitrary if $d(x,y) < d(x,A)$ then we can get a contradiction by fixing $\epsilon = d(x,A) - d(x,y)$ which would contradictorily mean $d(x,y) > d(x,y)$.

So $d(x,y) \ge d(x,A)$ so $d(x,A)$ is a lower bound of $B = \{d(x,b)|b\in cl(A)\}$. So $d(x, cl(A)) \ge d(x, A)$.

We can do the same argument to show the other way around but as you noted, it is obvious that as $A \subset cl(A)$ so $D \subset B$ and so $d(x,A) = \inf D \ge \inf B = d(x, cl(A))$.

So $d(x, A) \ge d(x, cl(A))$ and $d(x,A) = d(x,cl(A))$.



Suppose $d(x,A) > d(x,cl(A)) $.

Then let $y \in d(x,cl(A)$ and let $d(x, cl(A) \le d(x,y) < d(x,A)$. Then $y \not \in A$ so $y$ is a limit point of $A$. Let $\epsilon = d(x,A) - d(x,y)$. Then there is a $w \in A$ so that $d(w,y) < \epsilon$. So $d(x,A) \le d(x,w) \le d(x,y) + d(w,y) < d(x,y) + \epsilon = d(x,A)$ so $d(x,A) < d(x,A)$; a contradiction.

So $d(x,A) \le d(x,cl(A)$.

  • $\begingroup$ Something wrong in your second paragraph? Since $y\in cl(A)$, then we must have $$d(x,y)\geq d(x,cl(A)).$$ What do you think? $\endgroup$
    – Juniven
    Jan 16, 2017 at 3:13
  • $\begingroup$ Argh. Notation error. May need to redo entirely. The idea is the same as y is a limit point it can't actually be any closer or further the any of the points in A or else the difference in distance will allow a neighborhood of the limit point with no points of A. I'll try to fix it. $\endgroup$
    – fleablood
    Jan 16, 2017 at 7:54
  • $\begingroup$ Hopefully, I got it right this time. $\endgroup$
    – fleablood
    Jan 16, 2017 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.