Open sets and compact spaces

I am reading through Rudin's Principles of Mathematical Analysis and had a few related questions.

First, Rudin defines an open set, $E$, as a set such that every point is an interior point. A point is an interior point if there is a neighborhood, $N \subset E$ that contains the point. This neighborhood depends on a metric. So in this book (at least so far), open sets are only considered in metric spaces. But open sets need not depend on a metric.

Now Theorem 2.34 says that compact subsets of metric spaces are closed and Theorem 2.35 says that closed subsets of compact sets are compact. I understand and agree with both of these proofs, but was wondering a bit about Theorem 2.35. Obviously, in a metric space an open subset of a compact set is not compact by Theorem 2.34.

My question is: Under what conditions is an open subset of a compact set compact? I don't know much topology, but are there some easy examples, or is this not possible?

• Open sets in a metric space CAN be compact. They just also have to be closed. The closed interval as a subset of itself is open, and also compact. – Callus May 26 '15 at 15:33
• I would like to point out in this comment that the notion of an interval as a subset of itself equips it with some additional structure, which I don't know if you are familiar with, called the 'subspace topology' in which a set is open iff it is open on intersection with the subspace. So to see the closed interval as a subspace of itself is open, consider the whole space, and intersect it. The whole space is open, and so their intersection is open in the subspace topology. – Alfred Yerger May 26 '15 at 15:37

Recall that a set is compact if and only if it is complete and totally bounded. A metric space is a Hausdorff space, so compact sets are closed. Therefore a compact open set must be both open and closed. If $X$ is a connected metric space, then the only candidates are $\varnothing$ and $X$. For example, if $X\subset\mathbb R^n$ then $X$ is open and compact (in the subspace topology) if and only if $X$ is bounded. However, if $X$ is disconnected, then proper subsets can be open and compact. For example, if $X=[0,1]\cup [2,3]$, then $[0,1]$ and $[2,3]$ are compact open sets in $X$.
Another example is any finite set $X=\{x_1,\ldots,x_n\}$ (regardless of the metric). For if $U_\alpha$ is an open cover of $X$, then for each $j$ there is $\alpha_j$ such that $x_j\in U_{\alpha_j}$ for each $j$, so $\{U_{\alpha_1}, \ldots, U_{\alpha_n}\}$ is a finite subcover.
If your compact space has several connected components, then each of them is simultaneously open and closed; being closed subsets of a compact space, they are compact. A concrete example: the connected components of $O(n)$.
• What is meant by $O(n)$ here? – Ebearr May 26 '15 at 16:34
• The orthogonal group of $\mathbb R ^n$. – Alex M. May 26 '15 at 16:41