Theorem 22.3 (Smooth invariance of domain). Let $U \subset\mathbb{R}^n$ be an open subset, $S \subset\mathbb{R}^n$ an arbitrary subset, and $f : U \rightarrow S$ a diffeomorphism. Then $S$ is open in $\mathbb{R}^n$.
I can't understand why the set $S$ is not automatically open in $\mathbb{R}^n$. The mapping is a diffemorphism,which means it is continuous in both directions,so $S$ is open.