TITLE: Why is compactness so important?
QUESTION [202 upvotes]: 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.

REPLY [2 votes]: We can think of a closed set in $X$ as being like the locus of $x\in X$ where a continuous function $f(x)$ is $0$.
Now suppose there is a continuous function $f(x,p)$ which depends on a parameter $p$. Under what conditions can we say that the locus of $x$ for which there exists $p$ so that $f(x,p)=0$? The condition is that $p$ various over a compact space.
Put differently, we know that a union of closed sets need not be closed. Under what condition is the union of a parametric family of closed sets closed? With appropriate definitions, if it is a "continuous family" where the parameter space is compact.
In more formal terms: A space $P$ is compact if and only if $X\times P\to X$ is closed for every space $X$.
This can be useful in many contexts. For example, given parametric equations $T^n+a_1(p)T^{n-1}+\dots+a_n(p)=0$, the collection of solutions is a closed set as long as $a_i$'s are continuous functions on a compact set.