Skip to main content

Section Introduction

Metric spaces are particular examples of topological spaces. A metric space is a space that has a metric defined on it. A metric is a function that measures the distance between points in a metric space.
We are familiar with one special metric, the Euclidean metric \(d_E\) in \(\R^2\) where
\begin{equation*} d_E((x_1,x_2),(y_1,y_2)) = \sqrt{(x_1-y_1)^2 + (x_2-y_2)^2}\text{.} \end{equation*}
Figure 3.1. The Euclidean distance between \((x_1,x_2)\) and \((y_1,y_2)\) and the Euclidean unit circle in \(\R^2\text{.}\)
Using this metric, the distance between two points \((x_1,x_2)\) and \((y_1,y_2)\) is the length of the segment connecting the points, while the unit circle (the set of points a distance 1 from the origin) looks like what we think of as a circle as illustrated in Figure 3.1.
As we will see, there are many other metrics that can be defined on \(\R^n\text{,}\) or on other sets.

Preview Activity 3.1.

Consider the function \(d_T\) that assigns to each pair of points in \(\R^2\) the real number
\begin{equation*} d_T((x_1,x_2),(y_1,y_2)) = | x_1-y_1 | + | x_2-y_2 |\text{.} \end{equation*}
This function \(d_T\) is sometimes called the taxicab metric or distance because the distance between points \(x\) and \(y\) can be thought of as obtained by driving around a city block rather than going directly from point \(x\) to point \(y\text{.}\)
Any distance function should satisfy certain properties: the distance between two points should never be negative, the distance from point \(A\) to point \(B\) should be the same as the distance from point \(B\) to point \(A\text{,}\) the shortest distance between two points \(A\) and \(B\) should never be more than the distance from \(A\) to some point \(C\) plus the distance from \(C\) to \(B\text{,}\) and the distance between points should only be zero if the points are the same. In this activity, we determine if \(d_T\) has these properties. Let \(x=(x_1,x_2)\) and \(y=(y_1,y_2)\) in \(\R^2\text{.}\)

(a)

Prove that \(d_T(x,y) \geq 0\text{.}\)

(b)

Prove that \(d_T(x,y) = d_T(y,x)\text{.}\)

(c)

Prove that \(d_T(x,y) = 0\) if and only if \(x = y\text{.}\)

(d)

Let \(z = (z_1,z_2)\) in \(\R^2\text{.}\) Read the proof of Lemma 3.2 (below) and then use Lemma 3.2 to show that
\begin{equation*} d_T(x,y) \leq d_T(x,z) + d_T(z,y)\text{.} \end{equation*}
(Do you have any questions about the proof of the lemma?)
Proof.
Let \(a\) and \(b\) be real numbers. To prove the lemma we consider cases.
Case 1: \(a \geq 0\) and \(b \geq 0\)
In this case \(a+b\) is nonnegative and so \(| a | = a\text{,}\) \(| b | = b\text{,}\) and \(| a+b | = a+b\text{.}\) Then
\begin{equation*} | a+b | = a+b = | a | + | b |\text{.} \end{equation*}
Case 2: \(a \leq 0\) and \(b \leq 0\)
In this case \(a = -a'\) and \(b = -b'\) where \(a'\) and \(b'\) are nonnegative. It follows from Case 1 that
\begin{align*} | a+b | \amp = | -(a'+b') | = | a'+b' | = a'+b' = | a' | + | b' |\\ \amp = | -a' | + | -b' | = | a | + | b |\text{.} \end{align*}
Case 3: One of \(a\) or \(b\) is positive and the other negative
Without loss of generality we assume \(a \gt 0\) and \(b \lt 0\text{.}\) Again we consider cases. Note that \(b \lt 0\) implies \(a+b \lt a\text{.}\)
  • Suppose \(b \geq -2a\text{.}\) Then \(a+b \geq -a\) and so \(-a \leq a+b \lt a\text{.}\) It follows that
    \begin{equation*} | a+b | \leq a = | a | \lt | a | + | b |\text{.} \end{equation*}
  • The last case is when \(b \lt -2a\text{.}\) In this case \(-b \gt 2a\) and so
    \begin{equation*} | b | = -b \gt 2a = 2| a | \gt | a |\text{.} \end{equation*}
    Then \(a+b \lt a = | a | \lt | b |\text{.}\) Finally, \(a \gt 0\) implies \(a+b \gt b = -| b |\text{.}\) So
    \begin{equation*} - | b | \lt a+b \lt | b | \end{equation*}
    and
    \begin{equation*} | a+b | \leq | b | \lt | a | + | b |\text{.} \end{equation*}
This proves our lemma for every possible pair \(a\text{,}\) \(b\text{.}\)

(e)

A picture to illustrate the taxicab distance \(d_T\) between (points \(x_1,x_2)\) and \((y_1,y_2)\) is shown in Figure 3.3. Draw a picture of the unit circle (the set of points a distance 1 from the origin) using the Taxicab metric. Explain your reasoning.
Figure 3.3. The taxicab distance between \((x_1,x_2)\) and \((y_1,y_2)\) in \(\R^2\text{.}\)
The taxicab metric can be extended to \(\R^n\) for any \(n \geq 1\) as follows. If \(x = (x_1, x_2, \ldots, x_n)\) and \(y = (y_1, y_2, \ldots, y_n)\) are in \(\R^n\text{,}\) then the taxicab distance \(d_T(x,y)\) from \(x\) to \(y\) is defined as
\begin{equation*} d_T(x,y) = |x_1-y_1| + |x_2-y_2| + \cdots + |x_n-y_n| = \sum_{i=1}^n |x_i-y_i|\text{.} \end{equation*}