Definition 5.3.1 (Pseudometric). Let $X$ be a set, and $d: X \times X \to [0, \infty)$, then $d$ is a pseudometric on $X$ if
For any $x \in X$, $d(x, x) = 0$.
For any $x, y \in X$, $d(x, y) = d(y, x)$.
For any $x, y, z \in X$, $d(x, z) \le d(x, y) + d(y, z)$.
If $d$ satisfies the above and
For any $x, y \in X$ with $x \ne y$, $d(x, y) > 0$.
then $d$ is a metric.