Is the distance function in a metric space (uniformly) continuous?

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 subset of a metric space $(X,d)$ then the function $f$ on $X$ given by $$f(x)=d(x,A):= \inf_{y\in A} d(x, y)$$ is continuous. Indeed, $$| f(x) - f(y) | = | d(x,A) - d(y,A) | \leq d(x,y),$$ and thus $f$ is uniformly continuous (use $\delta = \epsilon$ in any point).

To show this, let $x$ and $y$ be points in $X$, and $p$ any point in $A$.

Then $$d(x,p) \leq d(x,y) + d(y,p)\ \ \ \ \text{ (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)$.

This is taken from http://at.yorku.ca/cgi-bin/bbqa?forum=homework_help_2004;task=show_msg;msg=1323.0001


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$.