0

If $(X,d_1)$ and $(Y,d_2)$ be metric spaces. Is there a metric on $X \cup Y$ which induces $d_1$ on $X$ and $d_2$ on $Y$? (we can assume $X \cap Y = \emptyset$).

1 Answers1

4

Yes, there is.

I will assume that $X,Y\neq\emptyset$. Let $x_0\in X$ and $y_0\in Y$. Define $d\colon(X\cup Y)^2\longrightarrow[0,\infty)$ by$$d(a,b)=\begin{cases}d_1(a,b)&\text{ if }a,b\in X\\d_2(a,b)&\text{ if }a,b\in Y\\d_1(a,x_0)+d_2(b,y_0)&\text{ if }a\in X\text{ and }b\in Y\\d_1(b,x_0)+d_2(a,y_0)&\text{ if }b\in X\text{ and }a\in Y.\end{cases}$$This will work. And it works because$$\begin{array}{rccc}D\colon&(X\times Y)^2&\longrightarrow&[0,\infty)\\&\bigl((x_1,y_1),(x_2,y_2)\bigr)&\mapsto&d_1(x_1,x_2)+d_2(y_1,y_2)\end{array}$$is a metric and$$\begin{array}{rccc}\iota\colon&X\cup Y&\longrightarrow&X\times Y\\&a&\mapsto&\begin{cases}(a,y_0)&\text{ if }a\in X\\(x_0,a)&\text{ if }a\in Y\end{cases}\end{array}$$is injective and my map $d$ is the map$$\begin{array}{ccc}(X\cup Y)^2&\longrightarrow&[0,\infty)\\(a,b)&\mapsto&D\bigl(\iota(a),\iota(b)\bigr).\end{array}$$