# Compact sets are closed?

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!

• 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 Commented Nov 18, 2012 at 18:27
• First of all, the open and closed are not opposites of each other. Commented Nov 18, 2012 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. Commented Nov 18, 2012 at 18:33
• @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. Commented Nov 18, 2012 at 18:35
• Also may be of interest: Heine-Borel Theorem.
– user203509
Commented Sep 12, 2016 at 22:51

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.

• 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. Commented Nov 18, 2012 at 18:48
• @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$. Commented Nov 18, 2012 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. Commented Feb 26 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$. Commented Feb 27 at 0:17

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.

• 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
Commented Apr 11, 2014 at 9:41
• "Hope this may help someone." Yes this helped me to do my homework. Commented Sep 26, 2023 at 22:25

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.

• Bourbaki calls this merely quasicompact and requires Hausdorff for compactness. Maybe just to get rid of such examples. :) Commented Nov 18, 2012 at 18:31

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.

"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.

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.