$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 3.7: Metric Spaces

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

I. In §§1-3, we defined distances $$\rho(\overline{x}, \overline{y})$$ for points $$\overline{x}, \overline{y}$$ in $$E^{n}$$ using the formula

$\rho(\overline{x}, \overline{y})=\sqrt{\sum_{k=1}^{n}\left(x_{k}-y_{k}\right)^{2}}=|\overline{x}-\overline{y}|.$

This actually amounts to defining a certain function $$\rho$$ of two variables $$\overline{x}, \overline{y} \in$$ $$E^{n} .$$ We also showed that $$\rho$$ obeys the three laws of Theorem 5 there. (We call them metric laws.)

Now, as will be seen, such functions $$\rho$$ can also be defined in other sets, using quite different defining formulas. In other words, given any set $$S \neq \emptyset$$ of arbitrary elements, one can define in it, so to say, "fancy distances" $$\rho(x, y)$$ satisfying the same three laws. It turns out that it is not the particular formula used to define $$\rho$$ but rather the preservation of the three laws that is most important for general theoretical purposes.

Thus we shall assume that a function $$\rho$$ with the same three properties has been defined, in some way or other, for a set $$S \neq \emptyset$$ , and propose to study the consequences of the three metric laws alone, without assuming anything else. (In particular, no operations other than $$\rho,$$ or absolute values, or inequalities < need be defined in $$S .$$ ) All results so obtained will, of course, apply to distances in $$E^{n}$$ (since they obey the metric laws), but they will also apply to other cases where the metric laws hold.

The elements of $$S$$ (though arbitrary) will be called "points," usually denoted by $$p, q, x, y, z$$ (sometimes with bars, etc. $$) ; \rho$$ is called a metric for $$S .$$ We symbolize it by

$\rho : S \times S \rightarrow E^{1}$

since it is function defined on $$S \times S$$ (pairs of elements of $$S)$$ into $$E^{1} .$$ Thus we are led to the following definition.

Definition

A metric space is a set $$S \neq \emptyset$$ together with a function

$\rho : S \times S \rightarrow E^{1}$

(called a metric for $$S$$ ) satisfying the metric laws (axioms):

For any $$x, y,$$ and $$z$$ in $$S,$$ we have

1. $$\rho(x, y) \geq 0,$$ and $$\left(\mathrm{i}^{\prime}\right) \rho(x, y)=0$$ iff $$x=y;$$
2. $$\rho(x, y)=\rho(y, x)$$ (symmetry law); and
3. $$\rho(x, z) \leq \rho(x, y)+\rho(y, z)($$ triangle law$$).$$

Thus a metric space is a pair $$(S, \rho),$$ namely, a set $$S$$ and a metric $$\rho$$ for it. In general, one can define many different metrics

$\rho, \rho^{\prime}, \rho^{\prime \prime}, \ldots$

for the same $$S .$$ The resulting spaces

$(S, \rho),\left(S, \rho^{\prime}\right),\left(S, \rho^{\prime \prime}\right), \ldots$

then are regarded as different. However, if confusion is unlikely, we simply write $$S$$ for $$(S, \rho) .$$ We write "$$p \in(S, \rho)$$" for "$$p \in S$$ with metric $$\rho,$$" and "$$A \subseteq(S, \rho)$$" for "$$A \subseteq S$$ in $$(S, \rho)$$."

Example $$\PageIndex{1}$$

(1) In $$E^{n},$$ we always assume

$\rho(\overline{x}, \overline{y})=|\overline{x}-\overline{y}|\text{ (the "standard metric") }$

unless stated otherwise. By Theorem 5 in §§1-3, $$\left(E^{n}, \rho\right)$$ is a metric space.

(2) However, one can define for $$E^{n}$$ many other "nonstandard" metrics. For example,

$\rho^{\prime}(\overline{x}, \overline{y})=\left(\sum_{k=1}^{n}\left|x_{k}-y_{k}\right|^{p}\right)^{1 / p}\text{ for any real } p \geq 1$

likewise satisfies the metric laws (a proof is suggested in §10, Problems 5-7; similarly for $$C^{n} .$$

(3) Any set $$S \neq \emptyset$$ can be "metrized" (i.e., endowed with a metric) by setting

$\rho(x, y)=1\text{ if } x \neq y,\text{ and } \rho(x, x)=0.$

(Verify the metric laws!) This is the so-called discrete metric. The space $$(S, \rho)$$ so defined is called a discrete space.

(4) Distances ("mileages") on the surface of our planet are actually measured along circles fitting in the curvature of the globe (not straight lines). One can show that they obey the metric laws and thus define a (nonstandard) metric for $$S=$$ (surface of the globe).

(5) A mapping $$f : A \rightarrow E^{1}$$ is said to be bounded iff

$\left(\exists K \in E^{1}\right)(\forall x \in A) \quad|f(x)| \leq K.$

For a fixed $$A \neq \emptyset,$$ let $$W$$ be the set of all such maps (each being treated as a single "point" of $$W ) .$$ Metrize $$W$$ by setting, for $$f, g \in W,$$

$\rho(f, g)=\sup _{x \in A}|f(x)-g(x)|.$

(Verify the metric laws; see a similar proof in §10.)

II. We now define "balls" in any metric space $$(S, \rho)$$.

Definition

Given $$p \in(S, \rho)$$ and a real $$\varepsilon>0,$$ we define the open ball or globe with center $$p$$ and radius $$\varepsilon$$ (briefly "$$\varepsilon$$-globe about p", denoted

$G_{p}\text{ or } G_{p}(\varepsilon)\text{ or } G(p ; \varepsilon),$

to be the set of all $$x \in S$$ such that

$\rho(x, p)<\varepsilon.$

Similarly, the closed $$\varepsilon$$-globe about p is

$\overline{G}_{p}=\overline{G}_{p}(\varepsilon)=\{x \in S | \rho(x, p) \leq \varepsilon\}.$

The $$\varepsilon$$ -sphere about $$p$$ is defined by

$S_{p}(\varepsilon)=\{x \in S | \rho(x, p)=\varepsilon\}.$

Note. An open globe in $$E^{3}$$ is an ordinary solid sphere (without its surface $$S_{p}(\varepsilon) ),$$ as known from geometry. In $$E^{2},$$ an open globe is a disc (the interior of a circle). In $$E^{1}$$ , the globe $$G_{p}(\varepsilon)$$ is simply the open interval $$(p-\varepsilon, p+\varepsilon)$$, while $$\overline{G}_{p}(\varepsilon)$$ is the closed interval $$[p-\varepsilon, p+\varepsilon].$$

The shape of the globes and spheres depends on the metric $$\rho$$. It may become rather strange for various unusual metrics. For example, in the discrete space (Example (3)), any globe of radius $$<1$$ consists of its center alone, while $$G_{p}(2)$$ contains the entire space. (Why?) See also Problems 1 ,2, and 4.

III. Now take any nonempty set $$A \subseteq(S, \rho).$$

The distances $$\rho(x, y)$$ in $$S$$ are, of course, also defined for points of $$A$$ (since $$A \subseteq S$$ , and the metric laws remain valid in $$A .$$ Thus $$A$$ is likewise a (smaller) metric space under the metric $$\rho$$ "inherited" from $$S ;$$ we only have to restrict the domain of $$\rho$$ to $$A \times A$$ (pairs of points from $$A ) .$$ The set $$A$$ with this metric is called a subspace of $$S .$$ We shall denote it by $$(A, \rho),$$ using the same letter $$\rho$$ or simply by $$A .$$ Note that $$A$$ with some other metric $$\rho^{\prime}$$ is not called a subspace of $$(S, \rho) .$$

By definition, points in $$(A, \rho)$$ have the same distances as in $$(S, \rho) .$$ However, globes and spheres in $$(A, \rho)$$ must consist of points from $$A$$ only, with centers in $$A .$$ Denoting such a globe by

$G_{p}^{*}(\varepsilon)=\{x \in A | \rho(x, p)<\varepsilon\},$

we see that it is obtained by restricting $$G_{p}(\varepsilon)$$ (the corresponding globe in $$S )$$ to points of $$A,$$ i.e., removing all points not in $$A .$$ Thus

$G_{p}^{*}(\varepsilon)=A \cap G_{p}(\varepsilon);$

similarly for closed globes and spheres. $$A \cap G_{p}(\varepsilon)$$ is often called the relativized (to $$A$$ ) globe $$G_{p}(\varepsilon) .$$ Note that $$p \in G_{p}^{*}(\varepsilon)$$ since $$\rho(p, p)=0<\varepsilon,$$ and $$p \in A.$$

For example, let $$R$$ be the subspace of $$E^{1}$$ consisting of rationals only. Then the relativized globe $$G_{p}^{*}(\varepsilon)$$ consists of all rationals in the interval

$G_{p}(\varepsilon)=(p-\varepsilon, p+\varepsilon),$

and it is assumed here that $$p$$ is rational itself.

IV. A few remarks are due on the extended real number system $$E^{*}$$ (see Chapter 2, §§13) . As we know, $$E^{*}$$ consists of all reals and two additional elements, $$\pm \infty,$$ with the convention that $$-\infty<x<+\infty$$ for all $$x \in E^{1}$$ . The standard metric $$\rho$$ does not apply to $$E^{*} .$$ However, one can metrize $$E^{*}$$ in various other ways. The most common metric $$\rho^{\prime}$$ is suggested in Problems 5 and 6 below. Under that metric, globes turn out to be finite and infinite intervals in $$E^{*} .$$

Instead of metrizing $$E^{*},$$ we may simply adopt the convention that intervals of the form

$(a,+\infty]\text{ and } [-\infty, a), a \in E^{1},$

will be called "globes" about $$+\infty$$ and $$-\infty,$$ respectively (without specifying any "radii"). Globes about finite points may remain as they are in $$E^{1} .$$ This convention suffices for most purposes of limit theory. We shall use it often (as we did in Chapter 2, §13).