Let $(X,\tau)$ be a [topological space](/page/Topological%20Space), let $K \subset X$, and equip $K$ with the [subspace topology](/page/Subspace%20Topology) $\tau_K := \{K \cap U : U \in \tau\}$. Then $K$ is compact as a subset of $X$, meaning every cover of $K$ by sets open in $X$ admits a finite subcover, if and only if $(K,\tau_K)$ is a compact topological space.