# Two problems related to continuity of a metric from Munkres' topology book

Let $X$ be a metric space with metric $d$.

• Show that $d:X\times X\to \mathbb{R}$ is continuous.
• Let $X^\prime$ denote a space with the same underlying set as $X$. Show that if $d:X^\prime\times X^\prime \to \mathbb{R}$ is continuous then the topology of $X^\prime$ is finer than the topology of $X$.

My attempt : for the first one, we take some interval $(a,b)\subset \mathbb{R}$. We have to show $A=d^{-1}\left((a,b)\right)$ is open. So, choose any $(x,y)\in A$. We need to show that $(x,y)\in U\times V\subseteq d^{-1}((a,b))$ where $U,V$ are open in $X$. Here is where I am stuck. I also tried to use the usual $\epsilon-\delta$ idea but for that we need to have $X\times X$ as well as $\mathbb R$ as a metric space. Even if the former is possible using the uniform metric, we cannot do that on $\Bbb R$.

For the second one, we want to find a basis of $X^\prime$'s topology, say $\mathcal T$ with elements $\mathcal{B}_\alpha$ for $\alpha\in J$. Then we take any basis element $B_d(x,\epsilon)$ of $X$. Let $y\in B_d(x,\epsilon)$. We want $y\in \mathcal{B}_\alpha\subseteq B_d(x,\epsilon)$. But how to proceed after that? Any help will be appreciated. Thanks a lot.

• Use the following definition of continuity: a function $f:A\to B$ is continuous at $x\in A$ if for every open neighbourhood $U\subseteq B$ of $f(x)$ there exists an open neighbourhood $V\subseteq A$ of $x$ so that $f(V)\subseteq U$. So in this case, start by fixing $(x,y)\in X\times X$ and let $B(d(x,y),r)\subseteq \mathbb R$ be an open disc centered at $d(x,y)$ with radius $r>0$. Show that for all $(u,v)\in B(x,\frac{r}{2})\times B(x,\frac{r}{2})$ we have $$|d(u,v)-d(x,y)|<r$$ by using the triangle inequality, which would imply $d(B(x,\frac{r}{2})\times B(x,\frac{r}{2}))\subseteq B(d(x,y),r)$ and thus the continuity of $d$.
• Fix $x\in X$ and note that $y\mapsto d(x,y)$ is a continuous function $X'\to \mathbb R$. Then express each ball $B_{d}(x,r)=\{y\in X:d(x,y)<r\}$ as the preimage of an open set under a continuous function in the topology $X'$. Since each open ball in $X$ is open in $X'$, then the topology of $X'$ is finer than the topology of $X$.