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

  1. For any $x \in X$, $d(x, x) = 0$.

  2. For any $x, y \in X$, $d(x, y) = d(y, x)$.

  3. For any $x, y, z \in X$, $d(x, z) \le d(x, y) + d(y, z)$.

If $d$ satisfies the above and

  1. For any $x, y \in X$ with $x \ne y$, $d(x, y) > 0$.

then $d$ is a metric.