Preimage of a compact set 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$? 
 A: $f(x_1, ... ,x_n) = \sin(5x_1)$ is an example of a continuous $f$ with  unbounded preimage of $f([0,1])$.
A: When we say a function is bounded, it means for every element in the domain of the function its value always lies between two numbers, the bounds.
In case the domain is unbounded we get a function that maps an unbounded set to a bounded set.
Now reversing the viewpoint for this function we can say the pre-image of a bounded set  is an unbounded set.  
That is what kotomord's answer above  achieves. Take a well-known bounded function such as the sine function and compose this with the function $(x_1,x_2,\ldots,x_n)\mapsto x_1$.
Writing $v$ for an element in your domain we can also see that $v\mapsto \frac1{1+\|v\|}\|v\|$ is also one such function (here $\|v\|$ means length of the vector $v$).
A: Not generally. The pre-image is closed because $f$ is continuous. But it need not be bounded.  The simplest example is to let $f(x,y)=0$ for all $x, y.$ Then $\{0\}$ is compact and $f^{-1}\{0\}=\mathbb R^2.$ 
A: It's not true. not even for $\mathbb R $ to $\mathbb R$. Consider $\sin(x)$
