# Is the function distance continuous?

And if not, what are the most common hypotheses (on open sets it induces, for example) under which distance is a continuous function?

-
@Renato: Are you talking about the distance function? – anonymous Oct 27 '10 at 16:27
@Renato: Please make your question clear! – anonymous Oct 27 '10 at 16:27
If you are asking whether the distance function $d:X\times X\to\mathbb R$ is continuous when $(X,d)$ is a metric space, then aswer is yes. You should try to prove it yourself; first do it for $\mathbb R$ with its usual metric, and then generalize. – Mariano Suárez-Alvarez Oct 27 '10 at 16:32
@Chandru1 yes, I'm talking about the distance function, sorry for the mistake. – Renato Oct 27 '10 at 16:33
@MarianoSuárez-Alvarez I was also trying the same question. But how to prove it using $\epsilon - \delta$ notation.Let $(x,y) \in X$ and $(x',y') \in X$ then whenever $||(x,y)-(x',y')|| \lt \delta$ then we have $|d(x,y)-d(x',y')| \lt \epsilon$.. right?? How to go ahead with this proof – Mathy Jun 25 '13 at 11:33

As Qiaochu points out $d(x,y)$ is continuous for fixed $x$. You may like to see this as well, as this is a familiar result in Topology.

• If $A$ is a non empty closed subset of a metric space $(X,d)$ then show that the function f on X given by $f(x)=d(x,A)$ is continuous.

Because $$| f(x) - f(y) | = | d(x,A) - d(y,A) | \leq d(x,y)$$.

This means that $f$ is uniformly continuous (use $\delta = \epsilon$ in any point)

Let $x$ and $y$ be points in $X$, and $p$ any point of $A$.

Then $d(x,p) \leq d(x,y) + d(y,p)$ (triangle inequality) and so $d(x,A) \leq d(x,y) + d(y,p)$ (as $d(x,A)$ is the infimum). But then $d(y,p) \geq d(x,A) - d(x,y)$ (for all $p$, obtained by subtracting from the previous ןinequality) so that $d(y,A) \geq d(x,A) - d(x,y)$ (as $d(y,A)$ is the infimum). So : $d(x,A) - d(y,A) \leq d(x,y)$.

Now reverse the roles of $x$ and $y$ to get $d(y,A) - d(x,A) \leq d(x,y)$.

-
where did you use the fact that A is closed? – GAJO Jan 28 '14 at 19:11
Why are we assuming that the metric on $\mathbb{R}$ is the standard one? – The Substitute Aug 31 '14 at 0:19
@GAJO I think $d(x,E)$ is continuous in $x$ for any nonempty subset $E$. – Fang Jing Oct 14 '14 at 20:29

Yes. The standard definition of the topology induced by a metric ensures this; in fact it's not hard to see that it's the coarsest topology such that $d(x, y)$ is continuous for fixed $x$.

-
Isn't it also the coarsest one for which $d$ itself is continuous? – Mariano Suárez-Alvarez Oct 27 '10 at 16:36