# Understanding compactness of metric spaces

I have been studying a basic course in metric spaces. I really get confused whenever the notion of compactness arrives. I know that any subset of $\mathbb{R}^n$ is compact iff it is closed and bounded. Is this theorem true for any arbitrary metrics defined on space or is it true only under the metric induced from $\mathbb{R}^n$? I am really sorry if the question is of too low standard as per standards of maths stackexchange.

• No, that's something special. It's not only in $\mathbb{R}^n$ (with the Euclidean metric) that all closed and bounded subsets are compact, but it's something very special. – Daniel Fischer Oct 3 '16 at 12:33
• could you please elaborate the answer. – Abhishek Shrivastava Oct 3 '16 at 13:03

## 1 Answer

The general definition is via open covers, this remains valid in any topological space: A metric space $X$ is compact, if any open cover of $X$ has a finite subcover. In other words, if you take any collection of open sets $\mathcal{U} \subset \mathcal{P}(X)$ s.t. $\cup \mathcal{U} =X$ there is a finite set $F \subset \mathcal{U}$, such that $\cup F = X$.

Let me share some of my personal heuristics on this: Compact sets are "small" in a very specific sense. A metric space $X$ is compact if and only if it is sequentially compact (in the context of real numbers, this is Bolzano–Weierstrass theorem). This means that if you take any countable set of points $(x_n)$ in a compact metric space $X$, they will inevitably stack around a point in $X$. I like to think that there is no room in the set $X$ to spread an infinite number of points to the set in a way that they would not stack anywhere. In this sense e.g. the unit ball in the sequence space $l^2$ is not small, since you can put an infinite number of points there that are a constant $c > 0$ away from each other.

Hope this helps.

• Might help to show that in $\ell^2$, the unit ball in question is closed and bounded. +1 – Andres Mejia Oct 3 '16 at 13:01
• @Matias Heikkilä thanks for your answer, i know that the notion of closeness between points in a space will exactly depend on the metric defined on it and therefore you have given me an idea of what compactness actually means,but,my question is: does heine borel theorem on $R^n$ applies on the space equipped with any metric space?? – Abhishek Shrivastava Oct 3 '16 at 13:02
• It does not. For example the closure of the unit sphere $B$ in $l^2$, which is clearly closed and bounded, is not compact. Take any orthonormal basis $\left\{ e_i \right\}$ for $l^2$. The sequence $x_n = e_n$ satisfies $d(x_i, x_j)=1$ for all $i \neq j$ and hence has no subsequence that is Cauchy. Still $x_n \in B$ for all $n$. Thus $B$ is not sequentially compact and it cannot be compact either. – Matias Heikkilä Oct 3 '16 at 13:20