Understanding subspace topology

If $X$ is a topological space and $S$ is a subset of $X$ then the subspace topology is defined by taking

  • the open sets of $S$ to be every set of the form $U \cap S$ where $U$ is an open set in $X$

  • the closed sets of $S$ to be every set of the form $F \cap S$ where $F$ is a closed set in $X$

For the rational numbers, closed intervals defined by irrational endpoints are the same as open intervals: if $\alpha < \beta$ are irrational numbers then

$$ [\alpha, \beta] \cap \mathbb Q = (\alpha, \beta) \cap \mathbb Q.$$

This is because if $\alpha \le x \le \beta$ and $x$ is rational then $x \ne \alpha$ and $x \ne \beta$ (since $\alpha, \beta$ are irrational and $x$ is rational) so $\alpha < x < \beta$.

This means that the set $ [\alpha, \beta] \cap \mathbb Q = (\alpha, \beta) \cap \mathbb Q $ is both open and closed in the subspace topology of $\mathbb Q$. That is, it is both an open set intersected with $\mathbb Q$ and a closed set intersected with $\mathbb Q$.

For $S = [0,1] \cap \mathbb Q$ we have

$$\left[0, \frac1\pi - \frac1n \right] \cap S = \left[0, \frac1\pi - \frac1n \right) \cap S = \left(-1, \frac1\pi - \frac1n \right) \cap S. $$

Thus the set $\left[0, \frac1\pi - \frac1n \right] \cap S$ is both open and closed in the subspace topology.


To answer your question about compact sets in subspace topology, here's an interesting result. If $K \subset Y \subset X$, $K$ is compact relative to $X$ if and only if $K$ is compact relative to $Y$. (Theorem 2.33, Rudin's Principles of Mathematical Analysis). The proof given there applies to a general topological space, not just metric spaces. So it makes sense to say that a topological space is/is not compact in its own right, irrespective of its embedding space.