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

Can someone please verify my proof or offer suggestions for improvement?

I am aware that there is a similar question elsewhere, but I want help with my proof in particular.

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

Let $U \subseteq \mathbb{R}$ be open. Assume $\operatorname{d}^{-1}(U) \neq \varnothing$.

Let $(x, y) \in \operatorname{d}^{-1}(U)$ and set $\epsilon_1 = \frac{1}{2}(b-\operatorname{d}(x, y))$

Clearly, if $(\alpha, \beta) \in B_d(x, \epsilon_1) \times B_d(y, \epsilon_1)$, then \begin{eqnarray} \operatorname{d}(\alpha, \beta) &\leq& \operatorname{d}(x, \alpha) + \operatorname{d}(x, y) + \operatorname{d}(y, \beta)\\ &<& \operatorname{d}(x, y) + 2\left(\frac{b-\operatorname{d}(x, y)}{2}\right) \\ \end{eqnarray}

That is,

$$\operatorname{d}(\alpha, \beta) < b$$

Similarly, set $\epsilon_2 = \frac{1}{2}(\operatorname{d}(x, y) - a)$.

Let $(\alpha, \beta) \in B_d(x, \epsilon_2) \times B_d(y, \epsilon_2)$. Assume, for the sake of contradiction, that $\operatorname{d}(\alpha, \beta) \leq a$.

Then,

\begin{eqnarray} \operatorname{d}(x, y) &\leq& \operatorname{d}(x, \alpha) + \operatorname{d}(\alpha, \beta) + \operatorname{d}(\beta, y) \\ \operatorname{d}(x, y) &<& \operatorname{d}(x, y)-a + \operatorname{d}(\alpha, \beta) \\ &<& \operatorname{d}(x, y) \end{eqnarray}

Therefore, it must be the case that $$\operatorname{d}(\alpha, \beta) > a$$

Set $\epsilon = \operatorname{min}\{\epsilon_1, \epsilon_2\}$.

Then, if $(\alpha, \beta) \in B_d(x, \epsilon) \times B_d(y, \epsilon)$,

$$a < \operatorname{d}(\alpha, \beta) < b$$

Since $\operatorname{d}^{-1}(U)$ can be written as the union of open sets in the metric topology, it follows that $\operatorname{d}^{-1}(U)$ is open. Therefore, $d$ is continuous.

• You never say what $a$ and $b$ are, and you show that $d^{-1}(U)$ is open only for open intervals [the interval $(a,b)$, as transpires], not for general open sets. If you state that you assume that $U = (a,b)$ at the beginning of the argument, and then (at some point) say that the general case follows, since every open subset of $\mathbb{R}$ is a union of such intervals, and say that the conclusion is clear if $d^{-1}((a,b)) = \varnothing$, then your proof will be correct. Aug 10, 2014 at 16:52
• Oh. If I clarify what $a$ and $b$ are, and state that all intervals of the form $(a,b)$ are basis elements for the standard topology on $\mathbb{R}$, will the proof be correct? Aug 10, 2014 at 17:00
• Well, since you say "Assume $d^{-1}(U) \neq \varnothing$", you also need to say what the matter is in case that is empty. Aug 10, 2014 at 17:03

In fact you proved that $d^{-1}((a,b))$ is open for any interval $(a,b)\subset \mathbb{R}$.

Since any open set $U$ can be written as union of some family of intervals $\{(a_i,b_i):i\in I\}$, then $$d^{-1}(U)=d^{-1}(\cup_{i\in I}(a_i,b_i))=\cup_{i\in I}d^{-1}((a_i,b_i))$$ Thus $d^{-1}(U)$ is open as union of open sets.

It is easy by using the following inequality : $|d(x,y)-d(x',y')|\leq d(x,x')+d(y,y')$.

What you are looking to use is a Product Metric

http://en.wikipedia.org/wiki/Product_metric

Using $p=1$ is just fine. It gives you a metric for your product space based on your previous metrics, like so: If $d'$ is your new metric for $XxX$ with and using metric $d$ on $X$,

$$d'((x_1,y_1),(x_2,y_2)) = d(x_1,y_1)+d(x_2,y_2)$$

Then, all you have to do is prove that metrics are continuous, which is pretty easy to do.