A Short Introduction to Metric Spaces
Section 2: Subspaces and Product Spaces
One of the things that we can do with
metric spaces is to make
"new spaces from old." For example, a subset of a metric space
can be made into a metric space in its own right in a natural
way. And given two metric spaces, their cross product can be
made into a metric space; in fact, there are several reasonable
ways to do that. This section looks at subspaces and
products of metric spaces. The material on subspaces will
be needed in later sections of this web site. The material
on product spaces, although interesting, will not be needed
and can be skipped.
Subspaces
It should be clear that if is a metric space, then
a subset of can be made into a metric space by using the same measure of distance on
the subset as is used on The subset with that inherited metric is called a "subspace."
Definition 2.1:
Let be a metric space, and let be a subset of
We define a metric on by for
Then is a metric space, which is said to be a
subspace of
The metric is just
the function restricted to the subset of
In practice, we will often use the same name for the distance function
on a subspace as is used for the distance function on the containing space,
but in this section, for clarity, I will avoid doing that.
A big part of understanding a metric space is understanding
its open sets
and closed sets.
To understand a subspace of , we can start by
noting that for , the open ball
in is just the intersection with of the corresponding
open ball in . That is, . This is clear because for
, and therefore
if and only if . In fact, we get
the following similar characterization for all open and closed sets in .
Theorem 2.1:
Let be a metric space and a subset of
and let be the subspace metric on
A subset of is open in the subspace if and
only if there is an open subset of such that
A subset of is closed in the subspace
if and only if there is a closed subset of such that
Proof:
Suppose that is an open subset in the subspace For every
there is an such that
Let be the union of the corresponding open balls in . That is,
Note that
is an open subset of because it is a union of
open balls in We have
The last equality follows since for all
and their union includes every because
Conversely, Suppose that is an open subset of
and let We must show that is open in
Let We need to find such that
Since and
is open in there is an such that
But then
That is,
Turning to the case of closed subsets, note first that for a subset of
and a subset of if and only if
So, applying the first part of the theorem,
is closed in | is open in |
| , for some open |
| , for some open |
| , for some closed |
and that completes the proof. ∎
As an example, we can make the set of rational numbers, , into a metric space
using the subspace metric inherited from . Let
Then is the intersection with of the open interval , which is an
open set in . By the theorem, is open in But since is not
a rational number, is also a closed set in because
There are many subsets of that are both open and closed in . On the other hand,
it can be shown that the only subsets of that are both open an closed in are
and (These facts will become significant have we have
defined connected sets.)
It might also be instructive to note that is an open subset of
the subspace of even though it is not an open set in
You are asked to verify this in one of the exercises in this section.
Product Spaces
is the cross product . The usual metric on
can be defined in terms of the metric on . The usual distance, between the
points and of
is given by
This can be generalized to the cross product of any two metric spaces,
and . That is, we can define a metric
space where
for any and
However, is not the only natural metric on , In particular,
we can define two alternative metric spaces
and by
This illustration shows the open balls of radius about
a point for each of the three product spaces
, , and :

(However, I should note that all three metrics have the same
open sets. That is, they produce the same topology
on .)
We should prove that , , and are in fact metrics on
. I will leave and as exercises, but here
is a proof for
Theorem 2.2:
Suppose that and are metric spaces. Define the function
by
Then is a metric
on .
Proof:
We need to show that satisfies the three properties that define
a metric space. The
proofs for the first two properties are straightforward: For property 1,
for all
and because a
square root is always non-negative. And
if and
only if and , which is in turn true
if and only if and because and are metrics.
Finally, and if and only if
by the definition of equality of ordered pairs. For property 2, the
symmetry of follows immediately from the symmetry of and
To prove property 3 for , let ,
and be elements of .
From the triangle inequality for , we know that
Squaring both sides, we get
and similarly for
Adding these two inequalities and taking the square root gives
which is the triangle inequality for . (The inequality (**) follows because for
any non-negative numbers and , .) ∎
Of course, it is possible to define metrics on cross products of more than
two metric spaces. For example, if , , are
metric spaces, we can define the metric on
by
The fact that this is a metric for all can be proved by induction, noting
that
This definition, of course, gives us the usual metric on
The metrics and on can similarly be extended to metrics
on .
Exercises
Exercise 2.1:
Consider the closed interval as a subspace of .
Verify that is an open set in the subspace .
Exercise 2.2:
Let be an open subset of the metric space .
Show that a subset of is an open set in the subspace
if and only if is an open set in the space
(The previous exercise shows that the fact that is open is essential here.)
State and prove a similar result for closed subsets.
Exercise 2.3:
Let be the set of all integers, and consider the subspace
of . What are the open sets in ? How does the
metric space ) compare to the metric space where
is the discrete metric,
as defined in Exercise 1.5?
Exercise 2.4:
Let and be metric spaces, and consider the
metric space where
Suppose that is an
open set in and is an
open set in . Show that is an
open set in
Is every open subset of of this form?
Exercise 2.5:
Explain why the pictures are correct in the illustration in this section
of the open balls and in .
Exercise 2.6:
Let and be metric spaces and let
be the metric on defined as
. Show that is in fact a metric.