Does compactness depend on the metric?

Take the set $[0, 1] \subset \mathbb{R}$ under the usual metric. This is compact. Now consider $[0, 1]$ instead under the discrete metric: $d(x, y) = 1$ if $x \neq y$ and $0$ otherwise.

This is not compact. Can you see the infinite cover of open sets that does not admit a finite subcover?

This trick works with any compact infinite set, and further any infinite set with this so-called discrete metric cannot be compact. On the other hand, any finite set with any metric is compact.


If you ask about arbitrary metrics, the other answers cover that well.

But if you ask about two metrics which define the same topology, then the answer is no, as it is made clear by the open cover definition of compactness.

P.S. Boundedness depends on the metric, and this shows that in general compactness cannot always be equivalent to bounded+closed.


Take $[0,1] $ with the usual metric, in which it is compact. And then consider it with the discrete metric, where $d (x,y)=1$ if $x\ne y$. In the latter, only finite sets are compact.