94

I feel really ignorant in asking this question but I am really just don't understand how a compact set can be considered closed.

By definition of a compact set it means that given an open cover we can find a finite subcover the covers the topological space.

I think the word "open cover" is bothering me because if it is an open cover doesn't that mean it consists of open sets in the topology? If that is the case how can we have a "closed compact set"?

I know a topology can be defined with the notion of closed sets rather than open sets but I guess I am just really confused by this terminology. Please any explanation would be helpful to help clear up this confusion. Thank you!

InsigMath
  • 2,153
  • 12
    You are confusing the definitions. A compact set is not an open cover! So why can't a compact set be closed. Actually any compact set is closed in a Hausdorff Topological space and so in metric spaces – Nameless Nov 18 '12 at 18:27
  • 14
    First of all, the open and closed are not opposites of each other. – Hagen von Eitzen Nov 18 '12 at 18:32
  • Thank you for your answer... I guess I am just confused by the definition given in the text (by Munkres) which says "A space X is said to be compact if every open covering A of X contains a finite subcollection that also covers X" which makes it sound like all the elements of the subcover has to be open subsets of X and if that's the case than it makes me think that by construction a compact space is open. – InsigMath Nov 18 '12 at 18:33
  • 15
    @InsigMath The elements of the subcover have to be open subsets of $X$, you are correct. They may, however, cover more than just the compact set. Think of a blanket covering a bed. It may hang over the edges and drape onto the floor, covering more than just the bed. See Brian's answer for more on this. – Austin Mohr Nov 18 '12 at 18:35
  • 1
    Also may be of interest: Heine-Borel Theorem. –  Sep 12 '16 at 22:51

7 Answers7

104

I think that what you’re missing is that an open cover of a compact set can cover more than just that set. Let $X$ be a topological space, and let $K$ be a compact subset of $X$. A family $\mathscr{U}$ of open subsets of $X$ is an open cover of $K$ if $K\subseteq\bigcup\mathscr{U}$; it’s not required that $K=\bigcup\mathscr{U}$. You’re right that $\bigcup\mathscr{U}$, being a union of open sets, must be open in $X$, but it needn’t be equal to $K$.

For example, suppose that $X=\Bbb R$ and $K=[0,3]$; the family $\{(-1,2),(1,4)\}$ is an open cover of $[0,3]$: it’s a family of open sets, and $[0,3]\subseteq(-1,2)\cup(1,4)=(-1,4)$. And yes, $(-1,4)$ is certainly open in $\Bbb R$, but $[0,3]$ is not.

Note, by the way, that it’s not actually true that a compact subset of an arbitrary topological space is closed. For example, let $\tau$ be the cofinite topology on $\Bbb Z$: the open sets are $\varnothing$ and the sets whose complements in $\Bbb Z$ are finite. It’s a straightforward exercise to show that every subset of $\Bbb Z$ is compact in this topology, but the only closed sets are the finite ones and $\Bbb Z$ itself. Thus, for example, $\Bbb Z^+$ is a compact subset that isn’t closed.

It is true, however, that compact sets in Hausdorff spaces are closed, though a bit of work is required to establish the result.

Brian M. Scott
  • 631,399
  • Hey Brian since I have your attention a little bit... can you also explain the notion of a compact subspace. I know subspace is a subset of a topological space which has the subspace topology induced by it but I guess I am having trouble visualizing what a compact subspace really means. Thank you for any help you can give me. – InsigMath Nov 18 '12 at 18:48
  • 3
    @InsigMath: ‘$Y$ is a compact subspace of $X$’ simply means that $Y$ is a subspace of $X$, and with the subspace topology $Y$ is a compact space. This is equivalent to saying that $Y$ is a compact subset of $X$ that we happen now to be looking at as a space in its own right with the subspace topology that it inherits from $X$. – Brian M. Scott Nov 18 '12 at 18:50
  • To add a simple example of a compact subspace that is not closed in the ambient space, consider a space $X$ that is not Hausdorff. Then for any point $x\in X$, the subspace ${x}$ is compact but is not necessarily closed. – Mahdi Majidi-Zolbanin Feb 26 '24 at 16:33
  • @MahdiMajidi-Zolbanin: To ensure that there is at least one $x\in X$ such that ${x}$ is not closed, you need to require that $X$ not even be $T_1$. – Brian M. Scott Feb 27 '24 at 00:17
  • It's important to draw a distinction between compact subset and compact space. The term "compact set" is a bit ambiguous; it also doesn't help that Wikipedia puts the definitions of right next to each other so it's easy to mix them up. – Rufflewind Jul 21 '24 at 12:26
  • @Rufflewind: What is actually important is to understand that a compact subset is simply a compact space that we happen to be seeing embedded in some ambient space. Every compact subset of any space is a compact space in its own right when given its subspace topology, and every compact space is a compact subspace of any space in which it happens to be embedded. There is no ambiguity in my use of compact set. – Brian M. Scott Jul 21 '24 at 22:48
  • I appreciate the explanation. For a reader new to this subject it would be great to explicitly call out these equivalences. It was not obvious to me that the half-open interval (½, 1] is actually open relative to the subspace topology of [0, 1] in ℝ. – Rufflewind Jul 22 '24 at 01:49
  • @Rufflewind: That kind of recognition gets easier with practice (and in the case of subsets of $[0,1]$ is likely to become pretty automatic, since both $\Bbb R$ and its subspace $[0,1]$ occur so frequently). – Brian M. Scott Jul 22 '24 at 02:22
  • "That kind of recognition gets easier with practice" I think you are missing my point. This is not about me. I am advising that you amend your answer with this insight for the benefit of future readers. – Rufflewind Jul 23 '24 at 04:57
  • @Rufflewind: (Ah, okay: your it was not obvious to me was referring to some time in the past, not to the present discussion.) It seems to me that the answer and the first two comments under it cover everything, and I do expect people at least to glance at comments when using an answer, especially if they have any questions, so I don’t actually see much need to modify the answer, but I’ll think about it. – Brian M. Scott Jul 23 '24 at 18:52
91

For anyone who comes across this question in the future, here is a proof:

Theorem: Compact subsets of metric spaces are closed.

Proof: Let $K$ be a compact subset of a metric space $X$ and to show that $K$ is closed we will show that its complement $K^c$ is open.

Let $p \in K^c$. Now if $q_\alpha \in K$, let $r_\alpha = \frac{1}{2}d(p,q_\alpha)$ and we will denote the neighbourhood of radius $r_\alpha$ around $q_\alpha$ to be $B_{r_\alpha}(q_\alpha) = \{x \in X \mid d(q_\alpha,x) < r_\alpha\}$ and the neighbourhood of radius $r_\alpha$ around $p$ to be $B_{r_\alpha}(p) = \{x \in X \mid d(p,x) < r_\alpha\}$. Then the collection of open sets $\{B_{r_\alpha}(q_\alpha)\}_\alpha$ is an open cover of $K$. As $K$ is compact there exists a finite subcover of $\{B_{r_\alpha}(q_\alpha)\}_\alpha$ such that

$$K \subset B_{r_1}(q_1) \cup \cdots \cup B_{r_n}(q_n) = U.$$

I now make the following claim:

Claim: $(B_{r_1}(p) \cap \cdots \cap B_{r_n}(p)) \cap U = \emptyset$.

Proof: Assume that $x \in (B_{r_1}(p) \cap \cdots \cap B_{r_n}(p)) \cap U$. Then we must have that $x\in B_{r_i}(p)$ for $1 \leq i \leq n$ and $x\in U$. As $x\in U$, then there exists an $i (1 \leq i \leq n)$ such that $x\in B_{r_i}(q_i)$ and, without any loss of generality, we assume $x \in B_{r_1}(q_1)$. In particular, we must also have that $x\in B_{r_1}(p)$. Therefore, by the triangle inequality we have,

$$d(p,q_1) \leq d(p,x) + d(x,q_1) < r_1 + r_1 = d(p,q_1).$$

This however is a contradiction. Therefore, $p \in B_{r_1}(p) \cap \cdots \cap B_{r_n}(p) \subset K^c$ which means that $p$ is an interior point of $K^c$. As $p$ was arbitrary, $K^c$ is open and therefore, $K$ is closed as desired. $_\Box$

Hope this may help someone.

  • 5
    I just want to mention that in fact the idea in @12F8031's answer could be applied to show a stronger result that a compact subset in a Hausdorff space is closed. – ntk Apr 11 '14 at 09:41
  • "Hope this may help someone." Yes this helped me to do my homework. – JobHunter69 Sep 26 '23 at 22:25
45

Compact sets need not be closed in a general topological space. For example, consider the set $\{a,b\}$ with the topology $\{\emptyset, \{a\}, \{a,b\}\}$ (this is known as the Sierpinski Two-Point Space). The set $\{a\}$ is compact since it is finite. It is not closed, however, since it is not the complement of an open set.

Austin Mohr
  • 26,272
8

Every infinite set with complement finite topology is the counterexample. This space is compact, however is not Hausdorff. Let $X=[0,\omega]$ with complement finite topology. Then the space $X\setminus \{\omega\}$ is compact, but it is not closed.

Paul
  • 21,141
2

"By definition of a compact set it means that given an open cover we can find a finite subcover the covers the topological space." ($*$)

I think what confuses you is the difference between "compact subset of a topological space" and "compact space" and also the word "open" in "open cover".

A topological space $(X,\tau)$ is compact, and thus called a compact (topological) space, if for any open cover of $X$ there exists a finite subcover.

An open cover for a topological space $(X,\tau)$ is a family of open subsets $\{U_\alpha:U_\alpha\in\tau, \alpha\in I\}$ such that $$ \bigcup_{\alpha\in I} U_\alpha= X $$ where $I$ denotes some index set.

In the topological space $(X,\tau)$, a subset $A\subset X$ is called compact, if $A$ with the subspace topology is a compact topological space. In your definition ($*$), "the topological space" refers to the subset with the subspace topology. However, there are two different ways to understand "open cover" in (*), which are equivalent. Suppose we are talking about $\{U_\alpha\}_{\alpha\in I}$ being an open cover for $A\subset X$. Then

  • If you understand it as an open cover for topological space $A$, then "open" means open in $A$ (with the subspace topology) and "cover" is understood as "equal" $$ \bigcup_{\alpha\in I}U_\alpha=A\quad U_\alpha \ \hbox{open in}\ A. $$

  • If you understand it as an open cover for the subset $A\subset X$, then "open" means open in $X$ and "cover" should be understand as "contain": $$ \bigcup_{\alpha\in I}U_\alpha\supset A\quad U_\alpha\ \hbox{open in}\ X. $$

When we say a closed compact set $A$ in some topological space $X$, "closed" means "closed in $X$" and $A\subset X$ (with the subspace topology) is a compact topological space. Note that any subset $A\subset X$ is closed with respect to the subspace topology.

0

Here is an alternative proof that compact sets are closed which uses the characterization of compact sets in $\mathbb{R}$:

If $K$ is compact in a metric space, it is closed.

Fix $x\not\in K$. Let us define the function $g:y\rightarrow d(y,x)$. Because of the reversed triangle inequality we have continuity!

$$|g(y_1)-g(y_2)|=|d(y_1,x)-d(y_2,x)|\leq d(y_1,y_2)$$ Because this function is continuous, this means that it maps $K$ to $g(K)$ a compact set (in $\mathbb{R}$) which we know to be closed and bounded. This means that the infimum of $g(K)$ is in the set and it must be attained. Thus, $d(x,k_o)=\inf g(K)$. However, $x\not=k_o$ (because we have taken $x\not\in K$), so $d(x,k_o)=r>0$. Clearly, $B(k_o,r/2)\cap K=\emptyset$, otherwise, there would be points in $K$ closer to $x$ than $k_o$ which is absurd.

Kadmos
  • 3,243
0

Here is an alternative to the proof provided by @Huiwen Zheng above:

Theorem: Compact subsets of metric spaces are closed.

Proof: Let $K$ be a compact subset of a metric space $M$. Let $K'$ be the set of limit points of $K$ in $M$. WLOG $K'$ is non-empty, so let $z \in K'$. Now assume by contradiction that $z \notin K$. Let $A_n = \overline{B_{1/n} (z)}^c$, then $\{A_n : n \in \mathbb{Z}^+\}$ is an open cover of $K$, and since $K$ compact there exist a finite subcover $\{A_{n_1}, \ldots, A_{n_k}\}$. Let $N = \max{\{n_1, \ldots, n_k\}}$, then $K \subseteq A_N$. But then $z \in B_{1/(N+1)}(z) \subseteq A_N^c \subseteq K^c$, which is a contradiction since $z$ is a limit point of $K$. Then we must conclude that $z \in K$, and since $z \in K'$ was arbitrary, $K' \subseteq K$, so $K$ is closed.

martin
  • 85