24-08-2023

Problem: Assume that $X$ and $Y$ be two metric space and $f: X \to Y$ be a continuous function. Let $K$ be a compact subset of $Y$. Show that $f^{-1} (K)$ is closed. Also, find an example which shows that $f^{-1} (K)$ need not be compact.
Solution: Recall that any compact subset of a metric space is closed. So $K$ is a closed subset of $Y$ and $f$ is continuous implies $f^{-1} (K)$ will be closed. On the other hand, $f^{-1} (K)$ need not be compact. Consider the constant function \[ f: \mathbb{R} \to \mathbb{R} ,~ f(x) = 1,~ \forall~ x\in \mathbb{R} . \] The set $\{ 1 \} $ is a compact subset of $\mathbb{R} $ and $f^{-1} (\{ 1 \} ) = \mathbb{R}$ which is not compact.