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}$:
- $d(x, y) \geq 0$,
- $d(x, y) = d(y, x)$,
- $x = y \Leftrightarrow d(x, y) = 0$,
- $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.