# Generalization of metric that can induce ordering

I was wondering if there is some generalization of the concept metric to take positive and negative and zero values, such that it can induce an order on the metric space? If there already exists such a concept, what is its name?

For example on $\forall x,y \in \mathbb R$, we can use difference $x-y$ as such generalization of metric.

Thanks and regards!

-
Antisymmetry might be a reasonable requirement: $d(x,y)=-d(y,x)$. – Dejan Govc Apr 26 '13 at 14:06

If we have a function $\delta$ such that

1. $\delta(x,y)=0$ if and only if $x=y$
2. $\delta(x,y) = -\delta(y,x)$
3. If $\delta(x,y)\geq 0$ and $\delta(y,z)\geq 0$, then $0\leq \delta(x,z) \leq \delta(x,y)+\delta(y,z)$.

then $d(x,y) = |\delta(x,y)|$ clearly defines a metric. Furthermore $x\geq y$ if and only if $\delta(x,y)\geq 0$ defines a total order.

Conversely, if $d$ is a metric and $\geq$ a total order, $\delta(x,y) =\begin{cases} d(x,y) & x\geq y \\ -d(x,y) & x<y \end{cases}$ satisfies all the axioms above.

-
Thanks, this one seems to be the one I am looking for. Is there a name for such $\delta$? – Tim Apr 26 '13 at 16:22
Not that I know of. How about a signed metric? – Abel Apr 26 '13 at 16:24

You will have to lose some of the other axioms of a metric space as well since the requirement that $d(x,y)\ge 0$ in a metric space is actually a consequence of the other axioms: $0=d(x,x)\le d(x,y)+d(y,x)=2\cdot d(x,y)$, thus $d(x,y)\ge 0$. This proof uses the requirements that $d(x,x)=0$, the triangle inequality, and symmetry.

There are notions of generalizations of metric spaces that weaken these axioms. I think the one closest to what you might be thinking about is partial metric spaces (where $d(x,x)=0$ is dropped).

-

How about a distance defined as relative to an origin? This origin being a point on 1d spaces.

For higher dimensional spaces I'm not sure what would be more interesting, either a finite set of n points or a n-1 dimensional subspace given an n dimensional space (as in 2 points or a line, for 2d planes, a plane for 3d spaces and so on.)

I'm actually interested in such a metric on a finite space: I'm trying to implement Kademlia which defines distance as a XOR on the set of 160 bit long symbols and would like to use ordered sublists to manage the buckets ;)

-