Skip to main content
  1. Notes/

Metric Space

A metric space $\mathcal{M}$ is a tuple $(\mathcal{D}, d)$, where $\mathcal{D}$ is a domain of objects and $d: \mathcal{D} \times \mathcal{D} \rightarrow \mathbb{R}$ is a total (distance) function, satisfying the following properties:

For all $x, y, z \in \mathcal{D}$:

  1. $d(x, y) \geq 0$,
  2. $d(x, y) = d(y, x)$,
  3. $x = y \Leftrightarrow d(x, y) = 0$,
  4. $d(x, z) \leq d(x, y) + d(y, z)$.

Zezula, P., Amato, G., Dohnal, V., & Batko, M. (2006). Similarity search: the metric space approach (Vol. 32). Springer Science & Business Media.