Definition – Metric Space.

Contents
1. Definition
2. Fourth Condition

Definition

Let X be a set, and let d: X\times X \rightarrow \mathbb{R} be a function. We say that the pair (X, d) is a metric space, if, \forall x_1, x_2, x_3 \in{X},

  1. d(x_1, x_2) = 0 \Leftrightarrow x_1 = x_2
  2. d(x_1, x_2) = d(x_2, x_1)
  3. d(x_1, x_3) \leq d(x_1, x_2) + d(x_2, x_3)

The 3rd condition, d(x_1, x_3) \leq d(x_1, x_2) + d(x_2, x_3), is referred to as the triangle inequality.

The function d, if (X, d) forms a metric space, is referred to as a metric (or a distance) on X.

Fourth Condition

Many textbooks will include a fourth ‘condition’, which actually is a consequence of the first and third conditions (when taken from this webpage; as textbooks may not have them in the same order as they appear here). If we take x_1 = x_3 in condition 3, we have

\begin{aligned} d(x_1, x_1) &\leq d(x_1, x_2) + d(x_2, x_1)  \\ \Leftrightarrow ~ 0 &\leq 2d(x_1, x_2) \\ \Leftrightarrow ~ 0 &\leq d(x_1, x_2) \end{aligned}

So the fourth condition is that, d(x_1, x_2) \geq 0 for all x_1, x_2 \in X