Example of an “almost-metric” without symmetry

geometrymetric-spacessymmetry

It is not difficult to find an "almost-metric" $d$ that satisfies all axioms of a metric except the triangle inequality. It should also be possible to construct a function $d$ that satisfies all axioms except the symmetry, but I was unable to find one. (But I'm sure there must be one.)

Is there an example of a "almost-metric" that is not symmetric but satisfies the other axioms of a metric (positive-definiteness, triangle inequality)?

To be specific (because $d$ should not be symmetric) we want

$$d(a,b) + d(b,c) \geq d(a,c)$$

to hold. It is certainly interesting to find an example in $\mathbb R^n$ (even if just for a specific $n$) but I'm also interested in other "almost-metric-spaces".

Best Answer

I just found out that these $d$ are called Quasimetrics. An example on $\mathbb R$ is the following:

$$d(x,y) = \begin{cases} x - y & x \geq y \\ 1 & \text{otherwise}\end{cases}$$