Metric Spaces

Definition

A metric or a distance \(d\) on a nonempty set \(X\) is a function \(d : X \times X \to \RR\) which satisfies following properties

  1. \(d(x, y) \geq 0 \Forall x, y \in X\) non-negativity axiom [M1];
  2. \(d(x, y) = 0 \iff x = y\) coincidence axiom [M2];
  3. \(d(x, y ) = d(y, x) \Forall x, y \in X\) symmetry [M3];
  4. \(d(x, y) \leq d(x, z) + d(z, y) \Forall x, y, z \in X\) triangle inequality or sub-additivity [M4].

The pair \((X, d)\) is called a metric space.

Lemma

In a metric space \((X, d)\), the inequality

(1)\[| d(x, z) - d(y, z)| \leq d(x, y)\]

holds for all points \(x, y, z \in X\).

Proof
\[d(x, z) \leq d(x, y) + d(y, z) \implies d(x, z) - d(y, z) \leq d(x, y).\]

Interchanging \(x\) and \(y\) we get

\[d(y, z) - d(x, z) \leq d(y, x) = d(x, y).\]

Combining the two, we get the result.

ExampleReal line as metric space

We show different metrics for the set of real numbers \(\RR\). Let \(x, y, z \in \RR\). Define:

\[d_1 (x, y) = | x - y |.\]

Since the absolute value of any real number is non-negative, M1 is satisfied.

\(| x- y | = 0 \iff x - y = 0 \iff x = y\). Thus, M2 is satisfied.

Now,

\[d_1 (x, y) = | x - y | = | - (x - y) | = | y - x | = d_1 (y, x).\]

Thus, M3 is satisfied.

Finally,

\[d_1(x, y) + d_1(y, z) = | x - y | + | y - z | \leq | x - y + y - z | = | x - z | = d_1 (x, z).\]

Thus, M4 is satisfied and \((\RR, d_1)\) is a metric space.

ExampleGeneral Euclidean metrics

We consider metrics defined on \(\RR^n\) (the set of n-tuples).

Let \(x = (x_1, \dots, x_n) \in \RR^n\) and \(y = (y_1, \dots, y_n) \in \RR^n\).

The taxicab metric is defined as

(2)\[d_1(x, y) = \sum_{i = 1}^n | x_i - y_i|.\]

The Euclidean metric is defined as

(3)\[d_2(x, y) = \left ( \sum_{i = 1}^n | x_i - y_i|^2 \right )^{\frac{1}{2}}.\]

The general Euclidean metric is defined as

(4)\[d_p(x, y) = \left ( \sum_{i = 1}^n | x_i - y_i|^p \right )^{\frac{1}{p}} \quad r =2,3, \dots.\]

For \(p = \infty\), metric is defined as

(5)\[d_{\infty}(x, y) = \underset{1 \leq i \leq n}{\max}{ | x_i - y_i|}.\]

We now prove that above are indeed a metric. We start with taxicab metric. M1 is straightforward since

\[d_1(x, y) = \sum_{i = 1}^n | x_i - y_i| \geq 0.\]

M2 is also easy

\[\sum_{i = 1}^n | x_i - y_i| = 0 \iff | x_i - y_i| = 0 \iff x_i = y_i \iff x = y.\]

M3 is straightforward too

\[d_1(x, y) = \sum_{i = 1}^n | x_i - y_i| = \sum_{i = 1}^n | y_i - x_i| = d_1 (y, x).\]

We will prove M4 (triangle inequality) inductively. For \(n=1\)

\[d_1(x, z) + d_1(z, y) = | x_1 - z_1 | + | z_1 - y_1 | \geq | x_1 - z_1 + z_1 - y_1 | = | x_1 - y_1| = d_1(x, y).\]

Thus M1 is true for \(n=1\).

TODO finish it.

Open sets

Definition

Let \((X, d)\) be a metric space. An open ball at any \(x \in X\) with radius \(r > 0\) is the set

(6)\[B(x, r) \triangleq \{ y \in X : d(x, y) < r\}.\]
Lemma
\[B(x, r_1) \subseteq B(x, r) \text{ whenever } r_1 \leq r.\]
Proof
Let \(z \in B(x, r_1)\). Then \(d(x, z) < r_1 \leq r \implies z \in B(x, r)\).
Definition
A set \(A \subseteq X\) is called open if for every \(x \in A\) there exists some \(r > 0\) such that \(B(x, r) \subseteq A\).
Lemma
Every open ball \(B(x, r)\) is an open set.
Proof

Let \(A = B(x, r)\). We need to show that for for every \(y \in A\) there exists an open ball \(B(y, r_1) \subseteq A\).

Let \(r_1 = r - d(x, y)\). Since \(d(x, y) < r \forall y \in A\), hence \(r_1 > 0\). We can also write \(d(x, y) = r - r_1\). Consider \(C = B(y, r_1)\). For any \(z \in C\) we have \(d(y, z) < r_1\). Further using triangle inequality:

\[d(x, z) \leq d(x, y) + d(y, z) \leq r - r_1 + d(y, z) < r - r_1 + r_1 = r.\]

Thus \(z \in B(x, r) \Forall z \in C\), hence \(C \subseteq B(x, r)\). Hence \(B(x, r)\) is open.

Theorem

For a metric space \((X, d)\) following statements hold

  1. \(X\) and \(\EmptySet\) are open sets.
  2. Arbitrary unions of open sets are open sets.
  3. Finite intersections of open sets are open sets.
Proof

Since \(\EmptySet\) doesn’t contain any element hence (i) is vacuously true for \(\EmptySet\). For any \(x \in X\) and any \(r > 0\), \(B(x, r) \subseteq X\) by definition. Hence \(X\) is open.

Let \(\{A_i\}_{i \in I}\) be an arbitrary family of open sets with \(A_i \subseteq X\). Let \(C = \bigcup A_i\). Let \(x \in C\). Then there exists some \(A_i\) such that \(x \in A_i\). Since \(A_i\) is open hence there exists an open ball \(B(x, r) \subseteq A_i \subseteq C\). Thus for every \(x \in C\) there exists an open ball \(B(x, r) \subseteq C\). Hence \(C\) is open.

Let \(\{A_1, \dots, A_n\}\) be a finite collection of open subsets of \(X\). Let \(C = \bigcap A_i\). Let \(x \in C\). Then \(x \in A_i \Forall 1 \leq i \leq n\). Thus there exists an open ball \(B(x, r_i) \subseteq A_i \Forall 1 \leq i \leq n\). Now let \(r = \min(r_1, \dots, r_n)\). Since \(r_i > 0\) and we are taking a minimum over finite set of numbers hence \(r > 0\). Thus \(B(x, r) \subseteq B(x, r_i) \subseteq A_i \Forall 1 \leq i \leq n\). Thus \(B(x, r) \subseteq C\). Thus C is open.

Definition
Let \((X, d)\) be a metric space. Let \(A \subseteq X\). A point \(a \in A\) is called an interior point of \(A\) if there exists an open ball \(B(a, r)\) such that \(B(a, r) \subseteq A\).
Definition
The set of all interior points of a set \(A\) is called its interior. It is denoted by \(\Interior{A}\).
Lemma
For any set \(A \subseteq X\), its interior \(\Interior{A}\) is an open set.
Proof

We need to show that for every \(x \in \Interior{A}\), there exists an open ball \(B(x, r) \subseteq \Interior{A}\).

Let \(x \in \Interior{A}\). Then there exists an open ball \(B(x, r) \subseteq A\). Since \(B( x, r)\) is open hence for every \(y \in B (x, r)\) there exists an open ball \(B (y , r_1) \subseteq B(x, r) \subseteq A\). Thus \(y\) is an interior point of \(A\). Hence \(B(x, r) \subseteq \Interior{A}\).

Lemma
For any set \(A \subseteq X\), its interior \(\Interior{A}\) is the largest open set included in \(A\).
Proof
Let \(C \subseteq A\) be open. Let \(x \in C\). Then there exists an open ball \(B(x, r) \subseteq C \subseteq A\). Thus \(x\) is an interior point of \(A\). Hence \(x \in \Interior{A}\). Thus \(C \subseteq \Interior{A}\). Thus every open subset of \(A\) is a subset of interior of \(A\). We have already shown that Interior{A} is open. Hence Interior{A} is the largest open set contained in \(A\).
Lemma
\(A\) is open if and only if \(\Interior{A} = A\).
Proof

Let \(A\) be open. Hence for every \(x \in A\), there exists an open ball \(B(x, r) \subseteq A\). Thus \(x\) is an interior point of \(A\). Thus \(A \subseteq \Interior{A}\). But since \(\Interior{A} \subseteq A\), hence \(\Interior{A} = A\).

Now the converse. Let \(\Interior{A} = A\). Thus for every point \(x \in A\), there exists an open ball \(B(x, r) \subseteq A\) since \(x \in \Interior{A}\). Hence \(A\) is open.

Closed sets

Definition
A subset \(A\) of a metric space \((X, d)\) is called closed if its complement \(X \setminus A\) denoted as \(A^c\) is open.
Theorem

For a metric space \((X, d)\) the following statements hold:

  1. \(X\) and \(\EmptySet\) are closed sets.
  2. Arbitrary intersections of closed sets are closed sets.
  3. Finite unions of closed sets are closed sets.
Proof

Since \(\EmptySet\) is open hence \(X = X \setminus \EmptySet\) is closed. Since \(X\) is open hence \(\EmptySet = X \setminus X\) is closed.

Let \(\{A_i\}_{i \in I}\) be an arbitrary family of closed sets with \(A_i \subseteq X\). Then \(A_i^c\) are open. Thus \(\bigcup A_i^c\) is open. Thus \(\left ( \bigcup A_i^c \right )^c\) is closed. By De Morgan’s law, \(\bigcap A_i\) is closed.

Let \(\{A_1, \dots, A_n\}\) be a finite collection of closed subsets of \(X\). Then \(A_i^c\) are open. Hence their finite intersection \(\bigcap A_i^c\) is open. Hence \(\left ( \bigcap A_i^c \right )^c\) is closed. By De Morgan’s law, \(\bigcup A_i\) is closed.

Remark
A set \(A\) is open if and only if \(A^c\) is closed. Similarly a set \(A\) is closed if and only if \(A^c\) is open.
Definition
A point \(x \in X\) is called a closure point of a set \(A \subseteq X\) if every open ball at \(x\) contains at least one element of \(A\); i.e. \(B(x, r) \cap A \neq \EmptySet \Forall r > 0\).

Note that a closure point of \(A\) need not belong to \(A\). At the same time, every point in \(A\) is a closure point of \(A\).

Definition
The set of all closure points of a set \(A \subseteq X\) is called closure of \(A\) and is denoted by \(\Closure{A}\).

Clearly \(A \subseteq \Closure{A}\).

Lemma
The closure of a set \(A\) in a metric space \((X, d)\) is a closed set.
Proof

We will show that \(C = \Closure{A}^c\) is open.

Let \(x \in C\). Then \(x\) is not a closure point of \(A\). Hence, there exists an open ball \(B(x, r)\) such that \(B(x, r) \cap A = \EmptySet\). Now, consider \(z \in B (x, r)\). Since \(B(x, r)\) is open, there exists \(r_1 > 0\) such that \(B (z, r_1) \subseteq B(x, r)\). Thus, \(B (z, r_1) \cap A = \EmptySet\). Hence, \(z\) is not a closure point of \(A\). Hence, \(z \in C\). Thus, \(B( x, r) \subseteq C\). Thus, we have shown that for every \(x \in C\), there exists an open ball \(B(x, r) \subseteq C\). Thus, \(C\) is open. Consequently, \(\Closure{A} = C^c\) is closed.

Theorem
For every subset \(A\) of a metric space \((X, d)\) its closure \(\Closure{A}\) is the smallest closed set containing \(A\).
Proof
Let \(C\) be a closed set such that \(A \subseteq C\). Then, \(C^c\) is open. Hence, for every \(x \in C^c\), there exists an open ball \(B(x, r) \subseteq C^c\). Thus, \(B (x, r) \cap C = \EmptySet \implies B (x, r) \cap A = \EmptySet\). Thus, \(x\) is not a closure point of \(A\). Since every point in \(C^c\) is not a closure point of \(A\), hence every closure point of \(A\) belongs to \(C\). Thus, \(\Closure{A} \subseteq C\). Finally, since \(\Closure{A}\) is closed, hence it is the smallest closed set containing \(A\).
Lemma
A set \(A\) is closed if and only if \(A = \Closure{A}\).
Proof

Let \(A\) be closed. Then, \(\Closure{A} \subseteq A\) due to this. But since \(A \subseteq \Closure{A}\), hence, \(A = \Closure{A}\).

Now assume \(A = \Closure{A}\). Since \(\Closure{A}\) is closed, \(A\) is closed.

Definition
A set of the form \(A = \{x \in X : d(x, a) \leq r \}\) is called the closed ball at \(a\) with radius \(r\).
Lemma
A closed ball at point \(a\) with radius \(r\) given by \(A = \{x \in X : d(x, a) \leq r \}\) is a closed set.
Proof

We show that \(A^c\) is open.

Let \(y \in A^c\). Then \(d(y, a) > r\). Now consider \(r_1 = d(y, a) - r > 0\) and an open ball \(B(y, r_1)\). For any \(z \in B(y, r_1)\)

\[d(z, a) \geq d(y, a) - d(z, y) > d(y, a) - r_1 = r.\]

Thus, \(z \in A^c\). Hence, \(B(y, r_1) \subseteq A^c\). Hence, \(A^c\) is open. Thus, \(A\) is closed.

Lemma
The closure of an open ball \(B (x, r) = \{ y \in X : d(x, y) < r\}\) is the closed ball \(A = \{ y \in X : d(x, y) \leq r\}\).
Proof

Any point \(y : d(x, y) < r\) is obviously a closure point of \(B (x, r)\).

We show that a point \(y : d(x, y) = r\) is a closure point of \(B (x, r)\). For contradiction, suppose \(y\) is not a closure point of \(B (x, r)\). Then, there exists an open ball \(B(y, r_1)\) such that \(B (y, r_1) \cap B (x, r) = \EmptySet\).

We show that a point \(y : d(x, y) > r\) is not a closure point of \(B (x, r)\). Let \(r_1 = d(x, y) -r > 0\). Then, \(B ( y, r_1) \cap B (x, r) = \EmptySet\). Hence \(y\) is not a closure point of \(B (x, r)\).