Altanis

2.9Metric Topology

Updated 29 Jun 2026Chapter (PDF)

[2.9.1]Definition(Metric, Distance, ε\epsilon-ball)#

A metric on some set XX is a function d:X×XRd: X \times X \to \bR satisfying the following properties.

  1. Nonnegativity. d(x,y)0d(x, y) \ge 0 for every x,yXx, y \in X.

  2. Symmetry. d(x,y)=d(y,x)d(x, y) = d(y, x) for every x,yXx, y \in X.

  3. Triangle Inequality. d(x,y)+d(y,z)d(x,z)d(x, y) + d(y, z) \ge d(x, z) for every x,y,zXx, y, z \in X.

We say d(x,y)d(x, y) is the distance between two points x,yXx, y \in X. For some ε>0\epsilon > 0 and x0Xx_0 \in X, we define an ε\epsilon-ball about x0x_0 to be the set of all points a distance less than ε\epsilon away from x0x_0. That is,

Bε(x0)={xX:d(x,x0)<ε}.B_\epsilon(x_0) = \{x \in X: d(x, x_0) < \epsilon\}.

A topological space XX is said to be metrizable if there exists some metric that induces the topology on XX.

[2.9.2]Definition(Metric Topology)#

Suppose (X,d)(X, d) is a metric space. Then the set of all ε\epsilon-balls about every point in XX, given by

B={Bε(x):ε>0,xX}\mathcal{B} = \{B_\epsilon(x): \epsilon > 0, x \in X\}

forms a basis for the metric topology on XX.

Proof.

We verify this forms a basis for XX.

  1. Covering. For any xXx \in X, note B1(x)B_1(x) is in the basis, and so XBBBX \subseteq \bigcup_{B \in \mathcal{B}} B as desired.

  2. Local Refinement. Let B1,B2B_1, B_2 be arbitrary elements from the basis, and let xB1B2x \in B_1 \cap B_2. Thus there must be some δ1,δ2\delta_1, \delta_2 such that Bδ1(x)B1B_{\delta_1}(x) \subseteq B_1 and Bδ2(x)B2B_{\delta_2}(x) \subseteq B_2. Then note Bmin{δ1,δ2}(x)B1B2B_{\min\{\delta_1, \delta_2\}}(x) \subseteq B_1 \cap B_2, which is also a basic element, completing the proof.

[2.9.3]Example(Metric Topology Generates Discrete Topology)#

Given a set XX, we may define a metric

d:X×XRd(x,y)={1xy,0otherwise.d: X \times X \to \bR \quad d(x, y) = \begin{cases} 1 & x \ne y, \\ 0 & \text{otherwise.} \end{cases}

It is obvious dd is a metric. But note that the basis for the metric topology contains all singletons, since {x}=B1(x)\{x\} = B_1(x), so the metric topology is discrete.

[2.9.4]Example(Metric Topology on R\bR Generates Order Topology)#

Define the standard metric d(x,y)=xyd(x, y) = |x - y| on R\bR. Then note (a,b)=Bε(a+(ba)/2)(a, b) = B_\epsilon(a + (b - a)/2), where ε=(ba)/2\epsilon = (b - a)/2. Similarly, all Bε(x)=(xε,x+ε)B_\epsilon(x) = (x - \epsilon, x + \epsilon). Thus the metric topology coincides with the standard order topology on R\bR.

[2.9.5]Definition(Bounded Subset, Diameter)#

For some metric space (X,d)(X, d), a set AXA \subseteq X is said to be bounded if there is some MRM \in \bR such that d(a1,a2)Md(a_1, a_2) \le M for every pair a1,a2Aa_1, a_2 \in A. The diameter of a bounded subset AA is defined to be

diam(A)=sup{d(a1,a2):a1,a2A},\diam(A) = \sup\{d(a_1, a_2): a_1, a_2 \in A\},

which exists since AA is bounded above.

Topology is concerned with the idea of metrizability, the abstract notion that a metric may be endowed on a set to form a topology. The behavior and choice of a metric, however, is a strictly analytical topic. Thus, ideas such as “boundedness” that are dependent on choice of metric are not particularly topological. In fact, the next theorem shows that a different metric on R\bR induces the same topology as the standard metric, making them indistinguishable topologically.

[2.9.6]Theorem(Standard Bounded Metric Induces Same Topology as Standard Metric)#

Let (X,d)(X, d) be a metric space. We define the standard bounded metric by

d:X×XRd(x,y)=min{d(x,y),1}.\bar{d}: X \times X \to \bR \quad \bar{d}(x, y) = \min\{d(x, y), 1\}.

Then d\bar{d} is a metric that induces the same metric topology as dd.

Proof.

The proof that d\bar{d} is a metric is trivial. Let Td,Td\Tau_d, \Tau_{\bar{d}} be the topologies generated by dd and d\bar{d} respectively. It is obvious that TdTd\Tau_{\bar{d}} \subseteq \Tau_d, so we prove that TdTd\Tau_d \subseteq \Tau_{\bar{d}}. Let BTdB \in \Tau_d. By definition of Td\Tau_d, for each xBx \in B, we can choose a basis ball about xx contained in BB; if its radius is 11 or greater, we can simply shrink it. So let BxB_x be a ball about xx such that its radius is less than 11 and xBxBx \in B_x \subseteq B. Since its radius is less than 11, the ball BxB_x is identical under dd and d\bar{d}, meaning it is a basic open set of Td\Tau_{\bar{d}}. Then B=xBBxB = \bigcup_{x \in B} B_x, a union of basic open sets of Td\Tau_{\bar{d}}, completing the proof.

[2.9.7]Example(Metrizability of Rn\bR^n)#

Given x=(x1,,xn)Rn\vb{x} = (x_1, \dots, x_n) \in \bR^n, we define x=x12++xn2\norm{x} = \sqrt{x_1^2 + \dots + x_n^2} and define the Euclidean metric

d(x,y)=xy,d(x, y) = \norm{x - y},

the standard notion of distance between two points in Rn\bR^n. We can also define the square metric by

ρ(x,y)=max{x1y1,,xnyn}.\rho(x, y) = \max\{|x_1 - y_1|, \dots, |x_n - y_n|\}.

These are intuitive generalizations from the standard metric on R\bR. Indeed, the Euclidean and sqaure metric collapse to the standard metric in R1\bR^1. Otherwise, consider basis elements for the Euclidean metric to be balls, whereas basis elements for the square metric are boxes.

[2.9.8]Theorem(Criterion for Finer Metric Topologies)#

Let XX be a set with two metrics d,dd, d', and let T,T\Tau, \Tau' be the topologies induced by these metrics respectively. Then TT\Tau \subseteq \Tau' if and only if, for each xXx \in X and any ε>0\epsilon > 0, there is some δ>0\delta > 0 such that Bd(x,δ)Bd(x,ε)B_{d'}(x, \delta) \subseteq B_d(x, \epsilon).

Proof.

()(\Longrightarrow): Suppose TT\Tau \subseteq \Tau'. Then, for any xXx \in X and ε>0\epsilon > 0, we have that Bd(x,ε)TB_d(x, \epsilon) \in \Tau. Since TT\Tau \subseteq \Tau', Bd(x,ε)TB_d(x, \epsilon) \in \Tau'. Thus, for xBd(x,ε)x \in B_d(x, \epsilon), by definition of the basis, there is some δ>0\delta > 0 such that xBd(x,δ)Bd(x,ε)x \in B_{d'}(x, \delta) \subseteq B_d(x, \epsilon).

()(\Longleftarrow): Let OTO \in \Tau—we seek to show OTO \in \Tau'. For each xOx \in O, note xBd(x,ε)Ox \in B_d(x, \epsilon) \subseteq O for some ε>0\epsilon > 0. By hypothesis, there is some δ>0\delta > 0 such that Bx=Bd(x,δ)B_x = B_{d'}(x, \delta) is such that xBxBd(x,ε)Ox \in B_x \subseteq B_d(x, \epsilon) \subseteq O. Then O=xOBxTO = \bigcup_{x \in O} B_x \in \Tau'.

[2.9.9]Theorem#

The topologies on Rn\bR^n induced by the Euclidean metric dd and the square metric ρ\rho are identical to the product topology on Rn\bR^n.

Proof.

We begin by showing the Euclidean and square metrics generate the same topologies on Rn\bR^n. Recalling that basis elements for the Euclidean metric (resp. square metric) topology take the form of balls (resp. congruent boxes), we seek to show that a box can be contained in a sphere and vice versa. For starters, fix the points x,yRnx, y \in \bR^n, and let y\vec{y} denote the vector whose tip is located at xx and tail is located at yy. The magnitude of y\vec{y}, representing the Euclidean distance d(x,y)d(x,y), is bounded below by its largest single coordinate projection ρ(x,y)\rho(x,y), meaning the box spanned by y\vec{y} easily fits within a sphere of radius d(x,y)d(x,y). Conversely, if we bound y\vec{y} inside an nn-dimensional cube centered at xx whose faces are at a distance of ρ(x,y)\rho(x,y), the Pythagorean theorem guarantees its magnitude cannot exceed the distance to the cube's furthest corner, yielding the upper bound d(x,y)nρ(x,y)d(x,y) \le \sqrt{n}\rho(x,y). The statement, which can also be proven with basic algebra, is that

ρ(x,y)d(x,y)nρ(x,y).\rho(x, y) \le d(x, y) \le \sqrt{n} \rho(x, y).

In any case, this implies Bd(x,ε)Bρ(x,ε)B_d(x, \epsilon) \subseteq B_\rho(x, \epsilon) for any xX,ε>0x \in X, \epsilon > 0, and same for Bρ(x,ε/n)Bd(x,ε)B_\rho(x, \epsilon/\sqrt{n}) \subseteq B_d(x, \epsilon). Thus the topologies are finer than eachother, making them equal.

It suffices to prove that the square metric generates the product topology. Let Tρ\Tau_\rho be the topology generated by the square metric, and let T×\Tau_\times be the product topology on Rn\bR^n. First, let OTρO \in \Tau_\rho. For each xOx \in O, there exists some ε>0\epsilon > 0 such that xBρ(x,ε)Ox \in B_\rho(x, \epsilon) \subseteq O. But now note there is some box centered about xx whose sidelengths are, at most, ε\epsilon—this is spanned by basis elements of the product topology, and so x(the box)Bρ(x,ε)x \in (\text{the box}) \subseteq B_\rho(x, \epsilon). Thus TρT×\Tau_\rho \subseteq \Tau_\times.

Now suppose OT×O \in \Tau_\times. For each xOx \in O, there is some B=(a1,b1)××(an,bn)B = (a_1, b_1) \times \cdots \times (a_n, b_n) centered about xx such that xBOx \in B \subseteq O. With ε=min{aibi:1in}\epsilon = \min\{|a_i - b_i|: 1 \le i \le n\}, we note xBρ(x,ε/2)Bx \in B_\rho(x, \epsilon/2) \subseteq B, completing the proof.

Now we seek to extend these metrices to an infinite product of R\bR. The natural generalizations on a set like Rω\bR^\omega are as follows:

d(x,y)=[i=1(xiyi)2]1/2ρ(x,y)=sup{xnyn}.\begin{align*} d(x, y) &= \left[\sum_{i = 1}^\infty (x_i - y_i)^2\right]^{1/2} \\ \rho(x, y) &= \sup\{|x_n - y_n|\}. \end{align*}

But note d(x,y)d(x, y) and ρ(x,y)\rho(x, y) may not be well-defined due to convergence and boundedness issues. It is, however, possible to generalize a metric on Rω\bR^\omega, and on RΛ\bR^\Lambda for some general indexing set Λ\Lambda. Recall the standard bounded metric d(x,y)=min{xy,1}\bar{d}(x, y) = \min\{|x - y|, 1\}—we may generalize it to RΛ\bR^\Lambda for some (xλ)λΛ,(yλ)λΛ(x_\lambda)_{\lambda \in \Lambda}, (y_\lambda)_{\lambda \in \Lambda} as such:

ρ(x,y)=supλΛ{d(xλ,yλ)}.\bar{\rho}(x, y) = \sup_{\lambda \in \Lambda} \{\bar{d}(x_\lambda, y_\lambda)\}.

We refer to this as the uniform metric on RΛ\bR^\Lambda, and it fittingly generates the uniform topology. This has implications for the idea of uniform convergence, which we will discuss soon.

[2.9.10]Theorem#

For some indexing set Λ\Lambda, the uniform topology on RΛ\bR^\Lambda is finer than the product topology and coarser than the box topology. That is, TproductTuniformTbox\Tau_{\text{product}} \subseteq \Tau_{\text{uniform}} \subseteq \Tau_{\text{box}}.

Proof.

Let x=(xλ)λΛRΛ\vb{x} = (x_\lambda)_{\lambda \in \Lambda} \in \bR^\Lambda. Let U=λΛUλU = \prod_{\lambda \in \Lambda} U_\lambda be an element of the product topology's basis about x\vb{x}, where λ1,,λn\lambda_1, \dots, \lambda_n are the indices for which UλRU_\lambda \ne \bR.

Let zUz \in U. We seek to show there is some ε>0\epsilon > 0 such that zBρ(x,ε)Uz \in B_{\bar{\rho}}(x, \epsilon) \subseteq U. For each λi\lambda_i, choose εi>0\epsilon_i > 0 such that Bd(x,εi)UλiB_{\bar{d}}(x, \epsilon_i) \subseteq U_{\lambda_i}. Then let ε=min{ε1,,εn}\epsilon = \min\{\epsilon_1, \dots, \epsilon_n\}.

On the other hand, let xBρ(x,ε)x \in B_{\bar{\rho}}(x, \epsilon) for some ε>0\epsilon > 0. For each λΛ\lambda \in \Lambda, let Xλ=(xλε/2,xλ+ε/2)X_\lambda = (x_\lambda - \epsilon/2, x_\lambda + \epsilon / 2), then note xλΛXλBρ(x,ε)x \in \prod_{\lambda \in \Lambda} X_\lambda \subseteq B_{\bar{\rho}}(x, \epsilon).

[2.9.11]Theorem(Continuity For Functions Between Metric Spaces)#

Let f:XYf: X \to Y be a map between two metric spaces (X,dX)(X, d_X) and (Y,dY)(Y, d_Y). Then ff is continuous if and only if, for any xXx \in X and ε>0\epsilon > 0, there is some δ>0\delta > 0 such that

dX(x,a)<δ    dY(f(x),f(a))<ε.d_X(x, a) < \delta \implies d_Y(f(x), f(a)) < \epsilon.
Proof.

()(\Longrightarrow): Suppose ff is continuous. Fix xXx \in X and ε>0\epsilon > 0, and let O=BdY(f(x),ε)O = B_{d_Y}(f(x), \epsilon). Since OO is open, it follows that f1(O)f^{-1}(O) is open. Since f1(O)f^{-1}(O) is the union of basic, open sets in XX, there is some δ>0\delta > 0 such that BdX(x,δ)f1(O)B_{d_X}(x, \delta) \subseteq f^{-1}(O). Then, for any aBdX(x,δ)a \in B_{d_X}(x, \delta), it follows that f(a)Of(a) \in O.

()(\Longleftarrow): Suppose that, for any xXx \in X and ε>0\epsilon > 0, there is some δ>0\delta > 0 such that

dX(x,a)<δ    dY(f(x),f(a))<ε.d_X(x, a) < \delta \implies d_Y(f(x), f(a)) < \epsilon.

Let OO be open in YY—we show f1(O)f^{-1}(O) is open in XX. Let xf1(O)x \in f^{-1}(O). Let ε>0\epsilon > 0 be such that BdY(f(x),ε)OB_{d_Y}(f(x), \epsilon) \subseteq O. By hypothesis, there is some δ>0\delta > 0 such that Bx=BdX(x,δ)B_x = B_{d_X}(x, \delta), where Bxf1(O)B_x \subseteq f^{-1}(O). Then f1(O)=xf1(O)Bxf^{-1}(O) = \bigcup_{x \in f^{-1}(O)} B_x, which is open.

[2.9.12]Theorem(Sequence Lemma)#

Let XX be a topological space, and let AXA \subseteq X. If there is a sequence (xn)A(x_n) \subseteq A such that xnxx_n \to x, then xAx \in \bar{A}. Conversely, if XX is metrizable and xAx \in \bar{A}, there is some sequence of points (xn)A(x_n) \subseteq A such that xnxx_n \to x.

Proof.

()(\Longrightarrow): Suppose (xn)A(x_n) \subseteq A is such that xnxx_n \to x. Then, for any open neighborhood OO of xx, there is some NZ+N \in \bZ_+ such that xnOx_n \in O for every nNn \ge N. Thus OAO \cap A \ne \emptyset and so xAx \in \bar{A}.

()(\Longleftarrow): Suppose XX has some metric dd. Fix xAx \in \bar{A}, and fix some arbitrary open neighborhood OO of xx. By definition of the closure, OAO \cap A \ne \emptyset. Since OO is open in a metric space, there is some ε>0\epsilon > 0 such that B(x,ε)OB(x, \epsilon) \subseteq O and B(x,ε)AB(x, \epsilon) \cap A \ne \emptyset. Then there is some NZ+N \in \bZ_+ such that 1/n<ε1/n < \epsilon for every nNn \ge N. Let xn=ax_n = a for some aAa \in A and all n<Nn < N, and otherwise let xnx_n be some arbitrary element of B(x,1/n)AB(x, 1/n) \cap A, which is guaranteed to exist. Then (xn)A(x_n) \subseteq A and xnxx_n \to x.

[2.9.13]Theorem(Characterization of Continuity)#

Let f:XYf: X \to Y. If ff is continuous, then for every xnxx_n \to x in XX, it follows that f(xn)f(x)f(x_n) \to f(x). Conversely, if XX is metrizable, we have that if every xnxx_n \to x in XX is such that f(xn)f(x)f(x_n) \to f(x), then ff is continuous.

Proof.

()(\Longrightarrow): Suppose ff is continuous. Let (xn)X(x_n) \subseteq X be a sequence such that xnxx_n \to x. Let OO be an open neighborhood of f(x)f(x). Then note f1(O)f^{-1}(O) is open by ff's continuity, and xf1(O)x \in f^{-1}(O). Thus there is some NZ+N \in \bZ_+ such that xnf1(O)x_n \in f^{-1}(O) for every nNn \ge N. Thus f(xn)Of(x_n) \in O for every nNn \ge N, meaning f(xn)f(x)f(x_n) \to f(x).

()(\Longleftarrow): Suppose XX has some metric dd. Suppose that, for every (xn)X(x_n) \subseteq X such that xnxx_n \to x, it follows that f(xn)f(x)f(x_n) \to f(x). Let AXA \subseteq X—we will show ff is continuous by proving f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)}. For starters, suppose xAx \in \bar{A}. Since XX is metrizable, AA inherits a metric subspace topology, and by the sequence lemma there is some (xn)A(x_n) \subseteq A such that xnxx_n \to x. By hypothesis, we have f(xn)f(x)f(x_n) \to f(x), meaning f(x)f(A)f(x) \in \bar{f(A)}. Thus f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)}, completing the proof.

[2.9.14]Definition(Uniform Convergence)#

Let fn:XYf_n: X \to Y be a sequence of functions that map the set XX into the metric space YY. We say (fn)f(f_n) \to f converges uniformly if, for any ε>0\epsilon > 0, there is some NZ+N \in \bZ_+ such that

d(fn(x),f(x))<εd(f_n(x), f(x)) < \epsilon

for every nNn \ge N and every xXx \in X.

This mode of convergence is subtly distinct from traditional, pointwise convergence. Pointwise convergence only mandates that (fn(x))f(x)(f_n(x)) \to f(x) for every xXx \in X for large enough nn, but this choice of “large enough” nn can vary based on choice of xx. If our choice of large enough nn cannot be made independent from our choice of xx, then the convergence is not uniform. Pointwise convergence is quite weak. We will soon see that if (fn)f(f_n) \to f with each fnf_n continuous, ff is not necessarily continuous unless we impose extra hypotheses, which is where the uniformity of the convergence comes in.

[2.9.15]Theorem(Uniform Limit Theorem)#

Suppose fn:XYf_n: X \to Y is a sequence of continuous functions that map the set XX into the metric space YY. If (fn)f(f_n) \to f is uniform, then ff is continuous.

Proof.

Let xXx \in X and ε>0\epsilon > 0. We need to find δ>0\delta > 0 such that

d(x,y)<δ    d(f(x),f(y))<ε.d(x, y) < \delta \implies d(f(x), f(y)) < \epsilon.

Since fnff_n \to f is uniform, there is some NZ+N \in \bZ_+ such that d(f(x),fN(x))<ε/3d(f(x), f_N(x)) < \epsilon/3 for every xXx \in X. Then there is some δ>0\delta > 0 such that

d(x,y)<δ    d(fN(x),fN(y))<ε/3,d(x, y) < \delta \implies d(f_N(x), f_N(y)) < \epsilon/3,

by continuity of each fnf_n. Then, if d(x,y)<δd(x, y) < \delta, we have that

d(f(x),f(y))d(f(x),fN(x))+d(fN(x),fN(y))+d(fN(y),f(y))=ε/3+ε/3+ε/3=ε,\begin{align*} d(f(x), f(y)) &\le d(f(x), f_N(x)) + d(f_N(x), f_N(y)) + d(f_N(y), f(y)) \\ &= \epsilon/3 + \epsilon/3 + \epsilon/3 = \epsilon, \end{align*}

completing the proof.

2.9.1Exercises#

[2.9.16]Problem#

Let XX be a set, and let fn:XRf_n: X \to \bR be a sequence of functions. Let ρ\bar{\rho} be the uniform metric on the space RX\bR^X, the set of all functions from XX to R\bR. Show that fnff_n \to f uniformly if and only if fnff_n \to f as elements of the metric space (RX,ρ)(\bR^X, \bar{\rho}).

Solution.

()(\Longrightarrow): Suppose fnff_n \to f uniformly. To show fnff_n \to f in (RX,ρ)(\bR^X, \bar{\rho}), we choose some arbitrary open neighborhood OO of ff and show there is some NZ+N \in \bZ_+ such that fnOf_n \in O for every nNn \ge N. Note there is some ε>0\epsilon > 0 such that fB(f,ε)Of \in B(f, \epsilon) \subseteq O. By fnff_n \to f being uniform, there is some N1Z+N_1 \in \bZ_+ such that fn(x)f(x)<1|f_n(x) - f(x)| < 1 for every nN1n \ge N_1. Then

ρ(fn,f)=supxX{d(fn(x),f(x))}=supxX{fn(x)f(x)},\bar{\rho}(f_n, f) = \sup_{x \in X}\{ \bar{d}(f_n(x), f(x)) \} = \sup_{x \in X}\{|f_n(x) - f(x)|\},

with the second equality coming from the aforementioned fact. Again, by uniformity of fnff_n \to f, there is some N>N1Z+N > N_1 \in \bZ_+ such that ρ(fn,f)ε/2\bar{\rho}(f_n, f) \le \epsilon/2 for every nNn \ge N. Thus fnB(f,ε)Of_n \in B(f, \epsilon) \subseteq O for every nNn \ge N, meaning fnff_n \to f as elements of RX\bR^X as desired.

()(\Longleftarrow): Suppose fnff_n \to f as elements of RX\bR^X. Fix ε>0\epsilon > 0. We seek to show there is some NZ+N \in \bZ_+ such that

d(fn(x),f(x))<εd(f_n(x), f(x)) < \epsilon

for every xXx \in X and nNn \ge N. Let ε=min{ε/2,0.5}\epsilon' = \min\{\epsilon/2, 0.5\}. Then let O=B(f,ε)O = B(f, \epsilon') be an open set in RX\bR^X. There is some NZ+N \in \bZ_+ such that fnOf_n \in O for each nNn \ge N by hypothesis. For any nNn \ge N, note that ρ(fn,f)<ε<1\bar{\rho}(f_n, f) < \epsilon' < 1. Thus d(fn(x),f(x))<ε<1\bar{d}(f_n(x), f(x)) < \epsilon' < 1 for every xXx \in X, and so d(fn(x),f(x))=d(fn(x),f(x))<ε<ε\bar{d}(f_n(x), f(x)) = d(f_n(x), f(x)) < \epsilon' < \epsilon for every xXx \in X and nNn \ge N, meaning (fn)f(f_n) \to f uniformly.