第 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.
篇内目录
- The question: what can be carried over
- Timeline
- Definition of a metric space
- Four examples
- The real line
- Euclidean space
- The box (taxicab) metric
- Continuous function spaces
- Aside: tubular neighbourhoods
- Sequences, subsequences, convergence, Cauchy
- Definitions
- Theorem: convergent implies Cauchy
- The converse fails: the space may lack the limit point
- Balls and boundedness
- Metric balls
- Bounded subsets
- Lemma: Cauchy sequences are bounded
- Bolzano–Weierstrass fails
- Open and closed sets
- Open sets
- Lemma: an open ball is open
- Closed sets
- Set operations and De Morgan's laws
- Unions and intersections of open sets
- Arbitrary unions are open
- Finite intersections are open
- Infinite intersections fail
- What this lecture establishes
- Comprehension check
- Relation to neighbouring lectures
问题:哪些东西能搬走
前半学期一直在 上工作: 是有序域,可以比较大小、可以相加相乘、可以求和。这一讲要问:如果把 换成一个只有「距离」的集合,哪些结论还能原样成立?
答案是分层的:
- 能搬走:数列、收敛、子列、柯西列、有界。
- 搬不走:序关系(一般度量空间没有大小)、域运算(不能相加相乘),因此级数也没有意义。
这个分界很重要。它说明「收敛」这类概念的本质不是算术,而是「距离可以任意小」。抓住这一点,就能把大量证明原封不动地移植过去。
时间轴
| 时间 | 内容 |
|---|---|
| 0:00 | 回顾: 是有序域;哪些概念可以推广 |
| 2:02 | 度量空间的定义:三条公理 |
| 4:34 | 例子:、、盒距离、连续函数空间的上确界距离 |
| 11:54 | 度量空间中的数列、子列、收敛、柯西列 |
| 17:27 | 定理:收敛列必为柯西列(证明) |
| 20:41 | 柯西收敛定理只在 成立;反例 |
| 23:45 | 柯西完备的定义 |
| 24:59 | 度量球;管状邻域 |
| 29:52 | 有界子集 |
| 32:53 | 引理:柯西列有界(证明) |
| 45:52 | Bolzano–Weierstrass 在一般度量空间失效 |
| 48:15 | 开集的定义与球的证明 |
| 1:03:50 | 闭集的定义 |
| 1:04:46 | 集合运算与 De Morgan 律 |
| 1:18:46 | 开集的任意并、有限交 |
度量空间的定义
一个度量空间是二元组 : 是集合, 是距离函数,满足三条公理。
- 正定:,且 当且仅当 。
- 对称:。
- 三角不等式:。
前两条几乎是记账;第三条才是真正干活的那条。课程反复强调:在一般度量空间里,几乎所有非平凡的证明都只用三角不等式。所以要养成习惯——看到要证的不等式,先想「能不能用三角不等式插一个中间点」。
四个例子
实数轴
,。三条公理都直接验证;三角不等式就是熟悉的 。
欧氏空间
,,,
时退化为 。三角不等式就是勾股定理的向量版本(柯西–施瓦茨不等式的推论)。
盒距离(出租车距离)
同一集合 ,改用
正定与对称显然;三角不等式逐坐标使用实数轴上的版本再相加即可。这个例子说明:同一个集合可以配不同的距离,得到不同的度量空间。
连续函数空间
(闭区间上的连续函数),
这个最大值确实取得到: 连续,闭区间上由最值定理取得最大值。三条公理都容易验证。这个例子在期中出现过,后面证明紧性反例时还会用到。
附带一提:管状邻域
球的概念还可以推广到「到一个集合的距离」:给定子集 ,定义
当 是一条曲线时,这像是给曲线套了一根半径 的管子,所以叫管状邻域。 是单点时它就是普通的球。这个概念在后续讨论开集时会出现。
数列、子列、收敛、柯西
定义
度量空间 中的数列是映射 ,记 。
子列是复合 ,其中 严格递增。严格递增保证「顺序不变、可以跳过、不能重复取」。
收敛: 指
柯西列:
两个定义与 上的写法逐字相同,只是把 换成 。
定理:收敛 ⟹ 柯西
定理。 度量空间中任何收敛列都是柯西列。
证明。 设 。给定 ,存在 使 时
若 ,以 为中间点用三角不等式:
所以 是柯西列。
这个证明只有一行三角不等式,但它体现了本讲的核心技术:要估计两点之间的距离,就插入一个已知很近的第三点。
反向不成立:空间可能「缺了点」
在 中柯西列必收敛(柯西收敛定理),但这依赖完备性。换一个空间就失效。
反例。 取 ,距离为 ,数列 。
- 它是柯西列:给定 ,取 ,则 时
- 它在 中不收敛:唯一可能的极限是 ,而 。
所以「柯西」只保证尾部挤在一起,不保证那个聚点属于空间。
定义。 若度量空间中每个柯西列都收敛,称该空间柯西完备。
完备; 不完备。课程的后续内容大多在完备空间或紧空间上做,正是为了避免这类「差一点」的情况。
球与有界
度量球
以 为心、 为半径的开球是
若把严格小于改成小于等于,得到闭球 。这两个符号后面会反复出现,区别只在端点是否包含。
在 配欧氏距离时,球就是通常的圆盘;配盒距离时,球是菱形(旋转过的正方形)。同一个「球」,形状由距离决定。
有界子集
有界,指存在 与 ,使 。
几个容易忽略的点:
- 空集有界(它包含于任何集合)。
- 整个空间也可能有界。例如 配通常距离,取心 、半径 就把整个空间装下了。
- 有界不是「元素之间距离有限」这种模糊说法,必须写出存在某个球把它装进去。
引理:柯西列有界
引理。 度量空间中任何柯西列都有界。
证明。 取 ,存在 使 时 。特别地,对一切 ,
把前面有限项也控制住,令
(若 ,约定最大值为 ,取 )。则
- 时,;
- 时,。
所以所有 都落在 中,数列有界。
多加的那个 是为了让不等式严格成立;实际上取非严格版本也不影响结论。
结合前面的定理:收敛 ⟹ 柯西 ⟹ 有界。两条箭头都不能反向。
Bolzano–Weierstrass 失效
在 中,有界数列必有收敛子列。在一般度量空间中这不成立。
反例还是 与 :它有界、是柯西列,但在 中没有收敛子列(任何子列都只能趋向 )。
课程指出:BW 定理在紧度量空间中会恢复。这正是接下来引入紧性的动机。
开集与闭集
开集
是开集,指
直观上,开集里的每个点都还能「往四周走一点」而不出界。边界上的点做不到这一点,所以开集不含边界。
两个平凡的开集: 与 。空集没有元素要检查,条件空洞成立; 中每个点的球都在 内。
一个必须注意的相对性:取 ,则 作为自身的子集是开集,尽管它作为 的子集不是开集。讨论开闭之前,先确认「相对于哪个空间」。
引理:开球是开集
引理。 对任意 、, 是开集。
证明。 取 ,即 。令
对任意 ,三角不等式给出
所以 ,即 。由于 任意, 是开集。
几何图像: 到边界的剩余距离是 ,以它为半径的小球一定还在大球内部。严格不等式保证 。
闭集
是闭集,指其余集
是开集。
由定义立刻得到: 与 既开又闭(它们互为余集,而两者都开)。这不是矛盾,「开」与「闭」不是互斥的形容词。
一个稍后才会正式证明的事实:闭球 是闭集。直观上它的余集 是开的——离边界还有正距离,可以再往外走一点。
集合运算与 De Morgan 律
设 :
- 并:。
- 交:。
- 补:。
对一族子集 :
De Morgan 律:
课程的建议是:不要背,每次现推。证明两个集合相等,标准做法是「互相包含」:先证左边 右边,再证右边 左边。推导 De Morgan 律时,只需把「不属于并」翻译成「对所有 都不属于」,再翻译成「属于每个补集」。
记错 De Morgan 律的代价很大:它正是开集与闭集对偶性质的来源。
开集的并、交
任意并仍开
命题。 若 是一族开集,则 是开集。
证明。 取 。由并的定义,存在 使 。因为 开,存在 使 。于是
所以并集是开集。
注意这里没有对指标集的基数作任何限制:任意多个开集并起来仍开。
有限交仍开
命题。 若 是有限多个开集,则 是开集。
证明。 取 。对每个 ,由 开,存在 使 。令
有限个正数的最小值仍为正,这是关键。于是对每个 ,
所以 ,交集是开集。
无限交会失效
反例。 在 中取
每个 都是开集。但
单点集不是开集(任何以 为心的球都含有非零点)。
失败的原因很具体: 的下确界是 ,取不到正的最小值。「有限个正数的最小值」这一句在无限情形下没有对应物。
这与并的情形形成对照:并可以任意,交只能有限。下一讲证明闭集时,会出现完全相反的对偶结论。
本节结论
- 度量空间 = 集合 + 满足正定、对称、三角不等式的距离;一般空间没有序、没有运算,级数无意义。
- 收敛、子列、柯西、有界都能从 搬到度量空间,证明几乎只用三角不等式。
- 收敛 ⟹ 柯西 ⟹ 有界;反方向都需要额外条件(完备、紧)。
- 柯西列不收敛的本质是空间缺了聚点; 与 是标准反例。
- 开球是开集;开集的任意并是开集,有限交是开集,无限交不一定。
- 闭集定义为余集开;开与闭不是互斥关系。
- De Morgan 律把并与交互相转换,是开集与闭集对偶性的技术来源。
理解检验
1. 为什么在一般度量空间里「级数」没有意义,而「数列收敛」有?
参考答案:收敛只需要比较两点之间的距离 ,只要有距离函数就能写。级数需要把无穷多项加起来,也就是需要加法与数乘这样的代数运算,而一般度量空间只配备了距离,没有加法。 同时是有序域和度量空间,所以两件事都能做;一旦只保留距离,求和就失去定义。
2. 证明:收敛列必为柯西列。(要求写出 的取法)
参考答案:设 ,给定 ,取 使 时 。若 ,则
这里用了对称性把 与 都换到已知的估计上。
3. 在 中, 是柯西列但不收敛。它有没有收敛子列?说明理由。
参考答案:没有。若某个子列 ,则 ;但 在 中成立,而极限唯一,矛盾。更直接地,任何子列与 的距离趋于 ,而它与任何 的距离最终至少是 ,不可能收敛到 。这个例子同时说明 BW 定理在一般度量空间失效。
4. 证明:开球是开集。为什么必须取 而不是 ?
参考答案:见正文证明。取 的理由是: 到大球边界的「剩余距离」恰好是这个数,以它为半径的小球才能整个留在内部。若取 ,小球就会伸出边界。证明的关键不等式是 ,其中第二个严格不等号来自 。
5. 举出一族开集,其交集不是开集,并解释为什么「最小值」论证失效。
参考答案:取 ,每个都开,交集是 ,不是开集。证明有限交时用的 依赖「有限个正数有正的最小值」。对无限族,对应的量是 ,它可能是 ,此时无法给出统一的 。这里 ,所以论证断裂。
6. 用 De Morgan 律说明:如果所有 都是开集,那么 是开集这一结论,等价于「任意多个闭集的交集是闭集」。
参考答案:令 为闭集。由 De Morgan 律,
若 开,则它的余集闭,即 闭。反之若任意多个闭集的交是闭集,则上式的余集开,即并集开。所以两条命题互为对偶,证明一条就自动得到另一条。
7. 空集为什么是开集?为什么它也是有界的?
参考答案:空集是开集是「对每个 存在 ……」的全称命题,由于没有元素需要验证,条件空洞成立。有界的定义是「存在 与 使 」,而 对任何球都成立,所以空集有界。这两处都体现空集在逻辑上的特殊性:全称命题为真,存在命题则不会空集自动成立。
与前后课的关系
上一讲在 上把所有收敛工具备齐;这一讲把它们搬到度量空间,并引入开集。下一讲继续走这条线:用开集定义闭集,证明「闭集 ⟺ 收敛列极限封闭」这个等价刻画,然后定义覆盖与紧性,并证明紧集必有界且闭。这一讲末尾关于「开集任意并、有限交」的结论,在下一讲会以对偶形式原样出现。
The question: what can be carried over
The first half of the semester worked on : an ordered field, where we can compare sizes, add and multiply, and sum series. This lecture asks: if 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
| Time | Topic |
|---|---|
| 0:00 | Recap: is an ordered field; which notions generalise |
| 2:02 | Definition of a metric space: three axioms |
| 4:34 | Examples: , , the box metric, the sup metric on continuous functions |
| 11:54 | Sequences, subsequences, convergence, Cauchy sequences in a metric space |
| 17:27 | Theorem: convergent implies Cauchy (with proof) |
| 20:41 | The Cauchy convergence theorem holds only in ; counterexample |
| 23:45 | Cauchy completeness |
| 24:59 | Metric balls; tubular neighbourhoods |
| 29:52 | Bounded subsets |
| 32:53 | Lemma: Cauchy sequences are bounded (with proof) |
| 45:52 | Bolzano–Weierstrass fails in a general metric space |
| 48:15 | Open sets and the proof that balls are open |
| 1:03:50 | Closed sets |
| 1:04:46 | Set operations and De Morgan's laws |
| 1:18:46 | Arbitrary unions and finite intersections of open sets |
Definition of a metric space
A metric space is a pair : a set and a distance function satisfying three axioms.
- Positive definite: , and if and only if .
- Symmetric: .
- Triangle inequality: .
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
, . The axioms are immediate; the triangle inequality is the familiar .
Euclidean space
, , ,
For this reduces to . The triangle inequality is the vector form of Pythagoras' argument (a consequence of Cauchy–Schwarz).
The box (taxicab) metric
The same set with
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
(continuous functions on a closed interval),
The maximum is attained: 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 ,
When is a curve this is a tube of radius around it, hence the name tubular neighbourhood. When is a single point it is an ordinary ball. The notion resurfaces when discussing open sets.
Sequences, subsequences, convergence, Cauchy
Definitions
A sequence in is a map , written .
A subsequence is a composition where is strictly increasing. Strict increase encodes "same order, terms may be skipped, no repetition".
Convergence: means
Cauchy sequence:
Both definitions are word-for-word those on , with replaced by .
Theorem: convergent implies Cauchy
Theorem. In any metric space, every convergent sequence is Cauchy.
Proof. Let . Given , there is such that implies
For , insert and apply the triangle inequality:
Hence is Cauchy.
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 every Cauchy sequence converges (the Cauchy convergence theorem), but that depends on completeness. Change the space and it fails.
Counterexample. Let with and .
- It is Cauchy: given , choose ; for ,
- It does not converge in : the only possible limit is , and .
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.
is complete; 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 and radius is
Replacing strict inequality by gives the closed ball . The two symbols recur constantly; the only difference is whether the boundary is included.
In 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
is bounded if there exist and with .
Three easy-to-miss points:
- The empty set is bounded (it is contained in every set).
- The whole space may be bounded. For with the usual distance, centre and radius 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 ; there is such that implies . In particular, for all ,
Control the finitely many earlier terms by setting
(with the maximum read as when ). Then
- for , ;
- for , .
So every lies in and the sequence is bounded.
The extra 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 every bounded sequence has a convergent subsequence. In a general metric space this fails.
The same counterexample works: in the sequence is bounded and Cauchy, yet has no convergent subsequence in (every subsequence can only head for ).
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
is open if
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: and . The empty set has no elements to check, so the condition holds vacuously; every ball around a point of lies in .
One relativity warning: take . Then is open as a subset of itself, although it is not open as a subset of . Before calling a set open or closed, fix the ambient space.
Lemma: an open ball is open
Lemma. For any and , is open.
Proof. Take , so . Let
For any , the triangle inequality gives
Hence , i.e. . Since was arbitrary, is open.
Geometrically, the distance from to the boundary is , and a ball of that radius stays inside. The strict inequality is what makes .
Closed sets
is closed if its complement
is open.
It follows at once that and 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 is closed. Intuitively its complement is open — there is positive distance to the boundary, so one can move further out.
Set operations and De Morgan's laws
For :
- Union: .
- Intersection: .
- Complement: .
For a family :
De Morgan's laws:
The course's advice: do not memorise; re-derive each time. To prove two sets equal, prove mutual inclusion: left right, then right left. For De Morgan, translate "not in the union" into "for every , not in ", 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 is a family of open sets, then is open.
Proof. Take . By definition of union, some satisfies . Since is open, there is with . Hence
So the union is open.
Nothing is assumed about the cardinality of the index set: arbitrarily many open sets may be united.
Finite intersections are open
Proposition. If are finitely many open sets, then is open.
Proof. Take . For each , openness of gives with . Let
That the minimum of finitely many positive numbers is positive is the crux. Then for every ,
so and the intersection is open.
Infinite intersections fail
Counterexample. In let
Each is open, but
and a singleton is not open (every ball around contains nonzero points).
The failure is concrete: the infimum of is , 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 ; 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; with 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 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. 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 choice).
Reference answer: Let . Given , choose such that implies . For ,
Symmetry is used to convert both distances into the ones already estimated.
3. In , the sequence is Cauchy but not convergent. Does it have a convergent subsequence? Explain.
Reference answer: No. If a subsequence , then ; but in , and limits are unique, a contradiction. More directly, every subsequence stays at distance approaching from while eventually being at distance at least from any fixed . The example simultaneously shows that BW fails in a general metric space.
4. Prove that an open ball is open. Why take rather than ?
Reference answer: See the proof above. The choice is exactly the remaining distance from to the boundary of the big ball, so a ball of that radius still fits inside. Choosing would let the small ball poke outside. The key inequality is , where the second strict inequality comes from .
5. Give a family of open sets whose intersection is not open, and explain why the "minimum" argument breaks.
Reference answer: Take ; each is open, and the intersection is , which is not open. The finite-intersection proof uses , relying on the fact that finitely many positive numbers have a positive minimum. For an infinite family the corresponding quantity is , which may be ; then no uniform exists. Here , 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 be closed. By De Morgan,
If is open, its complement is closed, so 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 there is with …"; with no elements to check, it holds vacuously. Boundedness is "there exist and with ", and 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 ; 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.