TITLE: Preimage of a compact set
QUESTION [7 upvotes]: If $f : \mathbb{R}^n \to \mathbb{R}$ is continuous, is the preimage $f^{-1}([0,1])$ also compact?
I'm trying to check the two conditions that it's closed and bounded. I know how to show it's closed, but I don't know how to show that it's bounded. Can I just say the domain is unbounded because it's $\mathbb{R}^n$?

REPLY [12 votes]: It's not true. not even for $\mathbb R $ to $\mathbb R$. Consider $\sin(x)$