General Topology – Metric Is Continuous, On the Right Track?

general-topologymetric-spaces

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

Best Answer

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