Processing math: 90%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts
  • You do not have permission to view this page - please try signing in.

8.4: Completeness and Compactness

( \newcommand{\kernel}{\mathrm{null}\,}\)

Cauchy sequences and completeness

Just like with sequences of real numbers we can define Cauchy sequences.

Let (X,d) be a metric space. A sequence {xn} in X is a Cauchy sequence if for every ϵ>0 there exists an MN such that for all nM and all kM we have d(xn,xk)<ϵ.

The definition is again simply a translation of the concept from the real numbers to metric spaces. So a sequence of real numbers is Cauchy in the sense of if and only if it is Cauchy in the sense above, provided we equip the real numbers with the standard metric d(x,y)=|xy|.

Let (X,d) be a metric space. We say that X is complete or Cauchy-complete if every Cauchy sequence {xn} in X converges to an xX.

The space Rn with the standard metric is a complete metric space.

For R=R1 this was proved in .

Take n>1. Let {xj}j=1 be a Cauchy sequence in Rn, where we write xj=(xj1,xj2,,xjn)Rn. As the sequence is Cauchy, given ϵ>0, there exists an M such that for all i,jM we have d(xi,xj)<ϵ.

Fix some k=1,2,,n, for i,jM we have \[\bigl\lvert x_k^i - x_k^j \bigr\rvert = \sqrt

ParseError: invalid DekiScript (click for details)
Callstack:
    at (Bookshelves/Analysis/Introduction_to_Real_Analysis_(Lebl)/08:_Metric_Spaces/8.04:_Completeness_and_Compactness), /content/body/div[1]/p[8]/span, line 1, column 1
\) is complete the sequence converges; there exists an xkR such that xk=limjxjk.

Write x=(x1,x2,,xn)Rn. By we have that {xj} converges to xRn and hence Rn is complete.

Compactness

Let (X,d) be a metric space and KX. The set K is set to be compact if for any collection of open sets {Uλ}λI such that KλIUλ, there exists a finite subset {λ1,λ2,,λk}I such that Kkj=1Uλj.

A collection of open sets {Uλ}λI as above is said to be a open cover of K. So a way to say that K is compact is to say that every open cover of K has a finite subcover.

Let (X,d) be a metric space. A compact set KX is closed and bounded.

First, we prove that a compact set is bounded. Fix pX. We have the open cover Kn=1B(p,n)=X. If K is compact, then there exists some set of indices n1<n2<<nk such that Kkj=1B(p,nj)=B(p,nk). As K is contained in a ball, K is bounded.

Next, we show a set that is not closed is not compact. Suppose that ¯KK, that is, there is a point x¯KK. If yx, then for n with \nicefrac1n<d(x,y) we have yC(x,\nicefrac1n). Furthermore xK, so Kn=1C(x,\nicefrac1n)c. As a closed ball is closed, C(x,\nicefrac1n)c is open, and so we have an open cover. If we take any finite collection of indices n1<n2<<nk, then kj=1C(x,\nicefrac1nj)c=C(x,\nicefrac1nk)c As x is in the closure, we have C(x,\nicefrac1nk)K, so there is no finite subcover and K is not compact.

We prove below that in finite dimensional euclidean space every closed bounded set is compact. So closed bounded sets of Rn are examples of compact sets. It is not true that in every metric space, closed and bounded is equivalent to compact. There are many metric spaces where closed and bounded is not enough to give compactness, see for example .

A useful property of compact sets in a metric space is that every sequence has a convergent subsequence. Such sets are sometimes called sequentially compact. Let us prove that in the context of metric spaces, a set is compact if and only if it is sequentially compact.

[thm:mscompactisseqcpt] Let (X,d) be a metric space. Then KX is a compact set if and only if every sequence in K has a subsequence converging to a point in K.

Let KX be a set and {xn} a sequence in K. Suppose that for each xK, there is a ball B(x,αx) for some αx>0 such that xnB(x,αx) for only finitely many nN. Then KxKB(x,αx). Any finite collection of these balls is going to contain only finitely many xn. Thus for any finite collection of such balls there is an xnK that is not in the union. Therefore, K is not compact.

So if K is compact, then there exists an xK such that for any δ>0, B(x,δ) contains xk for infinitely many kN. B(x,1) contains some xk so let n1:=k. If nj1 is defined, then there must exist a k>nj1 such that xkB(x,\nicefrac1j), so define nj:=k. Notice that d(x,xnj)<\nicefrac1j. By , limxnj=x.

For the other direction, suppose that every sequence in K has a subsequence converging in K. Take an open cover {Uλ}λI of K. For every xK, define δ(x):=sup{δ(0,1):B(x,δ)Uλ for some λI}. As {Uλ} is an open cover of K, δ(x)>0 for each xK. By construction, for any positive ϵ<δ(x) there must exist a λI such that B(x,ϵ)Uλ.

Pick a λ0I and look at Uλ0. If KUλ0, we stop as we have found a finite subcover. Otherwise, there must be a point x1KUλ0. There must exist some λ1I such that x1Uλ1 and in fact B(x1,12δ(x1))Uλ1. We work inductively. Suppose that λn1 is defined. Either Uλ0Uλ1Uλn1 is a finite cover of K, in which case we stop, or there must be a point xnK(Uλ1Uλ2Uλn1). In this case, there must be some λnI such that xnUλn, and in fact B(xn,12δ(xn))Uλn.

So either we obtained a finite subcover or we obtained an infinite sequence {xn} as above. For contradiction suppose that there was no finite subcover and we have the sequence {xn}. Then there is a subsequence {xnk} that converges, that is, x=limxnkK. We take λI such that B(x,12δ(x))Uλ. As the subsequence converges, there is a k such that d(xnk,x)<18δ(x). By the triangle inequality, B(xnk,38δ(x))B(x,12δ(x))Uλ. So 38δ(x)<δ(xnk), which implies B(xnk,316δ(x))B(xnk,12δ(xnk))Uλnk. As \nicefrac18<\nicefrac316, we have xB(xnk,316δ(x)), or xUλnk. As limxnj=x, for all j large enough we have xnjUλnk by . Let us fix one of those j such that j>k. But by construction xnjUλnk if j>k, which is a contradiction.

By the Bolzano-Weierstrass theorem for sequences () we have that any bounded sequence has a convergent subsequence. Therefore any sequence in a closed interval [a,b]R has a convergent subsequence. The limit must also be in [a,b] as limits preserve non-strict inequalities. Hence a closed bounded interval [a,b]R is compact.

Let (X,d) be a metric space and let KX be compact. Suppose that EK is a closed set, then E is compact.

Let {xn} be a sequence in E. It is also a sequence in K. Therefore it has a convergent subsequence {xnj} that converges to xK. As E is closed the limit of a sequence in E is also in E and so xE. Thus E must be compact.

[thm:msbw] A closed bounded subset KRn is compact.

For R=R1 if KR is closed and bounded, then any sequence {xn} in K is bounded, so it has a convergent subsequence by Bolzano-Weierstrass theorem for sequences (). As K is closed, the limit of the subsequence must be an element of K. So K is compact.

Let us carry out the proof for n=2 and leave arbitrary n as an exercise.

As K is bounded, there exists a set B=[a,b]×[c,d]R2 such that KB. If we can show that B is compact, then K, being a closed subset of a compact B, is also compact.

Let {(xk,yk)}k=1 be a sequence in B. That is, axkb and cykd for all k. A bounded sequence has a convergent subsequence so there is a subsequence {xkj}j=1 that is convergent. The subsequence {ykj}j=1 is also a bounded sequence so there exists a subsequence {ykji}i=1 that is convergent. A subsequence of a convergent sequence is still convergent, so {xkji}i=1 is convergent. Let x:=limixkjiandy:=limiykji. By , {(xkji,ykji)}i=1 converges to (x,y) as i goes to . Furthermore, as axkb and cykd for all k, we know that (x,y)B.

Exercises

Let (X,d) be a metric space and A a finite subset of X. Show that A is compact.

Let A={\nicefrac1n:nN}R. a) Show that A is not compact directly using the definition. b) Show that A \cup \{ 0 \} is compact directly using the definition.

Let (X,d) be a metric space with the discrete metric. a) Prove that X is complete. b) Prove that X is compact if and only if X is a finite set.

a) Show that the union of finitely many compact sets is a compact set. b) Find an example where the union of infinitely many compact sets is not compact.

Prove for arbitrary dimension. Hint: The trick is to use the correct notation.

Show that a compact set K is a complete metric space.

Let C([a,b]) be the metric space as in . Show that C([a,b]) is a complete metric space.

[exercise:msclbounnotcompt] Let C([0,1]) be the metric space of . Let 0 denote the zero function. Then show that the closed ball C(0,1) is not compact (even though it is closed and bounded). Hints: Construct a sequence of distinct continuous functions \{ f_n \} such that d(f_n,0) = 1 and d(f_n,f_k) = 1 for all n \not= k. Show that the set \{ f_n : n \in {\mathbb{N}}\} \subset C(0,1) is closed but not compact. See for inspiration.

Show that there exists a metric on {\mathbb{R}} that makes {\mathbb{R}} into a compact set.

Suppose that (X,d) is complete and suppose we have a countably infinite collection of nonempty compact sets E_1 \supset E_2 \supset E_3 \supset \cdots then prove \bigcap_{j=1}^\infty E_j \not= \emptyset.

Let C([0,1]) be the metric space of . Let K be the set of f \in C([0,1]) such that f is equal to a quadratic polynomial, i.e. f(x) = a+bx+cx^2, and such that \left\lvert {f(x)} \right\rvert \leq 1 for all x \in [0,1], that is f \in C(0,1). Show that K is compact.

Contributors and Attributions


This page titled 8.4: Completeness and Compactness is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Jiří Lebl via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?