What operations is a metric closed under?

Suppose $X$ is a set with a metric $d: X \times X \rightarrow \mathbb{R}$. What "operations" on $d$ will yield a metric in return?

By this I mean a wide variety of things. For example, what functions $g: \mathbb{R} \rightarrow \mathbb{R}$ will make $g \circ d$ into a metric, for example $g \circ d = \sqrt{d}$. Or what functions of metrics will yield metrics in return, for example $d_1 + d_2$, where $d_1$ and $d_2$ are distinct metrics on $X$.

I'm looking for a list of such operations, and counterexamples of ones which plausibly seem like they could define a metric but do not.


Solution 1:

I am not sure if this answer is specific enough for the OP, but I am not sure there is a specific answer to this question.

Most constructions that transform a single old metric into a new one can be generalized via subadditive functions. More specifically,

Suppose $g : [0, \infty) \to [0, \infty)$ is such that:

  1. $g$ is monotone increasing in $[0,\infty)$;
  2. $g(t) > 0$ for $t > 0$ and $g(0)=0$;
  3. $g$ is subadditive: $g(s+t) \leq g(s) + g(t)$ for all $s, t \geq 0$.

Then whenever $(X,d)$ is a metric space, then so is $(X, e)$ where $e = g \circ d$.

In some common scenarios, $g$ happens to be strictly increasing in $[0, \infty)$, in which case the condition (2.) is automatically satisfied.

To prove the above proposition, just verify the definitions of a metric. Since this calculation is routine, I will verify only the most interesting property, namely triangle inequality:

$$e(x,z) = g(d(x,z)) \stackrel{?}{\leq} g(d(x,y)+d(y,z)) \stackrel{?}{\leq} g(d(x,y)) + g(d(y,z)) = e(x,y)+e(y,z) .$$ (Why do the inequalities marked with "?" hold?)

Remark. In fact, we can say a bit more than the fact $e$ defines a metric on the space $X$. Assuming further that $g$ is continuous, the new metric $e$ is "equivalent" to $d$ (in the sense that they generate the same topologies).


Here are some commonly used examples of $g$:

  1. $g(t) = t^p$ for any $p \in (0,1]$.

  2. $g(t) = \min \{t,1 \}$.

  3. $g(t) = \frac{t}{t+1}$.

Notice that in the second and third examples, $g$ is a bounded function. In fact, these are standard examples used to show that every metric $d$ is, in fact, topologically equivalent to a bounded metric. (In particular, boundedness of a metric is not a topological property.)

Solution 2:

A common example is $\rho(x,y) = \frac{d(x,y)}{1+d(x,y)}$, so $g$ in this case is the function $\frac{x}{1+x}$.