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 $(X, d)$ be a metric space. For each $a \in X$, define a function $f_a\colon X \to \mathbb R$ by $f_a(x) = d(x, a), (x ∈ X)$.

Prove that for all $a, b \in X$ $$\sup\{|f_a(x) − f_b(x)| : x \in X\} = d(a,b).$$

I know I have to prove that d(a,b) is a least upper bound but I am unsure how to go about doing it.

share|cite|improve this question
It is interesting that no answer so far mentioned that this is nothing but the reverse triangle inequality... – t.b. Apr 17 '12 at 19:41
up vote 1 down vote accepted

we have by the triangle inequality \[ f_a(x) = d(x,a) \le d(a,b) + d(x,b) = d(a,b) + f_b(x) \iff f_a(x) - f_b(x) \le d(a,b) \] and \[ f_b(x) = d(x,b) \le d(a,b) + d(x,a) = d(a,b) + f_a(x) \iff f_b(x) - f_a(x) \le d(a,b) \] which together shows that $d(a,b)$ is an upper bound. But now $f_b(a) - f_a(a) = d(a,b)$, so it's attained and therefore the least upper bound,

share|cite|improve this answer

Let $a,b\in X$. We have for $x\in X$ that $d(a,x)\leq d(a,b)+d(b,x)=$ so $f_a(x)\leq d(a,b)+f_b(x)$ and $f_a(x)-f_b(x)\leq d(a,b)$. Switching $a$ and $b$ we get that $|f_a(x)-f_b(x)|\leq d(a,b)$ so $\sup_{x\in X}|f_a(x)-f_b(x)|\leq d(a,b)$. Taking $x=b$, we see that this supremum is in fact a maximum, equal to $d(a,b)$.

share|cite|improve this answer

As you said, you need to prove d(a,b) is the least upper bound,

You will need to prove 2 things :

1) d(a,b) is an upper bound, ie:

$\forall x\in X, |f_a(x) - f_b(x)| <= d(a,b)$

What property of metric space you can use to prove that?

2) d(a,b) is the least upper bound. You can prove that

$\exists x\in X, |f_a(x) - f_b(x)| = d(a,b)$

Can you choose an x satisfies above?

share|cite|improve this answer

$|f_a(x)-f_b(x)|=|d(x,a)-d(x,b)|$; clearly this is $d(a,b)$ when $x=b$. Suppose that there is some $x\in X$ such that $|d(x,a)-d(x,b)|>d(a,b)$; then either $d(x,a)-d(x,b)>d(a,b)$ or $d(x,b)-d(x,a)>d(a,b)$. Without loss of generality assume that $d(x,a)-d(x,b)>d(a,b)$. Then $d(x,a)>d(x,b)+d(b,a)$, contradicting the triangle inequality. Thus, $|f_a(x)-f_b(x)|\le d(a,b)$ for all $x\in X$, with equality when $x=b$, and the result is immediate.

share|cite|improve this answer

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.