**Question**: When can a distance function `d(x,y)`

be called *metric*, *pseudo-metric*, *quasi-metric* or *semi-metric*?

Constraint | Metric | Pseudo | Quasi | Semi |
---|---|---|---|---|

Non-negativity: d(x,y) ≥ 0 |
x | x | x | x |

Identity of indiscernibles: d(x,y)=0 ⇒ x=y |
x | x | x | |

Symmetry: d(x,y) = d(y,x) |
x | x | x | |

Triangle inequality: d(x,z) ≤ d(x,y)+d(y,z) |
x | x | x |

Table derived from Wikipedia article on metric spaces: http://en.wikipedia.org/wiki/Metric_(mathematics)