Metric is continuous, on the right track?

Let $X$ be a metric space with metric $d$. Show that $d:X\times X\rightarrow \mathbb{R}$ is continuous.

The problem is taken from Munkres Topology second edition, Section 20.

I know that if $d$ is a metric on $X$ then $d:X\times X\rightarrow \mathbb{R}$. My thinking is that the topology that is on $X$ is the topology induced by the metric $d$, and that the topology on $X\times X$ is the product topology on that space where we take the basis to be $$\mathcal{B}=\{ U \times V \mid \text{ U,V both open in X}\}.$$ Am I on the right track to say that we define some new metric on $X\times X$ and show that this metric induces the same topology as the product topology and then work with the function $d$ as a function between metric spaces to show continuity? The question doesn't mention anything about defining some new metric and I've tried to solve the problem by looking at $X\times X$ as having the product topology, but in picking some point $(x,y) \in X\times X$ and some neighborhood around $d(x,y)$ in $\mathbb{R}$, I haven't yet found the way to make a neighborhood around $(x,y)$ which maps into the neighborhood around $d(x,y)$.

• Show that $d(x_n, y_n) \to d(x,y)$ when $x_n \to x$ and $y_n \to y$. – njguliyev Oct 16 '13 at 8:12

Let $W$ be an open interval of center $d(x,y)$ and radius $2r$ in $\mathbb R$, that's $$W=(d(x,y)-2r,d(x,y)+2r)$$ Let $U=D(x,r)\subseteq X$ (disc of center $x$ and radius $r$) and $V=D(y,r)\subseteq X$ then for $(u,v)\in U\times V$ we have:

$d(u,v)\leq d(u,x)+d(x,y)+d(y,v)<d(x,y)+2r$ and $d(x,y)\leq d(u,x)+d(u,v)+d(y,v)<d(u,v)+2r$

from which $d(x,y)-2r<d(u,v)<d(x,y)+2r$.

Consequenlty, $(x,y)\in U\times V\subseteq d^{-1}(W)$.

• Since we are in $\mathbb{R}$, should $W$ be an open INTERVAL? If that is the case, should $W$ be the open interval $(d(x,y) - 2r, d(x,y) + 2r)$? – fullyhip Apr 8 '15 at 19:15
• Yes, I added this detail in my answer, thank'you. – Fabio Lucchini Jul 29 '18 at 11:12

Suppose $(X,d)$ is a metric space. Then the metric $d_*:(X\times X)\times(X\times X)\rightarrow \mathbb{R}$ defined by $$d_*\big((x,y),(x_o,y_o)\big)=\max\{d(x,x_o),d(y,y_o)\}$$
is a metric on $X\times X$ induce by the metric $d$ on $X$.

Now, let $(x_0,y_0)\in X\times X$ and $\epsilon>0$. If $(x,y)\in X\times X$ and $d_*\big((x,y),(x_0,y_0)\big)<\frac{\epsilon}{2}$. Then \begin{align*} |d(x,y)-d(x_0,y_0)| &=|d(x,y)-d(x_0,y)+d(x_0,y)-d(x_0,y_0)|\\ &\leq |d(x,y)-d(x_0,y)|+|d(x_0,y)-d(x_0,y_0)|\quad (\text{By Triangular Inequality})\\ &\leq d(x,x_0)+d(y,y_0)\quad \quad (\text{By Reverse Triangule Inequality})\\ &\leq \max\{d(x,x_o),d(y,y_o)\}+\max\{d(x,x_o),d(y,y_o)\}\\ &= d_*\big((x,y),(x_0,y_0)\big)+d_*\big((x,y),(x_0,y_0)\big)\\ &<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon. \end{align*} Hence, $d$ is continuous.

To continue with the hint in the comments, prove that for any $x,y,z,w$

$$|d(x,y)-d(z,w)|\leqslant d(x,z)+d(y,w)$$ This shows that if $x\to x_n$ and $y\to y_n$ -- which is equivalent to $(x_n,y_n)\to (x,y)$ in $X\times X$ -- then $d(x,y)\to d(x_n,y_n)$, which proves that $d$ is continuous (since $X\times X$ is metric we can check continuity on sequences).