Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've read many times that 'compactness' is such an extremely important and useful concept, though it's still not very apparent why. The only theorems I've seen concerning it are the Heine-Borel theorem, and a proof continuous functions on R from closed subintervals of R are bounded. It seems like such a strange thing to define; why would the fact every open cover admits a finite refinement be so useful? Especially as stating "for every" open cover makes compactness a concept that must be very difficult thing to prove in general - what makes it worth the effort?

If it helps answering, I am about to enter my third year of my undergraduate degree, and came to wonder this upon preliminary reading of introductory topology, where I first found the definition of compactness.

share|cite|improve this question
Finite subcover. A refinement is something different, used to define weaker related ideas. – dfeuer Sep 6 '13 at 15:32
Essentially, compactness is "almost as good as" finiteness. I can't think of a good example to make this more precise now, though. – Johannes Kloos Sep 6 '13 at 15:36
FireGarden, perhaps you are reading about paracompactness? – Asaf Karagila Sep 6 '13 at 16:39
M. R. Sundström's paper A pedagogical history of compactness may be useful here. It discusses the original motivations for the notion of compactness, and its historical development. If you want to understand the reasons for studying compactness, then looking at the reasons that it was invented, and the problems it was invented to solve, is one of the things you should do. – MJD Sep 6 '13 at 16:47
@dfeuer: The condition of having finite subcover and finite refinement are equivalent. – user87690 Sep 6 '13 at 17:33

12 Answers 12

up vote 80 down vote accepted

As many have said, compactness is sort of a topological generalization of finiteness. And this is true in a deep sense, because topology deals with open sets, and this means that we often "care about how something behaves on an open set", and for compact spaces this means that there are only finitely many possible behaviors.

But why finiteness is important? Well, finiteness allows us to construct things "by hand" and constructive results are a lot deeper, and to some extent useful to us. Moreover finite objects are well-behaved ones, so while compactness is not exactly finiteness, it does preserve a lot of this behavior (because it behaves "like a finite set" for important topological properties) and this means that we can actually work with compact spaces.

The point we often miss is that given an arbitrary topological space on an infinite set $X$, the well-behaved structures which we can actually work with are the pathologies and the rare instances. This is throughout most of mathematics. It's far less likely that a function from $\Bbb R$ to $\Bbb R$ is continuous, differentiable, continuously differentiable, and so on and so forth. And yet, we work so much with these properties. Why? Because those are well-behaved properties, and we can control these constructions and prove interesting things about them. Compact spaces, being "pseudo-finite" in their nature are also well-behaved and we can prove interesting things about them. So they end up being useful for that reason.

share|cite|improve this answer
+1. I particularly like the phrase "finitely many possible behaviors". In every other respect, one could have used "discrete" in place of "compact". Honestly, discrete spaces come closer to my intuition for finite spaces than do compact spaces. However, as you pointed out, compactness is deep; in contrast, discreteness is the ultimate separation axiom while most spaces we're interested in are comparatively low on the separation hierarchy. – Karl Kronenfeld Sep 6 '13 at 21:37
And when one learns about first order logic, gets the feeling that compactness is, somehow, deduce information about an "infinite" object by deducing it from its "finite" (or from a finite number of) parts. By the way, as always, very nice to read your answers. – leo Sep 11 '13 at 3:12
@leo: Thank you for the compliment. – Asaf Karagila Sep 11 '13 at 5:37
@AsafKaragila This seems to be on par with what Qiaochu mentioned here:…, and I think it's a really interesting point of view. I was wondering if you had any nice examples that illustrate that first paragraph? – CC0607 Dec 15 '15 at 1:57

Compactness does for continuous functions what finiteness does for functions in general.

If a set $A$ is finite then every function $f:A\to \mathbb R$ has a max and a min, and every function $f:A\to\mathbb R^n$ is bounded. If $A$ is compact, the every continuous function from $A$ to $\mathbb R$ has a max and a min and every continuous function from $A$ to $\mathbb R^n$ is bounded.

If $A$ is finite then every sequence of members of $A$ has a subsequence that is eventually constant, and "eventually constant" is the only kind of convergence you can talk about without talking about a topology on the set. If $A$ is compact, then every sequence of members of $A$ has a convergent subsequence.

share|cite|improve this answer
See also – sdcvvc Sep 6 '13 at 22:21

Compactness is the next best thing to finiteness.

Think about it this way:

Let $A$ be a finite set, let $f: A \to \mathbb{R}$ be a function. Then $f$ is trivially bounded.

Now let $X$ be a compact set, set $f: X \to \mathbb{R}$ be a continuous function. Then $f$ is also bounded...

share|cite|improve this answer

Compactness is important because:

1)It behaves greatly when using topological operations

a)It's a condition that is carried on by continuous functions on any topological space, that is, if $C$ is compact and $f:C \rightarrow Y$ where $Y$ is a topological space, then $f(C)$ is compact in Y.

b)An arbitrary product of compact sets is compact in the product topology.

2) Compact sets behave almost as finite sets, which are way easier to understand and work with than uncountable pathologies which are common in topology.

Compactness is useful even when it emerges as a property of subspaces:

3) Most of topological groups we face in math every day are locally compact, e.g $\mathbb{R}$, $\mathbb{C}$, even $\mathbb{Q_P}$ and $\mathbb{R_P}$ the p-adic numbers.

4) It is often easier to solve a differential equation in a compact domain than in a non-compact.

5) There are many types of convergence of functions, one of which is convergence in compact set.

6) Regular borel measure, one of the most important class of measures is defined by limits of measures in compact sets.

This list is far from over...

Anyone care to join in?

share|cite|improve this answer
Historically, it led to the compactness theorem for first-order logic, but that's over my head. – dfeuer Sep 6 '13 at 15:44

One reason is that boundedness doesn't make sense in a general topological space. For example $(-1, 1) \subset \mathbb{R}$ is bounded when viewing $\mathbb{R}$ as a metric space with the usual Euclidean metric, but as topological spaces, $(-1, 1)$ and $\mathbb{R}$ really are the same, that is, homeomorphic.

So why then compactness? Well, I suppose part of the motivation is the Heine-Borel Theorem, which says a subset of $\mathbb{R}^n$ is compact if and only if it is closed and bounded; or said another way, a closed set is compact if and only if it is bounded. So, at least for closed sets, compactness and boundedness are the same. This relationship is a useful one because we now have a notion which is strongly related to boundedness which does generalise to topological spaces, unlike boundedness itself. In addition, at least for Hausdorff topological spaces, compact sets are closed. So one way to think about compact sets in topological spaces is that they are analogous to the bounded sets in metric spaces. The analogy here is not exact because the Heine-Borel Theorem only applies to $\mathbb{R}^n$, not every metric space, but hopefully this gives you some intuition.

share|cite|improve this answer

It's already been said that compact spaces act like finite sets. A variation on that theme is to contrast compact spaces with discrete spaces.

A compact space looks finite on large scales. A discrete space looks finite on small scales. A $T_1$ space is finite if and only if it is both compact and discrete. So we have the slogan "compactness = finiteness modulo discreteness".

A locally compact abelian group is compact if and only if its Pontyagin dual is discrete. So we have another slogan, "compactness = Fourier transform of discreteness".

share|cite|improve this answer
Is there a redefinition of discrete so this principle works for all topological spaces (e.g., discrete modulo indistinguishability)? Or of compactness. – zyx Sep 6 '13 at 19:08
@zyx I guess we could loosen the discreteness condition (every point has a singleton neighborhood) by requiring instead that every point has a finite neighborhood. Not sure what this property P should be called... Anyway, a topological space is finite iff it is both compact and P. – Chris Culter Sep 6 '13 at 22:20

I would like to give here a example showing why compactness is important. Consider the following Theorem:

Theorem: Let $f:\mathbb{R}\to \mathbb{R}$ be a continuous coercive function. Then, there exist $x_0\in \mathbb{R}$ such that $$\tag{1} f(x_0)=\inf_{x\in\mathbb{R}}f(x)$$

Proof: Let $I=\inf_{x\in\mathbb{R}}f(x) $ and choose $x_n\in \mathbb{R}$ with $f(x_n)\to I$. We claim that $x_n$ is bounded. Indeed, if $x_n$ was not bounded, then we could extract a subsequence of $x_n$ not relabeld such that $f(x_n)\to \infty$ (by coercivity) which is an absurd. Now, $x_n$ being bounded implies without loss of generality that (compactness) $x_n\to x$. Because $f$ is continuous, we conclude that $f(x_n)\to f(x)=I$.

The main argument of the proof was the fact that the closure of any bounded set in $\mathbb{R}$ is compact. Now consider the problem ($\Omega\subset\mathbb{R}^N$ bounded domain)

$$ \tag{P} \left\{ \begin{array}{ccc} -\Delta u =f&\mbox{ in $\Omega$} \\ u\in H_0^1(\Omega) &\mbox{ } \end{array} \right. $$

We say that $u\in H_0^1(\Omega)$ is a solution of (P) if $$\int_\Omega\nabla u\nabla v=\int_\Omega fv,\ \forall\ v\in H_0^1(\Omega)\tag{3}$$

Let $F:H_0^1(\Omega)\to \mathbb{R}$ be defined by $$F(u)=\frac{1}{2}\int_\Omega |\nabla u|^2-\int_\Omega fu$$

$(3)$ is equivalently to $\langle F'(u),v\rangle =0$ for all $v\in H_0^1(\Omega)$ and this equality is equivalently to find a local minimum of $F$ in $H_0^1(\Omega)$. One can check that $F$ is continuous and coercive, so we could try to use the same argument as above to find a minimum to $F$, but the problem here is lack of compactness, i.e. if $K\subset H_0^1(\Omega)$ is bounded we can't conclude that the closure of $K$ is compact.

Therefore to see how important compactness is, the above problem can be solved by considering a new topology in $H_0^1(\Omega)$, to wit, the weak topology. In this topology we have less open sets which implies more compact sets and in particular, bounded sets are pre-compact sets. It can be show that $F$ is weakly sequentially lower semi continuous, i.e. $F$ is lower sequentially continuous in the weak topoogy, which together with coercivity implis the existence of a minimum.

To conclude,take a look on these examples (they show how worse can be lack of compactnes): here and here.

share|cite|improve this answer
The concept of a "coercive" function was unfamiliar to me until I read your answer; I suspect the same will be true for many readers. If by "coercive" you mean that $\lim_{x \rightarrow \pm \infty} = \infty$, then the fact that a continuous coercive function must attain its minimum value is an exercise that I assign to my honors calculus students: it requires only the extreme value theorem (which of course can be thought of in terms of compactness but need not be, and probably most of us learn it without compactness first). So I'm not sure this is a good example... – Pete L. Clark Sep 18 '13 at 18:39
(The rest of your example is very interesting and strong...if not necessarily accessible to the broadest possible audience who could be interested in the question.) – Pete L. Clark Sep 18 '13 at 18:42
Thank you for your comment @PeteL.Clark. Let me ask you one thing: in my point of view the extreme value theorem (EVT) relies strongly on the fact that the domain is compact, hence this would implie that compactness is important in proving the statement, howerver, even if we do not use this argument, I think that a proof using (EVT) would use compactness. For example, a proof which comes from my head is: write $(-\infty,\infty)=\cup_{i=1}^\infty [-i,i]$. Take the infimum of $f$ in each $[-i,i]$ (which exist because of EVT) and show that this sequence WLOG converge (using compactness) – Tomás Sep 18 '13 at 19:03
Please, could you detail more your point of view to me? – Tomás Sep 18 '13 at 19:03
To prove your theorem without it: since $\lim_{x \rightarrow \pm \infty} f(x) = \infty$, there is some $M > 0$ such that $f(x) > f(0)$ for all $x$ with $|x| > M$. Thus the minimum value of $f$ on $[-M,M]$ is its minimum value on all of $\mathbb{R}$. – Pete L. Clark Sep 18 '13 at 19:37

Well, here are some facts that give equivalent definitions:

  1. Every net on a compact set has a convergent subnet.

  2. Every ultrafilter on a compact set converges.

  3. Every filter on a compact set has a limit point.

  4. Every net in a compact set has a limit point.

  5. Every universal net in a compact set converges.

Here are some more useful things:

  1. Every continuous bijection from a compact space to a Hausdorff space is a homeomorphism.

  2. Every compact Hausdorff space is normal.

  3. The image of a compact space under a continuous function is compact.

  4. Every infinite subset of a compact space has a limit point.

share|cite|improve this answer

Simply put, compactness gives you something to work with, this "something" depending on the particular context. But for example, it gives you extremums when working with continuous functions on compact sets. It gives you convergent subsequences when working with arbitrary sequences that aren't known to converge; the Arzela-Ascoli theorem is an important instance of this for the space of continuous functions (this point of view is the basis for various "compactness" methods in the theory of non-linear PDE). It gives you the representation of regular Borel measures as continuous linear functionals (Riesz Representation theorem). Etc.

share|cite|improve this answer

If you have some object, then compactness allows you to extend results that you know are true for all finite sub-objects to the object itself.

The main result used to prove this kind of thing is the fact that if $X$ is a compact space, and $(K_\alpha)_{\alpha\in A}$ is a family of closed sets with the finite intersection property (no finite collection has empty intersection) then $(K_\alpha)$ has non-empty intersection. For if $(K_\alpha)$ has empty intersection then the complements of the $K_\alpha$ form an open cover of $X$, which then has to have a finite subcover $(X\setminus K_{\alpha(i)})_{i=1}^n$, and so the $(K_{\alpha(i)})_{i=1}^n$ is a finite collection of the $K_\alpha$ with empty intersection.

For example, the De Bruijn-Erdős Theorem in graph theory states that an infinite graph $G$ is $n$-colourable if all its finite subgraphs are $n$-colourable (i.e., you can colour the vertices with $n$ colours in such a way that no two vertices connected by an edge are the same colour). You can prove this by noting that the space $X$ of all colourings of the vertices of $G$ with $n$ colours (for which vertices of the same colour may share an edge) is a compact topological space (since it is the product of discrete spaces). Then, for each finite subgraph $F$, let $X_F$ be the set of all colourings of $G$ that give an $n$-colouring of $F$. It can be checked that the $X_F$ are closed and have the finite intersection property, so they have non-empty intersection, and any member of their intersection must $n$-colour the whole of $G$.

In general, if you have some property that you know is true for finite sub-objects, then you can often encode that in a collection of closed sets in a topological space $X$ that have the finite intersection property. Then, if $X$ is compact, you can show that the closed sets have non-empty intersection, which normally tells you that the result is true for the object itself (sorry that this is all so imprecise!)

A very closely-related example is the compactness theorem in propositional logic: an infinite collection of sentences is consistent if every finite sub-collection is consistent. This can be proved using topological compactness, or it can be proved using the completeness theorem: if the collection is inconsistent, then it must be possible to derive a contradiction using finitely many finite statements, so some finite collection of sentences must be inconsistent. Either way you look at it, though, the compactness theorem is a statement about the topological compactness of a particular space (products of compact Stone spaces).

share|cite|improve this answer

I want to elaborate Sargera's and Tomás' theme.

Topological considerations are great, but to me the examples are not as concrete as for when we speak of "sequential compactness" (which unfortunately in general topologies does not equate to compactness, but includes for example weak/weak* compactness).

In this situation, for practical purposes, all I want to know about topologically for a given setting is, given a sequence of points in my space, define a notion of convergence. Give me the definition of convergence to play with, and we can talk about sequential compactness. For sequential compactness of a set, we ask: "Given an arbitrary sequence in the set, does there exist a convergent subsequence?"

In general, the usefulness of this is that often we want to find a function with some property $P$, but we can only find functions with property $P_n$, which is close to $P$ as $n$ gets larger, and taking a limit as $n \to \infty$ would get property $P$. (In Tomás' example, $P_n$: "functions that achieve objective value within $1/n$ of the infimum", and $P$: "function that achieves infimum"). However, the functions satisfying property $P_n$ may not converge as we take $n$ to $\infty$, so we would not be able to take a limit of the function sequence. If the set of functions is sequentially compact (with respect to whatever notion of convergence we are working with), we can take a subsequence that converges and obtain the desired function satisfying property $P$!

(Replace function in previous part by point in set, and we can talk about other things like measures, $\mathbb{R}^N$, etc... it's just so often I am applying this to functions or measures. In probability they use the term "tightness" for measures)

Hmm.. one caveat for the above: for the notion of convergence being used, one would have to prove that the convergence preserves the property, or the property is continuous with respect to the notion of convergence. So in Tomás' example again, weak convergence is still good enough to obtain the minimizer. I think it's a great example because it motivates the study of weaker notions of convergence. Note that we need weak convergence in that example (the PDE example with $H^1$) because it is infinite dimensional, and it is not true that the feasible set of the optimization problem is compact under the usual norm-convergence.

share|cite|improve this answer

Every continuous function is Riemann integrable-uses Heine-Borel theorem. Since there are a lot of theorems in real and complex analysis that uses Heine-Borel theorem, so the idea of compactness is too important.

share|cite|improve this answer
Perhaps you could improve this Answer by adding further specific examples of "theorems in real and complex analysis that [use] Heine-Borel theorem", or by explaining how proving continuous $\implies$ Riemann integrable makes use of it. – hardmath Mar 16 '14 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.