# Does a compact subspace need to be closed?

Is $(0,1)$ not compact in the real line ? It has been mentioned in Wikipedia that open intervals of real line are not compact. If not then why.

-
The title should summarize the question. Your title poses a completely different question than the body. –  joriki Aug 27 '12 at 6:14

Open intervals of $\mathbb{R}$ are not compact. Suppose $(a,b)$ is an open interval. Find two sequences, $(a_n)$ and $(b_n)$ such that $a_n > a_{n + 1}$ and $b_n < b_{n + 1}$ for all $n$, and $\lim_{n \rightarrow \infty} a_n = a$ and $\lim_{n \rightarrow \infty} b_n = b$. Then $\bigcup_{n} (a_n ,b_n)$ is a cover of $(a,b)$ which has no finite subcover.

By the Heine-Borel Theorem for $\mathbb{R}$, the compact subsets are characterized exactly by the closed and bounded subsets. In arbitrary metric spaces, all compact subsets are closed and bounded. However, there are closed and bounded subsets that are not compact. (Note that boundedness is not a topological property. For any metric space $X$, there exists a metric which induces that same topology in which $X$ is bounded.)

Compact subspace of Hausdorff Spaces are necessarily closed. These include metric space like $\mathbb{R}$. However, there are topological spaces where compact subsets are not closed. For example let $X = \{0,1\}$, the two point set. Let $\mathscr{T} = \{\emptyset, X\}$ be the topology on $X$. $\{0\}$ is not closed; however, it is clearly compact. (In fact there are only finitely many open sets in this topology.)

-
Why do you insist using rational points? What's wrong with $\left(a+\frac{1}{n},b-\frac{1}{n}\right)$ for example? –  Ido Aug 27 '12 at 7:23
@Ido I took out the rationals. It works, but not quite necessary. –  William Aug 27 '12 at 7:44

On the real line, sets are compact if and only if they are closed and bounded. (Check out Heine-Borel)

-

No, $(0,1)$ is not compact. The open cover consisting of the intervals $(1/(n+2),1/n)$ for all $n\in \mathbb N$ has no finite subcover.

-

Use the definition of compactness. A space is compact if every open cover has a finite subcover. If we can produce an open covering without a finite subcover, this will show the space is not compact.

Note that in the subspace topology, the open sets in $(0,1)$ are the usual open sets. Then the sets $(1,1/3)$, $(1/2,1/4)$,...,$(\frac{1}{n},\frac{1}{n+2})$ are open and cover the line. But no finite number of them suffice. To see this, assume we have a finite cover, and choose the interval with the smallest endpoint. Let this be $1/k$. Then $1/2k\in(0,1)$ is not covered by this subcover.

-

Compact subsets of any metric space are closed, so especially this applies to $\mathbb{R}$ with the Euclidean metric.

Most of the answers have suggested an argument by using open covers, but since in a metric space compactness and sequential compactness coincide then here's something useful you can do with sequences here too.

It is quite straightforward to show that any compact set in a metric space is closed. Let $(X,d)$ be a metric space and $C\subset X$ a compact subset. If $C=\emptyset$ then $C$ is closed, if not then choose $x\in \mathrm{cl}(C)$. Take $x_{n}\in B(x,\frac{1}{n})\cap C$ for all $n\in\mathbb{N}$ (such $x_{n}$ exists since $x$ is in the closure of $C$), whence $x_{n}\to x$ and $(x_{n})\subset C$. Since $C$ is compact we find a subsequence $(x_{n_{k}})$ that converges to some $y\in C$. Since $(x_{n_{k}})$ is a subsequence of a converging sequence $(x_{n})$, then their limits must be equal, i.e. $x=y\in C$, which shows that $\mathrm{cl}(C)\subset C$, i.e. $\mathrm{cl}(C)= C$ and furthermore $C$ is closed.

Now for your $(0,1)$, take $x_{n}=\frac{1}{n}$ for all $n\geq 2$. Then $x_{n}\to 0$ and $(x_{n})\subset (0,1)$, and for any subsequence $(x_{n_{k}})$ we also have $x_{n_{k}}\to 0$. Since $0\notin (0,1)$, then $(x_{n})$ has no convergent subsequences in $(0,1)$, which shows that $(0,1)$ is non-compact.

-