4

Let $(X,d)$ be metric space and $X\subset Y$. Can $d$ be extended to $Y^2$ so that $(Y,d)$ is a metric space?

Edit: how about extending any $(\Bbb Z,d)$ to $(\Bbb R,d)$

3 Answers3

5

Yes. Call $Z=Y\setminus X$, fix some $x_0\in X$, and try $\delta(x,x')=d(x,x')$ if $(x,x')\in X\times X$, $\delta(z,z')=\mathbf 1_{z\ne z'}$ if $(z,z')\in Z\times Z$, and $\delta(x,z)=\delta(z,x)=1+d(x_0,x)$ if $(x,z)\in X\times Z$.

Then $(Y,\delta)$ is a metric space and $\delta$ extends $d$.

Did
  • 279,727
4

Let $Z=Y\setminus X$. Let $\kappa=|X|$. If $|Z|\ge\kappa$, we can index $Y=\{z(\xi,x):\langle\xi,x\rangle\in\kappa\times X\}$ in such a way that $z(0,x)=x$ for each $x\in X$. Now define

$$\overline d:Y\times Y\to\Bbb R:\langle z(\xi,x),z(\eta,y)\rangle\mapsto\begin{cases} d(x,y),&\text{if }\xi=\eta\\ d(x,y)+1&\text{if }\xi\ne\eta\;. \end{cases}$$

Then $\overline d$ is a metric on $Y$ extending $d$.

If $|Z|<\kappa$, you can still use the same basic idea. Let $\varphi:Z\to X$ be any injection, and define

$$\overline d:Y\times Y\to\Bbb R:\langle x,y\rangle\mapsto\begin{cases} d(x,y),&\text{if }x,y\in X\\ d((\varphi(x),\varphi(y)),&\text{if }x,y\in Z\\ d(x,\varphi(y))+1,&\text{if }x\in X\text{ and }y\in Z\\ d(\varphi(x),y)+1,&\text{if }x\in Z\text{ and }y\in X\;. \end{cases}$$

Brian M. Scott
  • 616,228
4

Yes. Pick any $x_* \in X$, and let $d_Y$ be any metric on $(Y \setminus X) \cup \{ x_* \}$. We then define a metric $\hat{d}$ on $Y$ as follows: $$\hat{d} (x,y) = \begin{cases} d ( x , y ), &\text{if }x,y \in X\\ d_Y (x,y), &\text{if }x,y \in ( Y \setminus X ) \cup \{ x_* \}\\ d ( x , x_* ) + d_Y (x_* , y ), &\text{if }x \in X, y \in(Y \setminus X ) \cup \{ x_*\} \\ d ( y , x_* ) + d_Y (x_* , x ), &\text{if }y \in X, x \in(Y \setminus X ) \cup \{ x_*\} \end{cases}$$

Note: This is essentially a generalisation of Did's answer; he would take $d_Y$ as the usual discrete metric on my $( Y \setminus X ) \cup \{ x_* \}$.

user642796
  • 52,188