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 Answers
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}$$
- 427,504
-
It is even simpler as OP assumes that $X \cap Y = \emptyset$ – Apr 04 '20 at 08:33
-
@user745578 Me too. And why does that makes things easier? – José Carlos Santos Apr 04 '20 at 08:35
-
Because there are less cases to consider. – Apr 04 '20 at 08:35
-
@user745578 Which cases did I consider that I did not have to consider? – José Carlos Santos Apr 04 '20 at 08:37
-
Those where $X \cap Y \neq \emptyset$. Your answer is not wrong, it is just more than the OP asks for. I would leave it like that, but add a note that you don't need the assumption that $X \cap Y = \emptyset$. – Apr 04 '20 at 08:38
-
1No, if $X\cap Y\ne\emptyset$ then we need to assume that the restriction of $d_1$ and $d_2$ coincide on $X\cap Y$. – Berci Apr 04 '20 at 09:54