Skip to main content

Section Metric Spaces

For most of our mathematical careers our mathematics has taken place in R2, where we measure the distance between points (x1,x2) and (y1,y2) with the standard Euclidean distance dE. In our preview activity we saw that the function dT satisfies many of the same properties as dE. These properties allow us to use dE or dT as distance functions. We call any distance function a metric, and any space on which a metric is defined is called a metric space.

Definition 3.4.

A metric on a space X is a function d:XΓ—Xβ†’R+βˆͺ{0} that satisfies the properties:
  1. d(x,y)β‰₯0 for all x,y∈X,
  2. d(x,y)=0 if and only if x=y in X,
  3. d(x,y)=d(y,x) for all x,y∈X, and
  4. d(x,y)≀d(x,z)+d(z,y) for all x,y,z∈X.
Properties 1 and 2 of a metric say that a metric is positive definite, while property 3 states that a metric is symmetric. Property 4 of the definition is usually the most difficult property to verify for a metric and is called the triangle inequality.

Definition 3.5.

A metric space is a pair (X,d), where d is a metric on the space X.
When the metric is clear from the context, we just refer to X as the metric space.

Activity 3.2.

For each of the following, determine if (X,d) is a metric space. If (X,d) is a metric space, explain why. If (X,d) is not a metric space, determine which properties of a metric d satisfies and which it does not. If (X,d) is a metric space, give a geometric description of the unit circle (the set of all points in X a distance 1 from the zero element) in the space.

(d)

X=C[0,1], the set of all continuous functions on the interval [0,1],
d(f,g)=∫01|f(x)βˆ’g(x)|dx.
It should be noted that not all metric spaces are infinite. We discuss one metric on a finite space in the following example.

Example 3.6.

Let X={a,b,c} and define d:AΓ—Aβ†’R+βˆͺ{0} with the entries in Table 3.7.
Table 3.7. Table of values for a function d
a b c
a 0 3 5
b 3 0 4
c 5 4 0
By definition we have d(x,y)β‰₯0 for all x,y∈X with d(x,y)=0 if and only if x=y. Since the table is symmetric around the diagonal, we can see that d(x,y)=d(y,x) for all x,y∈X. The only item to verify is the triangle inequality. If d(x,y)=0, then
d(x,y)=0≀d(x,z)+d(z,y)
for any x,y∈X. If d(x,z)=0, then x=z and
d(x,y)=d(z,y)≀d(z,z)+d(z,y).
That leaves three cases to consider, when x, y, and z are distinct. Now
d(a,b)=3≀5+4=d(a,c)+d(c,b),d(a,c)=5≀3+4=d(a,b)+d(b,c),d(b,c)=4≀3+5=d(b,a)+d(a,c).
So d is a metric on X.
Example 3.6 shows that even finite sets can be metric spaces. In fact, we can make a finite metric space by taking any finite subset S of a metric space (X,d) and use as a metric the restriction of d to S. Example 3.6 illustrates this by letting a=(0,0), b=(3,0), and c=(3,4) in R2. Then d is the restriction of the Euclidean metric to the set X. Another way to construct a finite metric space is to start with a finite set of points and make a graph with the points as vertices. Construct edges so that the graph is connected (that is, there is a path from any one vertex to any other) and give weights to the edges as illustrated in Figure 3.8. We then define a metric d on S by letting d(x,y) be the length of a shortest path between vertices x and y in the graph. For example, d(b,c)=d(b,e)+d(e,c)=9 in this example.
Figure 3.8. A graph to define a metric.
Just as with the Euclidean and taxicab metrics, item (c) in Activity 3.2 can be extended to Rn as follows. If x=(x1,x2,…,xn) and y=(y1,y2,…,yn) are in Rn, then the maximum distance dM(x,y) from x to y is defined as
dM(x,y)=max{|x1βˆ’y1|,|x2βˆ’y2|,|x3βˆ’y3|,…,|xnβˆ’yn|}=max1≀i≀n{|xiβˆ’yi|}.
The metric dM is called the max metric. In the following section we prove that the Euclidean metric is in fact a metric. Proofs that dT and dM are metrics are left to Exercise 5 and Exercise 6.