Metric Spaces Notes
Definition 1.2.1
A nonempty set \( X \) with a map \( d: X \times X \to \mathbb{R} \) is called a metric space if the map \( d \) satisfies:
- (MS1) \( d(x, y) \ge 0 \quad \forall x, y \in X \)
- (MS2) \( d(x, y) = 0 \iff x = y \)
- (MS3) \( d(x, y) = d(y, x) \quad \forall x, y \in X \)
- (MS4) \( d(x, y) \le d(x, z) + d(z, y) \quad \forall x, y, z \in X \)
Subspaces
If \( Y \) is a nonempty subset of \( X \), the restriction \( d_Y \) of \( d \) to \( Y \times Y \) serves as a metric for \( Y \).
- \( (Y, d_Y) \) is a subspace of \( X \).
- \( d_Y \) is the metric induced by \( d \) on \( Y \).
Terminology
Elements of a metric space are called points and \( d(x, y) \) is the distance between them.
Example 1.2.2 (i)
The Standard Metric on \( \mathbb{R} \)
Define \( d: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \) by: \[ d(x, y) = |x – y| \]
Define \( d: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \) by: \[ d(x, y) = |x – y| \]
Rigorous Proof
To show \( d(x, y) = |x – y| \) is a metric on \( \mathbb{R} \):
MS1: Non-Negativity
By definition of absolute value, \( |a| \ge 0 \) for any \( a \in \mathbb{R} \).
Thus, \( d(x, y) = |x – y| \ge 0 \).
MS2: Identity of Indiscernibles
\( d(x, y) = 0 \iff |x – y| = 0 \).
Since \( |a| = 0 \iff a = 0 \), we have \( x – y = 0 \), which implies \( x = y \).
MS3: Symmetry
Using the property \( |a| = |-a| \):
\[ d(x, y) = |x – y| = |-(y – x)| = |y – x| = d(y, x) \]
MS4: Triangle Inequality
For any \( x, y, z \in \mathbb{R} \):
\[ d(x, z) = |x – z| = |(x – y) + (y – z)| \]
Applying the standard triangle inequality \( |a + b| \le |a| + |b| \):
\[ |(x – y) + (y – z)| \le |x – y| + |y – z| \]
\[ \therefore d(x, z) \le d(x, y) + d(y, z) \]
\( (\mathbb{R}, d) \) is a Metric Space.
Example 1.2.2 (v)
The Taxicab Metric (\( \ell_1 \) Metric)
Let \( X = \mathbb{R}^n \). For \( x = (x_1, \dots, x_n) \) and \( y = (y_1, \dots, y_n) \), define: \[ d_1(x, y) = \sum_{i=1}^{n} |x_i – y_i| \] This is often called the Manhattan distance because it represents distance traveled along a grid.
Let \( X = \mathbb{R}^n \). For \( x = (x_1, \dots, x_n) \) and \( y = (y_1, \dots, y_n) \), define: \[ d_1(x, y) = \sum_{i=1}^{n} |x_i – y_i| \] This is often called the Manhattan distance because it represents distance traveled along a grid.
Complete Rigorous Proof
Verification of axioms for \( d_1 \):
MS1: Non-Negativity
Since each absolute value \( |x_i – y_i| \ge 0 \), the sum of non-negative terms is non-negative.
\[ \sum_{i=1}^{n} |x_i – y_i| \ge 0 \implies d_1(x, y) \ge 0 \]
MS2: Identity of Indiscernibles
\( d_1(x, y) = 0 \iff \sum |x_i – y_i| = 0 \).
A sum of non-negative real numbers is zero if and only if each term is zero.
\[ |x_i – y_i| = 0 \implies x_i = y_i \quad \forall i \implies x = y \]
MS3: Symmetry
Using the property that \( |a – b| = |b – a| \):
\[ d_1(x, y) = \sum |x_i – y_i| = \sum |y_i – x_i| = d_1(y, x) \]
MS4: Triangle Inequality
For any \( x, y, z \in \mathbb{R}^n \):
\[ d_1(x, z) = \sum_{i=1}^{n} |x_i – z_i| = \sum_{i=1}^{n} |(x_i – y_i) + (y_i – z_i)| \]
Applying the scalar triangle inequality \( |a + b| \le |a| + |b| \) to each term in the sum:
\[ \sum |(x_i – y_i) + (y_i – z_i)| \le \sum (|x_i – y_i| + |y_i – z_i|) \]
Distributing the summation:
\[ \sum |x_i – y_i| + \sum |y_i – z_i| = d_1(x, y) + d_1(y, z) \]
\[ \therefore d_1(x, z) \le d_1(x, y) + d_1(y, z) \]
Example 1.2.2 (ii)
The Euclidean Metric on \( \mathbb{R}^n \)
Let \( X = \mathbb{R}^n = \{x = (x_1, x_2, \dots, x_n) : x_i \in \mathbb{R}, 1 \le i \le n\} \). For any \( x, y \in \mathbb{R}^n \), define the distance function \( d \) as: \[ d(x, y) = \left( \sum_{i=1}^{n} (x_i – y_i)^2 \right)^{1/2} \]
Let \( X = \mathbb{R}^n = \{x = (x_1, x_2, \dots, x_n) : x_i \in \mathbb{R}, 1 \le i \le n\} \). For any \( x, y \in \mathbb{R}^n \), define the distance function \( d \) as: \[ d(x, y) = \left( \sum_{i=1}^{n} (x_i – y_i)^2 \right)^{1/2} \]
Complete Rigorous Proof
We verify that \( d \) satisfies the four metric space axioms:
MS1: Non-Negativity
Since each term \( (x_i – y_i)^2 \ge 0 \), their sum is non-negative. The principal square root of a non-negative number is non-negative:
\[ d(x, y) = \sqrt{\sum_{i=1}^{n} (x_i – y_i)^2} \ge 0 \]
MS2: Identity of Indiscernibles
\( d(x, y) = 0 \iff \sum_{i=1}^{n} (x_i – y_i)^2 = 0 \).
A sum of non-negative squares is zero if and only if each term is zero:
\[ (x_i – y_i)^2 = 0 \implies x_i = y_i \quad \forall i \]
Thus, \( x = (x_1, \dots, x_n) = (y_1, \dots, y_n) = y \).
MS3: Symmetry
Since \( (x_i – y_i)^2 = (-(y_i – x_i))^2 = (y_i – x_i)^2 \):
\[ d(x, y) = \sqrt{\sum (x_i – y_i)^2} = \sqrt{\sum (y_i – x_i)^2} = d(y, x) \]
MS4: Triangle Inequality
For any \( x, y, z \in \mathbb{R}^n \), we check \( d(x, z) \le d(x, y) + d(y, z) \):
\[ \sqrt{\sum (x_i – z_i)^2} = \sqrt{\sum ((x_i – y_i) + (y_i – z_i))^2} \]
Applying the Minkowski Inequality (or triangle inequality for vectors):
\[ \left( \sum |a_i + b_i|^2 \right)^{1/2} \le \left( \sum |a_i|^2 \right)^{1/2} + \left( \sum |b_i|^2 \right)^{1/2} \]
Let \( a_i = x_i – y_i \) and \( b_i = y_i – z_i \). Then:
\[ d(x, z) \le d(x, y) + d(y, z) \]
\( (\mathbb{R}^n, d) \) is the Euclidean Metric Space.
Example 1.2.2 (iii)
The \( \ell_p \) Metric (Minkowski Metric)
Let \( X = \mathbb{R}^n \). For \( x = (x_1, \dots, x_n) \) and \( y = (y_1, \dots, y_n) \), define for \( p \ge 1 \): \[ d_p(x, y) = \left( \sum_{i=1}^{n} |x_i – y_i|^p \right)^{1/p} \] Note that when \( p = 2 \), this matches the Euclidean Metric.
Let \( X = \mathbb{R}^n \). For \( x = (x_1, \dots, x_n) \) and \( y = (y_1, \dots, y_n) \), define for \( p \ge 1 \): \[ d_p(x, y) = \left( \sum_{i=1}^{n} |x_i – y_i|^p \right)^{1/p} \] Note that when \( p = 2 \), this matches the Euclidean Metric.
Complete Rigorous Proof
Verification for \( p \ge 1 \):
MS1: Non-Negativity
Since absolute values \( |x_i – y_i| \ge 0 \) and \( p \ge 1 \), the entire sum and its \( p \)-th root are non-negative.
\[ d_p(x, y) \ge 0 \quad \forall x, y \in \mathbb{R}^n \]
MS2: Identity of Indiscernibles
\( d_p(x, y) = 0 \iff \sum |x_i – y_i|^p = 0 \).
This sum of non-negative terms is zero if and only if each term \( |x_i – y_i|^p = 0 \), meaning \( x_i = y_i \) for all \( i \), thus \( x = y \).
MS3: Symmetry
Because \( |x_i – y_i| = |-(y_i – x_i)| = |y_i – x_i| \):
\[ d_p(x, y) = \left( \sum |x_i – y_i|^p \right)^{1/p} = \left( \sum |y_i – x_i|^p \right)^{1/p} = d_p(y, x) \]
MS4: Triangle Inequality
To prove \( d_p(x, z) \le d_p(x, y) + d_p(y, z) \), we apply the Minkowski Inequality for sums:
\[ \left( \sum |a_i + b_i|^p \right)^{1/p} \le \left( \sum |a_i|^p \right)^{1/p} + \left( \sum |b_i|^p \right)^{1/p} \]
Letting \( a_i = x_i – y_i \) and \( b_i = y_i – z_i \), we obtain the required result.
\( (\mathbb{R}^n, d_p) \) is a Metric Space for \( p \ge 1 \).
Example 1.2.2 (iv)
The Maximum Metric (Supremum Metric)
Let \( X = \mathbb{R}^n \). For \( x = (x_1, \dots, x_n) \) and \( y = (y_1, \dots, y_n) \), define: \[ d_\infty(x, y) = \max_{1 \le i \le n} |x_i – y_i| \]
Let \( X = \mathbb{R}^n \). For \( x = (x_1, \dots, x_n) \) and \( y = (y_1, \dots, y_n) \), define: \[ d_\infty(x, y) = \max_{1 \le i \le n} |x_i – y_i| \]
Rigorous Proof
Verification of axioms for \( d_\infty \):
MS1: Non-Negativity
Since each absolute value \( |x_i – y_i| \ge 0 \), their maximum must also be non-negative.
\[ d_\infty(x, y) \ge 0 \]
MS2: Identity of Indiscernibles
\( d_\infty(x, y) = 0 \iff \max |x_i – y_i| = 0 \).
This means \( |x_i – y_i| = 0 \) for every \( i \), which implies \( x_i = y_i \) for all \( i \), so \( x = y \).
MS3: Symmetry
Since \( |x_i – y_i| = |y_i – x_i| \) for each coordinate:
\[ \max |x_i – y_i| = \max |y_i – x_i| \implies d_\infty(x, y) = d_\infty(y, x) \]
MS4: Triangle Inequality
For any \( i \), we have:
\[ |x_i – z_i| \le |x_i – y_i| + |y_i – z_i| \]
Since \( |x_i – y_i| \le d_\infty(x, y) \) and \( |y_i – z_i| \le d_\infty(y, z) \) for all \( i \):
\[ |x_i – z_i| \le d_\infty(x, y) + d_\infty(y, z) \]
Taking the maximum over \( i \) on the left side:
\[ d_\infty(x, z) \le d_\infty(x, y) + d_\infty(y, z) \]
Summary of \( \ell_p \) Metrics on \( \mathbb{R}^n \)
| Metric Name | Formula |
|---|---|
| Standard (\( \mathbb{R} \)) | \( |x – y| \) |
| Taxicab (\( \ell_1 \)) | \( \sum |x_i – y_i| \) |
| Euclidean (\( \ell_2 \)) | \( \sqrt{\sum (x_i – y_i)^2} \) |
| Minkowski (\( \ell_p \)) | \( \left( \sum |x_i – y_i|^p \right)^{1/p} \) |
| Maximum (\( \ell_\infty \)) | \( \max |x_i – y_i| \) |
