Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $S\subset\Bbb R$ not empty, define $f:\Bbb R\rightarrow\Bbb R$ such that $f(x)= \inf\{|x-s| ;s\in S\}$

then, prove that $|f(x)-f(y)|\le|x-y| $ for any $x,y \in \Bbb R$

share|cite|improve this question
Have you tried the case where $S$ consists of a single point? – JSchlather Sep 8 '12 at 1:41
up vote 5 down vote accepted

$|x - s| \le |x - y| + |y - s|$ for every $s \in S$. Hence $f(x) \le |x - y| + f(y)$.

Similarly $f(y) \le |x - y| + f(x)$.

Hence $|f(x) - f(y)| \le |x - y|$.

share|cite|improve this answer
Indeed, the distance function on any metric space is continuous, by the same proof that you have given. – Lubin Sep 8 '12 at 3:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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