8
$\begingroup$

Can anyone please tell me whether the following function $d:\mathbb{R}^2 \times \mathbb{R}^2 \to \mathbb{R}$ is really a metric or not on $\mathbb{R}^2$.

$ d((x_1,x_2),(y_1,y_2))= \begin{cases} |x_1-y_1|, &\text{ if } x_2=y_2\\ |x_1|+|y_1|+|x_2-y_2|, &\text{ if } x_2 \neq y_2. \end{cases} $

If it really is indeed a metric, please give the proof of triangle inequality.(I'm OK with the other two conditions).

  • 1
    If you pick three random points for the triangle inequality, there are only $2^3=8$ possibilities to check. But it collapses to four, as each point can be on the line $x=y$ or not, so the important question is how many are on that line.2011-07-21

1 Answers 1

20

It is. Your indexing is confusing me, so I'm going to rename the points $p = (x_1, y_1)$ and $q = (x_2, y_2)$. Then your metric is

$d(p, q) = \begin{cases} |x_1 - x_2|, &\text{ if } y_1=y_2\\ |x_1|+|x_2|+|y_1-y_2|, &\text{ if } y_1 \neq y_2. \end{cases}.$

This metric describes the length of the shortest path between $p$ and $q$ which cannot move vertically except on the $y$-axis. (Imagine that $\mathbb{R}^2$ has been separated into horizontal rows, and the only way to move vertically is to go to a central column given by the $y$-axis.)

That this is indeed a metric is a special case of the following general result, which is probably implicitly known to many people, but I have never seen it written down.

Proposition: Any function of the form "length of the shortest path between two points which satisfies condition $P$" on a metric space $M$ with an intrinsic metric is another metric provided that

  • the shortest path between two points satisfying condition $P$ exists,
  • the trivial path satisfies condition $P$,
  • the reverse of a path satisfying condition $P$ also satisfies condition $P$, and
  • the composition of two paths satisfying condition $P$ also satisfies condition $P$.

(In other words, the collection of all paths satisfying condition $P$ is a connected groupoid.)

Proof. The first condition implies that the function $d$ is well-defined. The second condition implies that $d(p, p) = 0$. The third condition implies that $d(p, q) = d(q, p)$. Since $M$ has an intrinsic metric, $d$ is automatically positive-definite, so it remains to prove the triangle inequality.

Let $p, q, r$ be three points. The composition of the shortest path from $p$ to $q$ satisfying $P$ and the shortest path from $q$ to $r$ satisfying $P$ is, by the fourth condition, a path from $p$ to $r$ satisfying $P$, hence has length at least the length of the shortest path from $p$ to $r$ satisfying $P$. Thus

$d(p, r) \le d(p, q) + d(q, r)$

as desired.

This optimization argument is in some sense a fundamental reason to consider the triangle inequality a reasonable axiom. In fact it is arguably the most important axiom; there are good reasons to drop any of the other axioms of a metric space (some of which correspond to dropping conditions above) to get various generalizations of metric spaces, which are described on the nLab among other places.

  • 1
    The point of an intrinsic length metric is that you *don't* want to assume that shortest paths exist, only *approximately shortest* paths. If shortest paths existed, the whole construction would be a bit pointless. Think for example of $\mathbb{R}^2 \smallsetminus \mathbb{Z}^2$ with the usual Euclidean metric. This is an intrinsic length metric in the ordinary definition but shortest paths don't exist. Another example would be the graph with two vertices and countably many edges of length $1 + \frac{1}{n}$. In order to get shortest paths for free you need completeness and local compactness.2011-07-21