3

I'm studying for my Topology exam and I am trying to brush up on my metric spaces.

Suppose $(X, d)$ is a metric space and $A$ is a proper subset of $X$. Show that the function $f: X \to \Bbb R$ given by $f(x) = d(x, A)$ is a continuous function.

I know that showing the pre-image of an open set is open in $X$ is an option for continuity. Yet, I would like to know how to show continuity with open balls or neighborhoods given the context of the problem.

By the way, is this the Euclidean metric? Or am I jumping the gun a bit there?

Martin
  • 8,491
Vergil
  • 31

1 Answers1

5

Credits to Martin.

Fix $a\in A$. Since $d(x,a)\leq d(x,y)+d(y,a)$, taking $\inf\limits_{a\in A}$ we have that $$d(x,A)\leq d(x,y)+d(y,A)$$ By symmetry (i.e. $d(y,x)=d(x,y)$) $$d(y,A)\leq d(x,y)+d(x,A)$$ which gives that $$|f(x)-f(y)|\leq d(x,y)$$

Thus $f$ is $1-$Lipschitz continuous, whence it is continuous.$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\blacktriangle$

Pedro
  • 122,002
  • I would love to upvote this and reward you for the effort :-) For the future: if I comment, there's no need to make an answer CW... – Martin Jun 12 '13 at 02:49
  • 1
    @Martin It is always better to answer questions rather than to comment: this reduces the "UNANSWERED" list and gives you some rep! – Pedro Jun 12 '13 at 02:51
  • @Martin Of course, if you want to give a reward you can always upvote other answers of mine ;) – Pedro Jun 12 '13 at 02:53
  • In this case I was sure that it was a duplicate and I preferred to give a brief hint instead of trying to look for the duplicate. (You'll get your reward, but I have a lot to choose from :-)). – Martin Jun 12 '13 at 02:55
  • I'd rather take the hint than the answer. How do I upvote comments? – Vergil Jun 12 '13 at 02:58
  • Hover to the leftmost of them, there is a triangle that should turn red. In this case, I think the hint and the answer almost give away the same! – Pedro Jun 12 '13 at 02:59
  • Fair enough, and thanks. However, "whence" means "from where." Although that might have been a typo. – Vergil Jun 12 '13 at 03:04
  • @Vergil I know what "whence" means. I am saying, "Since $f$ is Lipschitz continuous, it is continuous." – Pedro Jun 12 '13 at 03:07