第 13 章

度量空间:哪些结论能搬离实数轴

把收敛、柯西性与有界性从实数搬到任意距离空间,证明收敛蕴含柯西、柯西蕴含相对有界,并用球的定义引出开集、闭集以及并、交、补的运算法则。

Metric Spaces: What Survives Away from the Real Line

Transporting convergence, the Cauchy property and boundedness from the reals to arbitrary distance spaces; proving convergent implies Cauchy and Cauchy implies relatively bounded; then using balls to introduce open sets, closed sets and the algebra of unions, intersections and complements.

首发于 2025.09.02中 / EN
系统课程real-analysismetric-spacesconvergenceopen-sets
语言
字号
目录
篇内目录

问题:哪些东西能搬走

前半学期一直在 R\mathbb R 上工作:R\mathbb R 是有序域,可以比较大小、可以相加相乘、可以求和。这一讲要问:如果把 R\mathbb R 换成一个只有「距离」的集合,哪些结论还能原样成立?

答案是分层的:

  • 能搬走:数列、收敛、子列、柯西列、有界。
  • 搬不走:序关系(一般度量空间没有大小)、域运算(不能相加相乘),因此级数也没有意义。

这个分界很重要。它说明「收敛」这类概念的本质不是算术,而是「距离可以任意小」。抓住这一点,就能把大量证明原封不动地移植过去。

时间轴

时间内容
0:00回顾:R\mathbb R 是有序域;哪些概念可以推广
2:02度量空间的定义:三条公理
4:34例子:R\mathbb R、Rn\mathbb R^n、盒距离、连续函数空间的上确界距离
11:54度量空间中的数列、子列、收敛、柯西列
17:27定理:收敛列必为柯西列(证明)
20:41柯西收敛定理只在 R\mathbb R 成立;反例
23:45柯西完备的定义
24:59度量球;管状邻域
29:52有界子集
32:53引理:柯西列有界(证明)
45:52Bolzano–Weierstrass 在一般度量空间失效
48:15开集的定义与球的证明
1:03:50闭集的定义
1:04:46集合运算与 De Morgan 律
1:18:46开集的任意并、有限交

度量空间的定义

一个度量空间是二元组 (X,d)(X,d):XX 是集合,d:X×X→Rd:X\times X\to\mathbb R 是距离函数,满足三条公理。

  1. 正定:d(x,y)≥0d(x,y)\ge0,且 d(x,y)=0d(x,y)=0 当且仅当 x=yx=y。
  2. 对称:d(x,y)=d(y,x)d(x,y)=d(y,x)。
  3. 三角不等式:d(x,z)≤d(x,y)+d(y,z)d(x,z)\le d(x,y)+d(y,z)。

前两条几乎是记账;第三条才是真正干活的那条。课程反复强调:在一般度量空间里,几乎所有非平凡的证明都只用三角不等式。所以要养成习惯——看到要证的不等式,先想「能不能用三角不等式插一个中间点」。

四个例子

实数轴

X=RX=\mathbb R,d(x,y)=∣x−y∣d(x,y)=|x-y|。三条公理都直接验证;三角不等式就是熟悉的 ∣x−z∣≤∣x−y∣+∣y−z∣|x-z|\le|x-y|+|y-z|。

欧氏空间

X=RnX=\mathbb R^n,x=(x1,…,xn)x=(x_1,\dots,x_n),y=(y1,…,yn)y=(y_1,\dots,y_n),

d(x,y)=(x1−y1)2+⋯+(xn−yn)2.d(x,y)=\sqrt{(x_1-y_1)^2+\cdots+(x_n-y_n)^2}.

n=1n=1 时退化为 ∣x−y∣|x-y|。三角不等式就是勾股定理的向量版本(柯西–施瓦茨不等式的推论)。

盒距离(出租车距离)

同一集合 Rn\mathbb R^n,改用

d(x,y)=∣x1−y1∣+⋯+∣xn−yn∣.d(x,y)=|x_1-y_1|+\cdots+|x_n-y_n|.

正定与对称显然;三角不等式逐坐标使用实数轴上的版本再相加即可。这个例子说明:同一个集合可以配不同的距离,得到不同的度量空间。

连续函数空间

X=C[a,b]X=C[a,b](闭区间上的连续函数),

d(f,g)=max⁡x∈[a,b]∣f(x)−g(x)∣.d(f,g)=\max_{x\in[a,b]}|f(x)-g(x)|.

这个最大值确实取得到:∣f−g∣|f-g| 连续,闭区间上由最值定理取得最大值。三条公理都容易验证。这个例子在期中出现过,后面证明紧性反例时还会用到。

附带一提:管状邻域

球的概念还可以推广到「到一个集合的距离」:给定子集 AA,定义

{y:∃x∈A, d(y,x)<r}.\{y : \exists x\in A,\ d(y,x)<r\}.

当 AA 是一条曲线时,这像是给曲线套了一根半径 rr 的管子,所以叫管状邻域。AA 是单点时它就是普通的球。这个概念在后续讨论开集时会出现。

数列、子列、收敛、柯西

定义

度量空间 (X,d)(X,d) 中的数列是映射 f:N→Xf:\mathbb N\to X,记 xn=f(n)x_n=f(n)。

子列是复合 f∘gf\circ g,其中 g:N→Ng:\mathbb N\to\mathbb N 严格递增。严格递增保证「顺序不变、可以跳过、不能重复取」。

收敛:xn→xx_n\to x 指

∀ε>0 ∃N 使得 n≥N⇒d(xn,x)<ε.\forall\varepsilon>0\ \exists N\ \text{使得}\ n\ge N\Rightarrow d(x_n,x)<\varepsilon .

柯西列:

∀ε>0 ∃N 使得 m,n≥N⇒d(xm,xn)<ε.\forall\varepsilon>0\ \exists N\ \text{使得}\ m,n\ge N\Rightarrow d(x_m,x_n)<\varepsilon .

两个定义与 R\mathbb R 上的写法逐字相同,只是把 ∣xn−x∣|x_n-x| 换成 d(xn,x)d(x_n,x)。

定理:收敛 ⟹ 柯西

定理。 度量空间中任何收敛列都是柯西列。

证明。 设 xn→xx_n\to x。给定 ε>0\varepsilon>0,存在 NN 使 n≥Nn\ge N 时

d(xn,x)<ε2.d(x_n,x)<\frac{\varepsilon}{2}.

若 m,n≥Nm,n\ge N,以 xx 为中间点用三角不等式:

d(xm,xn)≤d(xm,x)+d(x,xn)<ε2+ε2=ε.d(x_m,x_n)\le d(x_m,x)+d(x,x_n)<\frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon .

所以 (xn)(x_n) 是柯西列。□\square

这个证明只有一行三角不等式,但它体现了本讲的核心技术:要估计两点之间的距离,就插入一个已知很近的第三点。

反向不成立:空间可能「缺了点」

在 R\mathbb R 中柯西列必收敛(柯西收敛定理),但这依赖完备性。换一个空间就失效。

反例。 取 X=(0,1]X=(0,1],距离为 ∣x−y∣|x-y|,数列 xn=1/nx_n=1/n。

  • 它是柯西列:给定 ε>0\varepsilon>0,取 N>1/εN>1/\varepsilon,则 m,n≥Nm,n\ge N 时
∣1m−1n∣<1N<ε.\left|\frac1m-\frac1n\right|<\frac1N<\varepsilon .
  • 它在 XX 中不收敛:唯一可能的极限是 00,而 0∉X0\notin X。

所以「柯西」只保证尾部挤在一起,不保证那个聚点属于空间。

定义。 若度量空间中每个柯西列都收敛,称该空间柯西完备。

R\mathbb R 完备;(0,1](0,1] 不完备。课程的后续内容大多在完备空间或紧空间上做,正是为了避免这类「差一点」的情况。

球与有界

度量球

以 xx 为心、r>0r>0 为半径的开球是

Br(x)={y∈X:d(x,y)<r}.B_r(x)=\{y\in X : d(x,y)<r\}.

若把严格小于改成小于等于,得到闭球 Br(x)‾\overline{B_r(x)}。这两个符号后面会反复出现,区别只在端点是否包含。

在 R2\mathbb R^2 配欧氏距离时,球就是通常的圆盘;配盒距离时,球是菱形(旋转过的正方形)。同一个「球」,形状由距离决定。

有界子集

A⊆XA\subseteq X 有界,指存在 x∈Xx\in X 与 D>0D>0,使 A⊆BD(x)A\subseteq B_D(x)。

几个容易忽略的点:

  • 空集有界(它包含于任何集合)。
  • 整个空间也可能有界。例如 X=(0,1]X=(0,1] 配通常距离,取心 1/21/2、半径 11 就把整个空间装下了。
  • 有界不是「元素之间距离有限」这种模糊说法,必须写出存在某个球把它装进去。

引理:柯西列有界

引理。 度量空间中任何柯西列都有界。

证明。 取 ε=1\varepsilon=1,存在 NN 使 m,n≥Nm,n\ge N 时 d(xm,xn)<1d(x_m,x_n)<1。特别地,对一切 n≥Nn\ge N,

d(xn,xN)<1.d(x_n,x_N)<1 .

把前面有限项也控制住,令

r=1+max⁡1≤i≤N−1d(xN,xi)r=1+\max_{1\le i\le N-1}d(x_N,x_i)

(若 N=1N=1,约定最大值为 00,取 r=1r=1)。则

  • n≥Nn\ge N 时,d(xN,xn)<1<rd(x_N,x_n)<1<r;
  • n<Nn<N 时,d(xN,xn)≤max⁡≤r−1<rd(x_N,x_n)\le\max\le r-1<r。

所以所有 xnx_n 都落在 Br(xN)B_r(x_N) 中,数列有界。□\square

多加的那个 11 是为了让不等式严格成立;实际上取非严格版本也不影响结论。

结合前面的定理:收敛 ⟹ 柯西 ⟹ 有界。两条箭头都不能反向。

Bolzano–Weierstrass 失效

在 R\mathbb R 中,有界数列必有收敛子列。在一般度量空间中这不成立。

反例还是 X=(0,1]X=(0,1] 与 xn=1/nx_n=1/n:它有界、是柯西列,但在 XX 中没有收敛子列(任何子列都只能趋向 0∉X0\notin X)。

课程指出:BW 定理在紧度量空间中会恢复。这正是接下来引入紧性的动机。

开集与闭集

开集

O⊆XO\subseteq X 是开集,指

∀x∈O ∃r>0 使得 Br(x)⊆O.\forall x\in O\ \exists r>0\ \text{使得}\ B_r(x)\subseteq O .

直观上,开集里的每个点都还能「往四周走一点」而不出界。边界上的点做不到这一点,所以开集不含边界。

两个平凡的开集:∅\varnothing 与 XX。空集没有元素要检查,条件空洞成立;XX 中每个点的球都在 XX 内。

一个必须注意的相对性:取 X=(0,1]X=(0,1],则 XX 作为自身的子集是开集,尽管它作为 R\mathbb R 的子集不是开集。讨论开闭之前,先确认「相对于哪个空间」。

引理:开球是开集

引理。 对任意 x∈Xx\in X、r>0r>0,Br(x)B_r(x) 是开集。

证明。 取 y∈Br(x)y\in B_r(x),即 d(x,y)<rd(x,y)<r。令

s=r−d(x,y)>0.s=r-d(x,y)>0 .

对任意 z∈Bs(y)z\in B_s(y),三角不等式给出

d(x,z)≤d(x,y)+d(y,z)<d(x,y)+s=r.d(x,z)\le d(x,y)+d(y,z)<d(x,y)+s=r .

所以 z∈Br(x)z\in B_r(x),即 Bs(y)⊆Br(x)B_s(y)\subseteq B_r(x)。由于 yy 任意,Br(x)B_r(x) 是开集。□\square

几何图像:yy 到边界的剩余距离是 r−d(x,y)r-d(x,y),以它为半径的小球一定还在大球内部。严格不等式保证 s>0s>0。

闭集

C⊆XC\subseteq X 是闭集,指其余集

X∖C={x∈X:x∉C}X\setminus C=\{x\in X : x\notin C\}

是开集。

由定义立刻得到:∅\varnothing 与 XX 既开又闭(它们互为余集,而两者都开)。这不是矛盾,「开」与「闭」不是互斥的形容词。

一个稍后才会正式证明的事实:闭球 {y:d(x,y)≤r}\{y : d(x,y)\le r\} 是闭集。直观上它的余集 {y:d(x,y)>r}\{y:d(x,y)>r\} 是开的——离边界还有正距离,可以再往外走一点。

集合运算与 De Morgan 律

设 A,B⊆XA,B\subseteq X:

  • 并:A∪B={x:x∈A 或 x∈B}A\cup B=\{x : x\in A\ \text{或}\ x\in B\}。
  • 交:A∩B={x:x∈A 且 x∈B}A\cap B=\{x : x\in A\ \text{且}\ x\in B\}。
  • 补:X∖A={x:x∉A}X\setminus A=\{x : x\notin A\}。

对一族子集 {Uα}\{U_\alpha\}:

⋃αUα={x:∃α, x∈Uα},⋂αUα={x:∀α, x∈Uα}.\bigcup_\alpha U_\alpha=\{x : \exists\alpha,\ x\in U_\alpha\}, \qquad \bigcap_\alpha U_\alpha=\{x : \forall\alpha,\ x\in U_\alpha\}.

De Morgan 律:

(⋃αUα)c=⋂αUαc,(⋂αUα)c=⋃αUαc.\left(\bigcup_\alpha U_\alpha\right)^c=\bigcap_\alpha U_\alpha^c, \qquad \left(\bigcap_\alpha U_\alpha\right)^c=\bigcup_\alpha U_\alpha^c .

课程的建议是:不要背,每次现推。证明两个集合相等,标准做法是「互相包含」:先证左边 ⊆\subseteq 右边,再证右边 ⊆\subseteq 左边。推导 De Morgan 律时,只需把「不属于并」翻译成「对所有 α\alpha 都不属于」,再翻译成「属于每个补集」。

记错 De Morgan 律的代价很大:它正是开集与闭集对偶性质的来源。

开集的并、交

任意并仍开

命题。 若 {Oα}\{O_\alpha\} 是一族开集,则 ⋃αOα\bigcup_\alpha O_\alpha 是开集。

证明。 取 x∈⋃αOαx\in\bigcup_\alpha O_\alpha。由并的定义,存在 α0\alpha_0 使 x∈Oα0x\in O_{\alpha_0}。因为 Oα0O_{\alpha_0} 开,存在 r>0r>0 使 Br(x)⊆Oα0B_r(x)\subseteq O_{\alpha_0}。于是

Br(x)⊆Oα0⊆⋃αOα.B_r(x)\subseteq O_{\alpha_0}\subseteq\bigcup_\alpha O_\alpha .

所以并集是开集。□\square

注意这里没有对指标集的基数作任何限制:任意多个开集并起来仍开。

有限交仍开

命题。 若 O1,…,OnO_1,\dots,O_n 是有限多个开集,则 ⋂i=1nOi\bigcap_{i=1}^{n}O_i 是开集。

证明。 取 x∈⋂iOix\in\bigcap_i O_i。对每个 ii,由 OiO_i 开,存在 ri>0r_i>0 使 Bri(x)⊆OiB_{r_i}(x)\subseteq O_i。令

r=min⁡{r1,…,rn}>0.r=\min\{r_1,\dots,r_n\}>0 .

有限个正数的最小值仍为正,这是关键。于是对每个 ii,

Br(x)⊆Bri(x)⊆Oi,B_r(x)\subseteq B_{r_i}(x)\subseteq O_i,

所以 Br(x)⊆⋂iOiB_r(x)\subseteq\bigcap_i O_i,交集是开集。□\square

无限交会失效

反例。 在 R\mathbb R 中取

On=(−1n,1n),n∈N.O_n=\left(-\frac1n,\frac1n\right),\qquad n\in\mathbb N .

每个 OnO_n 都是开集。但

⋂n=1∞On={0},\bigcap_{n=1}^{\infty}O_n=\{0\},

单点集不是开集(任何以 00 为心的球都含有非零点)。

失败的原因很具体:rn=1/nr_n=1/n 的下确界是 00,取不到正的最小值。「有限个正数的最小值」这一句在无限情形下没有对应物。

这与并的情形形成对照:并可以任意,交只能有限。下一讲证明闭集时,会出现完全相反的对偶结论。

本节结论

  • 度量空间 = 集合 + 满足正定、对称、三角不等式的距离;一般空间没有序、没有运算,级数无意义。
  • 收敛、子列、柯西、有界都能从 R\mathbb R 搬到度量空间,证明几乎只用三角不等式。
  • 收敛 ⟹ 柯西 ⟹ 有界;反方向都需要额外条件(完备、紧)。
  • 柯西列不收敛的本质是空间缺了聚点;(0,1](0,1] 与 xn=1/nx_n=1/n 是标准反例。
  • 开球是开集;开集的任意并是开集,有限交是开集,无限交不一定。
  • 闭集定义为余集开;开与闭不是互斥关系。
  • De Morgan 律把并与交互相转换,是开集与闭集对偶性的技术来源。

理解检验

1. 为什么在一般度量空间里「级数」没有意义,而「数列收敛」有?

参考答案:收敛只需要比较两点之间的距离 d(xn,x)d(x_n,x),只要有距离函数就能写。级数需要把无穷多项加起来,也就是需要加法与数乘这样的代数运算,而一般度量空间只配备了距离,没有加法。R\mathbb R 同时是有序域和度量空间,所以两件事都能做;一旦只保留距离,求和就失去定义。

2. 证明:收敛列必为柯西列。(要求写出 ε/2\varepsilon/2 的取法)

参考答案:设 xn→xx_n\to x,给定 ε>0\varepsilon>0,取 NN 使 n≥Nn\ge N 时 d(xn,x)<ε/2d(x_n,x)<\varepsilon/2。若 m,n≥Nm,n\ge N,则

d(xm,xn)≤d(xm,x)+d(x,xn)<ε2+ε2=ε.d(x_m,x_n)\le d(x_m,x)+d(x,x_n)<\frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon .

这里用了对称性把 d(xm,x)d(x_m,x) 与 d(x,xn)d(x,x_n) 都换到已知的估计上。

3. 在 X=(0,1]X=(0,1] 中,xn=1/nx_n=1/n 是柯西列但不收敛。它有没有收敛子列?说明理由。

参考答案:没有。若某个子列 xnk→L∈(0,1]x_{n_k}\to L\in(0,1],则 L>0L>0;但 xnk→0x_{n_k}\to0 在 R\mathbb R 中成立,而极限唯一,矛盾。更直接地,任何子列与 00 的距离趋于 00,而它与任何 L>0L>0 的距离最终至少是 L/2L/2,不可能收敛到 LL。这个例子同时说明 BW 定理在一般度量空间失效。

4. 证明:开球是开集。为什么必须取 s=r−d(x,y)s=r-d(x,y) 而不是 rr?

参考答案:见正文证明。取 s=r−d(x,y)s=r-d(x,y) 的理由是:yy 到大球边界的「剩余距离」恰好是这个数,以它为半径的小球才能整个留在内部。若取 s=rs=r,小球就会伸出边界。证明的关键不等式是 d(x,z)≤d(x,y)+d(y,z)<d(x,y)+s=rd(x,z)\le d(x,y)+d(y,z)<d(x,y)+s=r,其中第二个严格不等号来自 z∈Bs(y)z\in B_s(y)。

5. 举出一族开集,其交集不是开集,并解释为什么「最小值」论证失效。

参考答案:取 On=(−1/n,1/n)O_n=(-1/n,1/n),每个都开,交集是 {0}\{0\},不是开集。证明有限交时用的 r=min⁡{r1,…,rn}>0r=\min\{r_1,\dots,r_n\}>0 依赖「有限个正数有正的最小值」。对无限族,对应的量是 inf⁡nrn\inf_n r_n,它可能是 00,此时无法给出统一的 r>0r>0。这里 inf⁡1/n=0\inf 1/n=0,所以论证断裂。

6. 用 De Morgan 律说明:如果所有 OαO_\alpha 都是开集,那么 ⋃αOα\bigcup_\alpha O_\alpha 是开集这一结论,等价于「任意多个闭集的交集是闭集」。

参考答案:令 Cα=X∖OαC_\alpha=X\setminus O_\alpha 为闭集。由 De Morgan 律,

X∖⋃αOα=⋂αCα.X\setminus\bigcup_\alpha O_\alpha=\bigcap_\alpha C_\alpha .

若 ⋃αOα\bigcup_\alpha O_\alpha 开,则它的余集闭,即 ⋂αCα\bigcap_\alpha C_\alpha 闭。反之若任意多个闭集的交是闭集,则上式的余集开,即并集开。所以两条命题互为对偶,证明一条就自动得到另一条。

7. 空集为什么是开集?为什么它也是有界的?

参考答案:空集是开集是「对每个 x∈∅x\in\varnothing 存在 r>0r>0……」的全称命题,由于没有元素需要验证,条件空洞成立。有界的定义是「存在 xx 与 DD 使 A⊆BD(x)A\subseteq B_D(x)」,而 ∅⊆BD(x)\varnothing\subseteq B_D(x) 对任何球都成立,所以空集有界。这两处都体现空集在逻辑上的特殊性:全称命题为真,存在命题则不会空集自动成立。

与前后课的关系

上一讲在 R\mathbb R 上把所有收敛工具备齐;这一讲把它们搬到度量空间,并引入开集。下一讲继续走这条线:用开集定义闭集,证明「闭集 ⟺ 收敛列极限封闭」这个等价刻画,然后定义覆盖与紧性,并证明紧集必有界且闭。这一讲末尾关于「开集任意并、有限交」的结论,在下一讲会以对偶形式原样出现。

The question: what can be carried over

The first half of the semester worked on R\mathbb R: an ordered field, where we can compare sizes, add and multiply, and sum series. This lecture asks: if R\mathbb R is replaced by a set that carries only a notion of distance, which conclusions survive unchanged?

The answer comes in layers:

  • Survives: sequences, convergence, subsequences, Cauchy sequences, boundedness.
  • Does not survive: order (a general metric space has no size comparison), field operations (no addition or multiplication), and therefore series make no sense.

The boundary matters. It shows that the essence of convergence is not arithmetic but "distance can be made arbitrarily small". Grasp that and most proofs transfer verbatim.

Timeline

TimeTopic
0:00Recap: R\mathbb R is an ordered field; which notions generalise
2:02Definition of a metric space: three axioms
4:34Examples: R\mathbb R, Rn\mathbb R^n, the box metric, the sup metric on continuous functions
11:54Sequences, subsequences, convergence, Cauchy sequences in a metric space
17:27Theorem: convergent implies Cauchy (with proof)
20:41The Cauchy convergence theorem holds only in R\mathbb R; counterexample
23:45Cauchy completeness
24:59Metric balls; tubular neighbourhoods
29:52Bounded subsets
32:53Lemma: Cauchy sequences are bounded (with proof)
45:52Bolzano–Weierstrass fails in a general metric space
48:15Open sets and the proof that balls are open
1:03:50Closed sets
1:04:46Set operations and De Morgan's laws
1:18:46Arbitrary unions and finite intersections of open sets

Definition of a metric space

A metric space is a pair (X,d)(X,d): a set XX and a distance function d:X×X→Rd:X\times X\to\mathbb R satisfying three axioms.

  1. Positive definite: d(x,y)≥0d(x,y)\ge0, and d(x,y)=0d(x,y)=0 if and only if x=yx=y.
  2. Symmetric: d(x,y)=d(y,x)d(x,y)=d(y,x).
  3. Triangle inequality: d(x,z)≤d(x,y)+d(y,z)d(x,z)\le d(x,y)+d(y,z).

The first two are bookkeeping; the third does the work. The course keeps stressing that almost every nontrivial proof in a general metric space uses only the triangle inequality. So build the reflex: when asked to prove an inequality, ask whether inserting an intermediate point via the triangle inequality helps.

Four examples

The real line

X=RX=\mathbb R, d(x,y)=∣x−y∣d(x,y)=|x-y|. The axioms are immediate; the triangle inequality is the familiar ∣x−z∣≤∣x−y∣+∣y−z∣|x-z|\le|x-y|+|y-z|.

Euclidean space

X=RnX=\mathbb R^n, x=(x1,…,xn)x=(x_1,\dots,x_n), y=(y1,…,yn)y=(y_1,\dots,y_n),

d(x,y)=(x1−y1)2+⋯+(xn−yn)2.d(x,y)=\sqrt{(x_1-y_1)^2+\cdots+(x_n-y_n)^2}.

For n=1n=1 this reduces to ∣x−y∣|x-y|. The triangle inequality is the vector form of Pythagoras' argument (a consequence of Cauchy–Schwarz).

The box (taxicab) metric

The same set Rn\mathbb R^n with

d(x,y)=∣x1−y1∣+⋯+∣xn−yn∣.d(x,y)=|x_1-y_1|+\cdots+|x_n-y_n|.

Positive definiteness and symmetry are clear; the triangle inequality follows coordinate by coordinate from the real-line version, then summed. The example shows that one set can carry different distances and hence different metric spaces.

Continuous function spaces

X=C[a,b]X=C[a,b] (continuous functions on a closed interval),

d(f,g)=max⁡x∈[a,b]∣f(x)−g(x)∣.d(f,g)=\max_{x\in[a,b]}|f(x)-g(x)|.

The maximum is attained: ∣f−g∣|f-g| is continuous, so the extreme value theorem supplies it. The axioms are routine. This example appeared on the midterm and will reappear in the compactness counterexample.

Aside: tubular neighbourhoods

The idea of a ball extends to "distance to a set": for a subset AA,

{y:∃x∈A, d(y,x)<r}.\{y : \exists x\in A,\ d(y,x)<r\}.

When AA is a curve this is a tube of radius rr around it, hence the name tubular neighbourhood. When AA is a single point it is an ordinary ball. The notion resurfaces when discussing open sets.

Sequences, subsequences, convergence, Cauchy

Definitions

A sequence in (X,d)(X,d) is a map f:N→Xf:\mathbb N\to X, written xn=f(n)x_n=f(n).

A subsequence is a composition f∘gf\circ g where g:N→Ng:\mathbb N\to\mathbb N is strictly increasing. Strict increase encodes "same order, terms may be skipped, no repetition".

Convergence: xn→xx_n\to x means

∀ε>0 ∃N such that n≥N⇒d(xn,x)<ε.\forall\varepsilon>0\ \exists N\ \text{such that}\ n\ge N\Rightarrow d(x_n,x)<\varepsilon .

Cauchy sequence:

∀ε>0 ∃N such that m,n≥N⇒d(xm,xn)<ε.\forall\varepsilon>0\ \exists N\ \text{such that}\ m,n\ge N\Rightarrow d(x_m,x_n)<\varepsilon .

Both definitions are word-for-word those on R\mathbb R, with ∣xn−x∣|x_n-x| replaced by d(xn,x)d(x_n,x).

Theorem: convergent implies Cauchy

Theorem. In any metric space, every convergent sequence is Cauchy.

Proof. Let xn→xx_n\to x. Given ε>0\varepsilon>0, there is NN such that n≥Nn\ge N implies

d(xn,x)<ε2.d(x_n,x)<\frac{\varepsilon}{2}.

For m,n≥Nm,n\ge N, insert xx and apply the triangle inequality:

d(xm,xn)≤d(xm,x)+d(x,xn)<ε2+ε2=ε.d(x_m,x_n)\le d(x_m,x)+d(x,x_n)<\frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon .

Hence (xn)(x_n) is Cauchy. □\square

One line of triangle inequality, but it displays the central technique: to bound the distance between two points, insert a third point known to be close to both.

The converse fails: the space may lack the limit point

In R\mathbb R every Cauchy sequence converges (the Cauchy convergence theorem), but that depends on completeness. Change the space and it fails.

Counterexample. Let X=(0,1]X=(0,1] with d(x,y)=∣x−y∣d(x,y)=|x-y| and xn=1/nx_n=1/n.

  • It is Cauchy: given ε>0\varepsilon>0, choose N>1/εN>1/\varepsilon; for m,n≥Nm,n\ge N,
∣1m−1n∣<1N<ε.\left|\frac1m-\frac1n\right|<\frac1N<\varepsilon .
  • It does not converge in XX: the only possible limit is 00, and 0∉X0\notin X.

So "Cauchy" guarantees only that the tail bunches together, not that the clustering point belongs to the space.

Definition. A metric space is Cauchy complete if every Cauchy sequence converges.

R\mathbb R is complete; (0,1](0,1] is not. Most of the course works in complete or compact spaces precisely to avoid this "off by one point" failure.

Balls and boundedness

Metric balls

The open ball with centre xx and radius r>0r>0 is

Br(x)={y∈X:d(x,y)<r}.B_r(x)=\{y\in X : d(x,y)<r\}.

Replacing strict inequality by ≤\le gives the closed ball Br(x)‾\overline{B_r(x)}. The two symbols recur constantly; the only difference is whether the boundary is included.

In R2\mathbb R^2 with the Euclidean metric a ball is a disc; with the box metric it is a diamond. The same word "ball", a shape determined by the distance.

Bounded subsets

A⊆XA\subseteq X is bounded if there exist x∈Xx\in X and D>0D>0 with A⊆BD(x)A\subseteq B_D(x).

Three easy-to-miss points:

  • The empty set is bounded (it is contained in every set).
  • The whole space may be bounded. For X=(0,1]X=(0,1] with the usual distance, centre 1/21/2 and radius 11 contain everything.
  • Boundedness is not the vague "distances between elements are finite"; it must exhibit a single ball containing the set.

Lemma: Cauchy sequences are bounded

Lemma. In any metric space, every Cauchy sequence is bounded.

Proof. Take ε=1\varepsilon=1; there is NN such that m,n≥Nm,n\ge N implies d(xm,xn)<1d(x_m,x_n)<1. In particular, for all n≥Nn\ge N,

d(xn,xN)<1.d(x_n,x_N)<1 .

Control the finitely many earlier terms by setting

r=1+max⁡1≤i≤N−1d(xN,xi)r=1+\max_{1\le i\le N-1}d(x_N,x_i)

(with the maximum read as 00 when N=1N=1). Then

  • for n≥Nn\ge N, d(xN,xn)<1<rd(x_N,x_n)<1<r;
  • for n<Nn<N, d(xN,xn)≤max⁡≤r−1<rd(x_N,x_n)\le\max\le r-1<r.

So every xnx_n lies in Br(xN)B_r(x_N) and the sequence is bounded. □\square

The extra 11 is there to make the inequality strict; a non-strict version would do equally well.

Combining with the previous theorem: convergent ⟹ Cauchy ⟹ bounded. Neither arrow reverses.

Bolzano–Weierstrass fails

In R\mathbb R every bounded sequence has a convergent subsequence. In a general metric space this fails.

The same counterexample works: in X=(0,1]X=(0,1] the sequence xn=1/nx_n=1/n is bounded and Cauchy, yet has no convergent subsequence in XX (every subsequence can only head for 0∉X0\notin X).

The course notes that BW is restored in compact metric spaces. That is precisely the motivation for introducing compactness next.

Open and closed sets

Open sets

O⊆XO\subseteq X is open if

∀x∈O ∃r>0 such that Br(x)⊆O.\forall x\in O\ \exists r>0\ \text{such that}\ B_r(x)\subseteq O .

Intuitively, every point of an open set can move a little in any direction without leaving. Boundary points cannot, so an open set excludes its boundary.

Two trivial open sets: ∅\varnothing and XX. The empty set has no elements to check, so the condition holds vacuously; every ball around a point of XX lies in XX.

One relativity warning: take X=(0,1]X=(0,1]. Then XX is open as a subset of itself, although it is not open as a subset of R\mathbb R. Before calling a set open or closed, fix the ambient space.

Lemma: an open ball is open

Lemma. For any x∈Xx\in X and r>0r>0, Br(x)B_r(x) is open.

Proof. Take y∈Br(x)y\in B_r(x), so d(x,y)<rd(x,y)<r. Let

s=r−d(x,y)>0.s=r-d(x,y)>0 .

For any z∈Bs(y)z\in B_s(y), the triangle inequality gives

d(x,z)≤d(x,y)+d(y,z)<d(x,y)+s=r.d(x,z)\le d(x,y)+d(y,z)<d(x,y)+s=r .

Hence z∈Br(x)z\in B_r(x), i.e. Bs(y)⊆Br(x)B_s(y)\subseteq B_r(x). Since yy was arbitrary, Br(x)B_r(x) is open. □\square

Geometrically, the distance from yy to the boundary is r−d(x,y)r-d(x,y), and a ball of that radius stays inside. The strict inequality is what makes s>0s>0.

Closed sets

C⊆XC\subseteq X is closed if its complement

X∖C={x∈X:x∉C}X\setminus C=\{x\in X : x\notin C\}

is open.

It follows at once that ∅\varnothing and XX are both open and closed (they are complements of each other, and both are open). There is no contradiction: "open" and "closed" are not opposites.

A fact proved formally later: the closed ball {y:d(x,y)≤r}\{y : d(x,y)\le r\} is closed. Intuitively its complement {y:d(x,y)>r}\{y:d(x,y)>r\} is open — there is positive distance to the boundary, so one can move further out.

Set operations and De Morgan's laws

For A,B⊆XA,B\subseteq X:

  • Union: A∪B={x:x∈A or x∈B}A\cup B=\{x : x\in A\ \text{or}\ x\in B\}.
  • Intersection: A∩B={x:x∈A and x∈B}A\cap B=\{x : x\in A\ \text{and}\ x\in B\}.
  • Complement: X∖A={x:x∉A}X\setminus A=\{x : x\notin A\}.

For a family {Uα}\{U_\alpha\}:

⋃αUα={x:∃α, x∈Uα},⋂αUα={x:∀α, x∈Uα}.\bigcup_\alpha U_\alpha=\{x : \exists\alpha,\ x\in U_\alpha\}, \qquad \bigcap_\alpha U_\alpha=\{x : \forall\alpha,\ x\in U_\alpha\}.

De Morgan's laws:

(⋃αUα)c=⋂αUαc,(⋂αUα)c=⋃αUαc.\left(\bigcup_\alpha U_\alpha\right)^c=\bigcap_\alpha U_\alpha^c, \qquad \left(\bigcap_\alpha U_\alpha\right)^c=\bigcup_\alpha U_\alpha^c .

The course's advice: do not memorise; re-derive each time. To prove two sets equal, prove mutual inclusion: left ⊆\subseteq right, then right ⊆\subseteq left. For De Morgan, translate "not in the union" into "for every α\alpha, not in UαU_\alpha", then into "in every complement".

Misremembering De Morgan is expensive: it is exactly the source of the duality between open and closed sets.

Unions and intersections of open sets

Arbitrary unions are open

Proposition. If {Oα}\{O_\alpha\} is a family of open sets, then ⋃αOα\bigcup_\alpha O_\alpha is open.

Proof. Take x∈⋃αOαx\in\bigcup_\alpha O_\alpha. By definition of union, some α0\alpha_0 satisfies x∈Oα0x\in O_{\alpha_0}. Since Oα0O_{\alpha_0} is open, there is r>0r>0 with Br(x)⊆Oα0B_r(x)\subseteq O_{\alpha_0}. Hence

Br(x)⊆Oα0⊆⋃αOα.B_r(x)\subseteq O_{\alpha_0}\subseteq\bigcup_\alpha O_\alpha .

So the union is open. □\square

Nothing is assumed about the cardinality of the index set: arbitrarily many open sets may be united.

Finite intersections are open

Proposition. If O1,…,OnO_1,\dots,O_n are finitely many open sets, then ⋂i=1nOi\bigcap_{i=1}^{n}O_i is open.

Proof. Take x∈⋂iOix\in\bigcap_i O_i. For each ii, openness of OiO_i gives ri>0r_i>0 with Bri(x)⊆OiB_{r_i}(x)\subseteq O_i. Let

r=min⁡{r1,…,rn}>0.r=\min\{r_1,\dots,r_n\}>0 .

That the minimum of finitely many positive numbers is positive is the crux. Then for every ii,

Br(x)⊆Bri(x)⊆Oi,B_r(x)\subseteq B_{r_i}(x)\subseteq O_i,

so Br(x)⊆⋂iOiB_r(x)\subseteq\bigcap_i O_i and the intersection is open. □\square

Infinite intersections fail

Counterexample. In R\mathbb R let

On=(−1n,1n),n∈N.O_n=\left(-\frac1n,\frac1n\right),\qquad n\in\mathbb N .

Each OnO_n is open, but

⋂n=1∞On={0},\bigcap_{n=1}^{\infty}O_n=\{0\},

and a singleton is not open (every ball around 00 contains nonzero points).

The failure is concrete: the infimum of rn=1/nr_n=1/n is 00, and a positive minimum does not exist. The sentence "the minimum of finitely many positive numbers is positive" has no infinite analogue.

Contrast this with unions: arbitrary unions are fine, intersections only finitely many. The next lecture proves the mirror-image statements for closed sets.

What this lecture establishes

  • A metric space is a set plus a distance satisfying positive definiteness, symmetry and the triangle inequality; general spaces have no order and no arithmetic, so series are meaningless.
  • Convergence, subsequences, Cauchy sequences and boundedness all transfer from R\mathbb R; the proofs use almost nothing but the triangle inequality.
  • Convergent ⟹ Cauchy ⟹ bounded; the reverse implications need extra hypotheses (complete, compact).
  • A Cauchy sequence that fails to converge reflects a missing cluster point; (0,1](0,1] with xn=1/nx_n=1/n is the standard example.
  • Open balls are open; arbitrary unions of open sets are open, finite intersections are open, infinite intersections need not be.
  • A closed set is one whose complement is open; open and closed are not opposites.
  • De Morgan's laws exchange unions and intersections and are the technical source of open/closed duality.

Comprehension check

1. Why is a series meaningless in a general metric space while a convergent sequence is meaningful?

Reference answer: Convergence only compares the distance d(xn,x)d(x_n,x) between two points, and a distance function suffices. A series requires adding infinitely many terms, i.e. algebraic operations such as addition and scalar multiplication, which a general metric space does not carry. R\mathbb R happens to be both an ordered field and a metric space, so both notions exist there; keeping only the distance destroys summation.

2. Prove that a convergent sequence is Cauchy (show the ε/2\varepsilon/2 choice).

Reference answer: Let xn→xx_n\to x. Given ε>0\varepsilon>0, choose NN such that n≥Nn\ge N implies d(xn,x)<ε/2d(x_n,x)<\varepsilon/2. For m,n≥Nm,n\ge N,

d(xm,xn)≤d(xm,x)+d(x,xn)<ε2+ε2=ε.d(x_m,x_n)\le d(x_m,x)+d(x,x_n)<\frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon .

Symmetry is used to convert both distances into the ones already estimated.

3. In X=(0,1]X=(0,1], the sequence xn=1/nx_n=1/n is Cauchy but not convergent. Does it have a convergent subsequence? Explain.

Reference answer: No. If a subsequence xnk→L∈(0,1]x_{n_k}\to L\in(0,1], then L>0L>0; but xnk→0x_{n_k}\to0 in R\mathbb R, and limits are unique, a contradiction. More directly, every subsequence stays at distance approaching 00 from 00 while eventually being at distance at least L/2L/2 from any fixed L>0L>0. The example simultaneously shows that BW fails in a general metric space.

4. Prove that an open ball is open. Why take s=r−d(x,y)s=r-d(x,y) rather than rr?

Reference answer: See the proof above. The choice s=r−d(x,y)s=r-d(x,y) is exactly the remaining distance from yy to the boundary of the big ball, so a ball of that radius still fits inside. Choosing s=rs=r would let the small ball poke outside. The key inequality is d(x,z)≤d(x,y)+d(y,z)<d(x,y)+s=rd(x,z)\le d(x,y)+d(y,z)<d(x,y)+s=r, where the second strict inequality comes from z∈Bs(y)z\in B_s(y).

5. Give a family of open sets whose intersection is not open, and explain why the "minimum" argument breaks.

Reference answer: Take On=(−1/n,1/n)O_n=(-1/n,1/n); each is open, and the intersection is {0}\{0\}, which is not open. The finite-intersection proof uses r=min⁡{r1,…,rn}>0r=\min\{r_1,\dots,r_n\}>0, relying on the fact that finitely many positive numbers have a positive minimum. For an infinite family the corresponding quantity is inf⁡nrn\inf_n r_n, which may be 00; then no uniform r>0r>0 exists. Here inf⁡1/n=0\inf 1/n=0, so the argument collapses.

6. Use De Morgan's laws to show that "arbitrary unions of open sets are open" is equivalent to "arbitrary intersections of closed sets are closed".

Reference answer: Let Cα=X∖OαC_\alpha=X\setminus O_\alpha be closed. By De Morgan,

X∖⋃αOα=⋂αCα.X\setminus\bigcup_\alpha O_\alpha=\bigcap_\alpha C_\alpha .

If ⋃αOα\bigcup_\alpha O_\alpha is open, its complement is closed, so ⋂αCα\bigcap_\alpha C_\alpha is closed. Conversely, if arbitrary intersections of closed sets are closed, the complement of that intersection is open, so the union is open. The two statements are dual, and proving one yields the other.

7. Why is the empty set open? Why is it bounded?

Reference answer: Openness is the universal statement "for every x∈∅x\in\varnothing there is r>0r>0 with …"; with no elements to check, it holds vacuously. Boundedness is "there exist xx and DD with A⊆BD(x)A\subseteq B_D(x)", and ∅⊆BD(x)\varnothing\subseteq B_D(x) for any ball. Both illustrate the logical peculiarity of the empty set: universal statements hold vacuously, existential ones do not follow automatically.

Relation to neighbouring lectures

The previous lecture assembled all the convergence tools on R\mathbb R; this one moves them to metric spaces and introduces open sets. The next lecture continues the line: closed sets are defined and characterised by "limits of convergent sequences stay inside", then covers and compactness are defined, and compact sets are proved bounded and closed. The closing results here on arbitrary unions and finite intersections reappear there in dual form.

来源