Why we need to prove a set K is compact of X(metric space) if X is always open and closed?

I think given any subset K in metric space X, K can be covered by X. Since X is open, K only need 1 open set to cover it. I am confused.

A subset $$K$$ of a metric space $$X$$ is compact if for every open cover of $$K$$, we can find a finite subcover.

The open cover $$\{X\}$$ is just one open cover, and it does indeed have a finite subcover. But the definition says we need any arbitrary open cover of $$K$$ to have a finite subcover. So just checking $$\{X\}$$ will not suffice.

Conversely, to show $$K$$ is not compact, we need only exhibit one example of an open cover that does not have a finite subcover.

• Can you give me one example for K is not compact in X ? Thank you very much! Sep 5, 2019 at 15:08
• Try $X = \mathbb{R}$ and $K = \mathbb{Z}$. Think about an open cover where each open set contains just one integer. Sep 5, 2019 at 15:14
• In $\mathbb{R}^n$ compact is equivalent to closed and bounded (not true in general metric spaces though!). So any subset of $\mathbb{R}^n$ that is not closed or is unbounded will not be compact. For instance, $\mathbb{R}$ itself is not compact in $\mathbb{R}$. Nor is $(0,1)$. See Why is an open interval not a compact set?.
– kccu
Sep 5, 2019 at 15:14

I think you are misreading the definition of "compact". It says that every open cover has a finite subcover. Your question notes the obvious fact that there happens to be one particular open cover that is finite.

A topological set $$K$$ is called compact if each of its open covers has a finite subcover. An open cover is a collection of subsets $$U_i \subset K$$ such that the union $$\cup_i U_i = K$$.

In your example, $$X$$ is not a subset of $$K$$, which is mandatory from the definition.

Furthermore, finding a single finite open cover is not enough: According to the definition, a set $$X$$ is compact if from ANY open cover has a finite subcover.