Compactness in subspaces

If $X$ is considered with the subspace topology, the inclusion $i:X\to Y$ is continuous. Hence $i(C)\subset Y$ is compact as well.


$(0, x)$ is not compact as a subspace of $(0, 1]$ or as a subspace of $\mathbb{R}$. $(0, x)$ has the exact same topology whether or not it's a subspace of $\mathbb{R}$ or $(0, 1]$, so it must be compact in both, or in neither. Furthermore, compactness is invariant with superspaces, regardless of any separation axiom.

Let $C \subseteq X$ be compact with respect to $X$, and let $X \subseteq Y$. Let $\{U_\alpha\}_{\alpha \in A}$ be a cover of $C$ by open subsets of $Y$. Then, $\{U_\alpha \cap X\}_{\alpha \in A}$ is a cover of $C$ by open subsets of $X$. Since $C$ is compact with respect to $X$, $\{U_\alpha \cap X\}_{\alpha \in A}$ has a finite subcover, $\{U_i \cap X\}_{i \in I}$. Then, $\{U_i\}_{i \in I}$ is a finite subcover of $\{U_\alpha\}_{\alpha \in A}$, and $C$ is compact with respect to $Y$.


Compactness of a space $C$ is its inner property, independednt in which space $C$ is contained. So $C\subset X\subset Y$ is compact "in $X$" if and only if it is compact "in $Y$".