Let $f$ be the map from $\mathbb{R}^n-{0}\to S^{n-1}$ defined by $f(x)=\frac{x}{||x||}$. I would like to show that this function is continuous.
To show that $f$ is continuous I can use either open sets or closed sets. I would like to use the closed sets. So, want to show: if $U\subset S^{n-1}$ is closed then $f^{-1}(U)$ is closed.
I know that (n-1)-sphere is closed and bounded in $\mathbb{R}^n$, so it is compact. Let $U\subset S^{n-1}$ be its closed subset, then $U$ is compact by (Closed subspace of a compact space is compact). Then how can I show that the preimage is also closed?