Skip to main content

12 - Relationship between compact sets and closed sets

Where we left off last time

  • Compactness: Last time we saw that compact sets are, in some sense, small sets. They're the next best thing to being finite. In particular, finite sets are compact. We also saw that compact sets are, in fact, bounded sets. We proved that last time. And today we will show that compact sets are, in fact, closed sets as well. But we'll also see some other relationships between closed sets and compact sets.

  • Compact (definition): A set KK in a metric space XX is compact if every open cover of KK has a finite subcover in XX. We'll start off by showing something we alluded to last time, namely that it really doesn't matter what space you're embedded in. That is, compactness is actually an intrinsic property of a set, and it is actually does not depend on the metric space you're embedded in.

  • Recollection of openness in a metric space: Recall the characterization we had for what it means for a set to be open in a metric space. So consider a metric space XX and maybe some smaller metric space YY:

    We might ask, "What does it mean to be open in XX?" Well, what does it mean for a set to be open? It means every point of the set is an interior point. Or another way of saying it is that every point can be perturbed a little bit and stay inside the set. That's what it means to say the set is open. But last time we made a distinction about what it means for a set to be open in XX as opposed to YY. You could imagine, for instance, a set EE such as

    which does not contain its boundary on the left-hand side (indicated by the dashes) but does contain its boundary on the right-hand side (indicated by the dark bold line), where we also notice the open endpoints of the bold boundary. Is the set EE open in XX? No, it's not open in XX because you could be right on the bold boundary and perturb a little bit and you would leave the set EE. The point would not be interior. There is not an open ball, neighborhood around it that's still within XX. (In the picture this is communicated because any point to the right of the boundary would no longer be in EE, thus causing EE to not be open in XX. But is EE open in YY? Yes, because in YY, if we perturb it a little bit, would you still remain in YYif you only moved within YY? Yes. But what about the endpoints on the boundary? (In the picture, these endpoints are open even though you have to zoom in slightly to see it.) If the endpoints of the bolded boundary were actually in the set EE, then EE would not be open in YY either because you could march to the northwest direction of the top point and leave the set EE. That point would not be interior to EE if it were included. So the set EE in this example here is an example of a set that is open in YY but not open in XX. But there is a relationship as we saw last time.

    The thing we proved last time was that even if the pictured set EE is not open XX but is open in YY, then there exists a corresponding set GG that is open in XX such that EE is the intersection of this set with YY. That is, GY=EG\cap Y=E. That was the theorem from last time, and we can visualize the result in this example with the picture

    where GG is everything in the disc (indicated by diagonal lines going from top left to bottom right). So the theorem we proved last time was that if it is the case that EYXE\subset Y\subset X, then EE is open in YY if and only if E=YGE=Y\cap G for some open GG in XX. So this is the correspondence between being open in a metric space that is a subset of a bigger metric space. The book states this theorem more precisely as follows.

    Theorem. Suppose YXY\subset X. A subset EE of YY is open relative to YY if and only if E=YGE=Y\cap G for some open subset GG of XX.

    What this theorem essentially means is that any open set in YY, namely EE in our example, corresponds to some open set in XX, namely GG in our example. The set EE could correspond to several open sets GαG_\alpha in XX for which E=GαγYE=G_{\alpha_\gamma}\cap Y, but it must correspond to at least one such open set. Similarly, any open set in XX must correspond to an open set in YY just by taking the restriction to YY. This insight is going to be the ingredient in showing that compactness is really not dependent on the space you're in. For example, consider again the following picture:

    If we want to talk about the set EE being compact, then whether or not I choose to talk about compactness in YY or compactness in XX, it really does not matter. It's the same. Let's see why that's true. What we're really going to have here is some set KK. So you might imagine the set KK depicted below by the very bold line.

    And we might want to know whether or not the set KK is considered to be compact. And so now the question is what does it mean to be compact? I need to show that every open cover has a finite subcover, and if I want to talk about compactness in YY then there had better be an open cover for KK in YY. So then we would use open sets like EE pictured above to cover KK, and I want to know is it true that if KK is compact in YY, then is there some relationship between being compact in XX, which would involve covering by sets like GG pictured above. The theorem we are about to prove says that the notions are, in fact, equivalent.

Compactness results

What are some key results and proofs concerning compactness?

  • Compactness independent of metric space: We shall prove that, given KYXK\subset Y\subset X, that KK is compact in YY if and only if KK is compact in XX. Let's go with the forward direction first in our proof.

    • Forward direction: What are we assuming here? We are assuming that KK is compact in YY. That means given any cover of KK by some open set EE in YY I can find a finite subcover by similar sets EαE_\alpha. That's what we're allowed to use if we need it. But how should we actually start this proof? What do we want to show is compact? We want to show KK is compact in XX. So we should start with an open cover of KK by sets of the form GαG_\alpha (as in our picture above) in XX. Our job, then, will be to show that KK does, in fact, have a finite subcover in XX. Let's get started.

      Consider an open cover {Uα}\{U_\alpha\} of KK in XX, where the sets UαU_\alpha here are like GG in the previous picture, and α\alpha here just means an arbitrary open collection. We're not bothering to write the index set, but it could possibly be an uncountable index set. So we have an open cover of KK by a bunch of sets like GG, namely {Uα}\{U_\alpha\}. We want to show that {Uα}\{U_\alpha\} has a finite subcover. How can we do this? And all we know is that if we have sets like EE then we can find a finite subcover by such sets. Let Vα=UαYV_\alpha=U_\alpha\cap Y. Then {Vα}\{V_\alpha\} are an open cover for KK in YY. Is it clear that {Vα}\{V_\alpha\} actually cover KK? Yes, because KYK\subset Y. By compactness of KK in YY, there exists a finite subcover {Vα1,,Vαn}\{V_{\alpha_1},\ldots,V_{\alpha_n}\}. So we're just turning our intuition into a proof. So what's the finite subcover you're expecting to use now that's similar to GG in the previous picture? We should go back to the original UU sets. Which ones? The ones that are indexed by α1,,αn\alpha_1,\ldots,\alpha_n. Then {Uα1,,Uαn}\{U_{\alpha_1},\ldots,U_{\alpha_n}\} is a finite subcover (of the original cover) of KK in XX, as desired.

    • Backward direction: Now we will assume compactness in XX and show compactness in YY. So we'll start with what kinds of sets? What kind of cover? We should start with an open cover of KK in YY for this direction of the proof. So consider an open cover {Vα}\{V_\alpha\} of KK in YY. So now we want to show that there is a finite subcover. The argument here is very similar. I start with a bunch of sets like EE covering KK in YY, and I want to find a finite subcover. What should I do? Well, by the theorem

      Theorem. Suppose YXY\subset X. A subset EE of YY is open relative to YY if and only if E=YGE=Y\cap G for some open subset GG of XX.

      we are saying that every element of the cover {Vα}\{V_\alpha\} corresponds to a bigger GG that's open in the bigger space XX. That's an open cover. It has a finite subcover. And now restrict to get sets like EE, and that's a finite subcover of the original cover.

      More precisely, by the theorem relisted above, there exists open UαU_\alpha such that UαY=VαU_\alpha\cap Y=V_\alpha. Then {Uα}\{U_\alpha\} cover KK in XX so there exists a finite subcover {Uα1,,Uαn}\{U_{\alpha_1},\ldots,U_{\alpha_n}\}. Then {Vα1,,Vαn}\{V_{\alpha_1},\ldots,V_{\alpha_n}\} are a finite subcover of {Vα}\{V_\alpha\} for KK in YY. This is good enough for a sketch of the argument, but there are a few things to check. If someone really pressed you, then you might still want to explain why {Uα}\{U_\alpha\} still covers KK in XX.

    So what's the moral of the story here? The moral of the story is compactness is an intrinsic property of a set. It doesn't depend on what metric space you're embedded in. Just has to be one that contains that set.

  • Motivation for proof that compact sets are closed: Consider a metric space XX and some set KK embedded in XX, where KK is a compact set (it's a compact car!) and qq represents an arbitrary point in KK while pp represents an arbitrary point in XX that is not in KK (so just an arbitrary point outside of KK), and we want to show that KK is closed.

    How are we going to show that KK is closed? What's one way we could try to do this? When is a set closed? A set is closed when it contains all its limit points or, alternately, a set is closed if its complement is open. Which of those characterizations might be most helpful here? Complements are open! Why might that be more helpful in this context where we are dealing with the definition of a concept like compactness? Because it's talking about open covers! So let's try that strategy.

    We are going to take any point outside of the set KK and show that there is a ball around it, a neighborhood around it, that misses the car. That's our goal. Why is that our goal? Well, we want to show that KcK^c is an open set. What is an open set? (With what follows we will use KcK^c instead of EE to more clearly illustrate what we are trying to show in this proof.) A set KcK^c is an open set if every point of KcK^c is an interior point. What's an interior point? A point pp is an interior point of KcK^c if there is a neighborhood NN of pp such that NKcN\subset K^c. It should be clear now that if we can find a neighborhood of pp in the picture such that this neighborhood misses all of KK then we will be done because pp is an arbitrary point of KcK^c; that is, if we can show that KcK^c is an open set by showing that each pp is an interior point, then we will have shown that KK is closed, the desired conclusion.

    Let's return to our picture:

    How can I produce a neighborhood or open set (recall that all neighborhoods are open sets) around pp such that it misses the car? To "miss the car" KK we kind of need to know something about the points that make up KK. Let qq denote an arbitrary point of KK. Then the notion of constructing a neighborhood around pp such that it misses the car will necessarily involve some idea concerning the distance from the arbitrary point pp in KcK^c to the point qq in KK. Now, when thinking about constructing such a neighborhood around pp, we necessarily think of the distance or radius of such a neighborhood (after all, such a distance is the defining characteristic of a neighborhood), but instead of thinking about distances from pp you might look at balls or neighborhoods around qq.

    From the picture, it seems to be an agreeable notion that for any particular point q0q_0 in KK we have a predetermined ball such that this ball completely misses a ball for some point in KcK^c. Yes, so let's give it a name. Consider the set around pp that misses qq's ball. Denote this set by UqU_q. And also consider the set around qq that misses pp's ball. Denote this set by VqV_q.

    Now, different qq's will have different balls, and their radii may change based on their proximity to pp. The idea is that for every point qq there are partner sets that separate that point from pp. Call them UqU_q and VqV_q. What should we do now? Use the set of VqV_q's as a cover for KK! Yes, this will be a cover. So what? Since KK is compact, there is a finite subcover. If we have a finite subcover, then what this means here is that we have a finite number of these balls for KK and also a finite number of these balls for KcK^c (i.e., partners). You could take the one of minimum distance. Why does that minimum have to be bigger than zero? Why does it have to exist? There are now finitely many distances we are talking about! Why does it have to be bigger than zero? Because it was bigger than zero to begin with.

    The punchline is that now we've used finiteness. We basically have finiteness where we didn't have it before. That's what we mean when we say that compact sets are the next best thing to being finite. We are actually appealing to finiteness here. Okay, so let's give the proof now that motivation has been properly given.

  • Compact sets are closed: Clearly we are talking about compact sets being closed in a metric space, but why is this true? Let KK be compact, and consider p∉Kp\not\in K. We want to show that pp has a neighborhood that does not intersect KK. That's the same as showing that pp is not a limit point of KK which would also show that any point that's not in it is not a limit point so KK contains all its limit points or it's the same as showing that the complement of KK is open. Either way, we are done if we can do this. (So pp is interior to KcK^c\ldots if this is true for all pp then KcK^c is open.)

    For any qKq\in K, let Vq=Nr/2(q)V_q=N_{r/2}(q), and let Uq=Nr/2(p)U_q=N_{r/2}(p), where r=d(p,q)r=d(p,q). Note that {Vq}\{V_q\} are an open cover of KK. By compactness of KK, there exists a finite subcover {Vq1,,Vqn}\{V_{q_1},\ldots,V_{q_n}\}. What should we do with the UU sets? We should look at their partner sets. Then let W=Uq1Uq2UqnW=U_{q_1}\cap U_{q_2}\cap\cdots\cap U_{q_n}, where WW is the intersection of finitely many things. Since WW is the intersection finitely many open sets, then WW itself is open, and WW is a ball of radius of mind(p,qi)\min d(p,q_i). So what do we claim about WW? We have a bunch of partner sets, and the smallest one is the one we're interested in. So the claim is WVqi=W\cap V_{q_i}=\emptyset for each ii. Why? Because WUqiW\in U_{q_i}, and UqiVqi=U_{q_i}\cap V_{q_i}=\emptyset. We are done because WW is the desired neighborhood.

  • Recap of proof of compact sets being closed: The amazing idea used in the proof is that we can separate pp from each point; there are infinitely many points, but that's where compactness comes in. It's a beautiful idea. So we now know that if a set is compact then it must be closed.

  • A consequence of compact sets being closed: An easy consequence of the observation that compact sets are closed is that the open interval (0,1)(0,1) is not compact. We've already seen an open cover that doesn't have a finite subcover (i.e., concentric things getting bigger and bigger). But now we can see from this theorem that it's also clearly not compact. If it's going to be compact, then it has to be closed. What else can we say about the relationship between compact sets and closed sets? Compact sets are closed, but are closed sets necessarily compact? No? Give me an example. How about the entire real line in the real line? It's not compact because it's not bounded. So notice that R\R (in R\R) is not compact because it is not bounded even though it is closed. So closed sets are not necessarily compact. What about [0,)[0,\infty)? It's closed, but it's not compact because it's not bounded either. Are closed and bounded sets compact? Not necessarily in every metric space! But it is true in R\R! This result is known as the Heine-Borel theorem. Interesting aside question: Given some arbitrary set JJ, is it possible to make JJ a compact set by finding an appropriate metric space XX for which we are not dealing with a pseudometric? Okay, so closed sets are not necessarily compact, but here's one thing we can say (and this leads up to the Heine-Borel theorem): A closed subset BB of a compact set KK is compact.

The Heine-Borel theorem

How might we set ourselves up well for the proof of the Heine-Borel theorem?

  • Closed subsets of compact metric spaces: We showed compact sets are closed, but now we are addressing the question of whether or not closed sets, in particular cases, are compact because they're not necessarily compact in general (as was seen above), but one instance where we can say they are compact is if we take a closed subset of a compact set. Let's prove this: A closed subset BB of a compact set KK is compact.

    Consider some compact set KK with BB as a closed subset of KK such as the following:

    The claim is then that BB is compact. This is another fun argument with compactness. So, we want to show BB is compact. Which means we should start with an open cover of what? We should start with an open cover of BB! The temptation is to start with an open cover of KK, but that is a mistake. We will need to use the fact that KK is compact at some point certainly, but our goal is to show that BB is compact from this. (And we know that BB has an open cover because BB is a subset of KK, and KK is already known to have an open cover\ldots but which one should we use? That's a question addressed below.) So let's start with an open cover of BB. Let {Uα}\{U_\alpha\} be an open cover of BB. So here's an open cover of BB by sets here:

    Of course, there could be many more sets involved in this open covering, but the above suffices. Now we want to find a finite subcover of BB using this collection {Uα}\{U_\alpha\}. How can we do that? What do we know? We know KK is compact. So if we're going to use the fact that KK is compact, then I'm going to need to have an open cover of KK. Certainly, if we want to find an open cover of KK, then there must be some relationship with the sets {Uα}\{U_\alpha\}. So let's use our sets {Uα}\{U_\alpha\} which don't necessarily cover all of KK. So what should we do? Add more sets perhaps. Now, would you agree that if we add more sets, then it might be a bad thing to add infinitely many sets? Because then when you take the finite subcover you might not get any of the original sets {Uα}\{U_\alpha\}. So can we see an open set or sets that cover(s) the things that we have missed? Here is a hint: BB is closed. How is this helpful? The sets {Uα}\{U_\alpha\} cover BB, and we need something or some things to cover everything outside. I know that BB is closed. Therefore, BcB^c must be open, and what does this do? It covers everything outside of BB! So BcB^c is everything outside of BB, possibly more than KK, but that's okay, we don't have a problem with that:

    Everything enclosed with horizontal dashes represents BcB^c in the figure above. (Note how the dashes go through the open sets that cover BB but do not cut across BB itself.) Since BB is closed, we know BcB^c is open, and the question is whether or not we have an open cover of KK now. Yes. And KK is compact. Therefore, KK has an open cover.

    Right now we have that {Uα}\{U_\alpha\} is an open cover of BB and that BcB^c is open (because BB is closed). So {Uα}{Bc}\{U_\alpha\}\cup\{B^c\} is an open cover of KK. Therefore, by compactness, there exists a finite subcover of KK, namely the collection {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\}, where we throw in BcB^c as a safety precaution (throwing BcB^c into the collection does not change the finiteness requirement of the subcover). Recall the open covering of BB we had at the beginning:

    If this open covering covered all of KK as well, then BcB^c might not be needed in our collection {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\}, but otherwise it's BcB^c together with some things of {Uα}\{U_\alpha\}. So right now we have that {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\} is a finite subcover of the cover {Uα}{Bc}\{U_\alpha\}\cup\{B^c\}, where BcB^c may or may not be needed in {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\}, but its inclusion or exclusion does not effect the finiteness condition so we include it anyway. Is the collection {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\} a finite subcover of the original open cover {Uα}\{U_\alpha\} of BB? If so, then we are done. If not, then we will need to do some more work. Well, {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\} may not be a finite subcover of {Uα}\{U_\alpha\} because it may have BcB^c in it. So what can we do? Well, BcB^c is not covering BB anyway so it's not necessary for BB. It might be necessary for KK, but it's not necessary for BB. We are now in a place to wrap things up.

    Let {Uα}\{U_\alpha\} be an open cover of BB. Note that BcB^c is open since BB is closed. Thus, {Uα}{Bc}\{U_\alpha\}\cup\{B^c\} is an open cover of KK. By compactness, there exists a a finite subcover {Uα1,,Uαn,Bc}\{U_{\alpha_1},\ldots,U_{\alpha_n},B^c\} of {Uα}{Bc}\{U_\alpha\}\cup\{B^c\}. Note that BcB=B^c\cap B=\emptyset; thus, {Uα1,,Uαn}\{U_{\alpha_1},\ldots,U_{\alpha_n}\} covers BB and is a finite subcover of the original cover {Uα}\{U_\alpha\} of BB.

  • Recap of proof for compactness of closed subsets of compact sets: What have we shown? We've shown that if you consider a "small set" (i.e., a compact set) and take a subset of this small set, then this subset is also a "small set" (i.e., the subset of a compact set is also compact). What else can we say about compact sets?

  • Corollary of proof: If you have a closed set FF and a compact set KK, not necessarily related, in a metric space XX, then the intersection FKF\cap K is compact. Why is this a simple corollary? Well, if KK is compact, then KK is closed. Hence, FKF\cap K is closed because FF and KK are both closed. But FKF\cap K is then a closed subset of a compact set and is therefore compact.

  • Lemma for Heine-Borel Theorem (nested interval property): We want to show, in the Heine-Borel theorem, that closed and bounded subsets of the real line are compact. To do that, we first need to show that closed intervals are compact, which we have not done yet. So we need to do that. And to do that, we need the nested interval theorem.

  • Nested interval theorem: The intersection of nested closed intervals in R\R are not empty. (The same fact will be true in Rk\R^k is we replace "intervals" with kk-cells, which may be thought of as closed boxes in many senses.) We can imagine we have In=[an,bn]I_n=[a_n,b_n], where by nested we mean

    if m>n then anambmbn for n,mN\text{if $m>n$ then $a_n\leq a_m\leq b_m\leq b_n$ for $n,m\in\N$}

    and I1I2I3I_1\supset I_2\supset I_3\cdots. The idea is that there exists a point in all (i.e., the intersection) of the closed intervals. How do we know there exists such a point? What's a possibly good candidate to consider? What if we start to consider a1,a2,a3a_1,a_2,a_3, and so on? How about a supremum for the aia_i? Why does such a supremum have to exist? Because we have a bunch of real numbers! We're definitely upper bounded by b1b_1.

    Let x=sup{ai}x=\sup\{a_i\}, which exists because they are bounded by b1b_1. So we have a candidate and it exists. Why must xx be in all of these intervals? Is it clear that xx is at least bigger than all the {ai}\{a_i\}? Yes! It's the supremum. So, clearly we have xaix\geq a_i for all ii because xx is the supremum. Why is xx less than all the bb's? We have to be a little more careful here. Why does xx have to be less than, say, b52b_{52}? We claim xbnx\leq b_n for all nn because bnb_n is an upper bound for all ana_n by the equation above. So what are we saying? You give me any bb, I claim it is bigger than every aa, and the reason is you give me any bb like bnb_n it's bigger than aa because, for example, b52b_{52} is bigger than a52a_{52}. If you want to show, for instance, that b52b_{52} is bigger than a100a_{100}, then all you have to do is appeal to the equation above and note that a100b100b52a_{100}\leq b_{100}\leq b_{52}. And we can do that for any nn, and that is enough to conclude the proof. This is such an important concept that it is even powerful enough to prove that R\R is uncountable, a task you may recall took quite a bit of effort to do previously.

  • Uncountability of the reals using the nested interval theorem: Suppose R\R is countable; that is, list R\R as a sequence: R={x1,x2,x3,}\R=\{x_1,x_2,x_3,\ldots\}. Se we can list out the xix_i on the real line in no particular order. They could be hopping around. Well, you cannot stop me from choosing an interval I1I_1 that misses x1x_1. Then we will choose another interval, I2I_2, such that I2I_2 is in I1I_1 (i.e., I1I2I_1\supset I_2) but I2I_2 misses both x1x_1 and x2x_2. (Clearly I2I_2 will miss x1x_1 since I2I1I_2\subset I_1 and I1I_1 already missed I2I_2.) We could continue this process indefinitely, where we would have a nested sequence of intervals such that each interval IiI_i missed the real number xix_i. However, by the nested interval theorem, the intersection of all IiI_i is nonempty; thus, there exists a point in the intersection of all the IiI_i that is not on the original list for R\R, a clear contradiction to how we have constructed the intervals IiI_i. More concisely, there exists xInx\in\bigcap I_n such that x∉Rx\not\in\R. This concludes the proof.

    Where's the hard work done in the proof above? In the previous proof for the uncountability of R\R, we expended a fair amount of effort, but the above looks fairly painless. So where was the hard work done? It's in all the machinery we built up for suprema and other such facts. Next time we will prove the Heine-Borel theorem characterizing compact sets in Euclidean space.