Let $f: \mathbb R^k \rightarrow \mathbb R$ continuous and unbounded in both directions. Show $f(\mathbb R^k)=\mathbb R$ Let $f: \mathbb R^k \rightarrow \mathbb R$ continuous and unbounded in both directions. Show $f(\mathbb R^k)=\mathbb R$
I must show that any $x \in \mathbb R$ also lies in $f(\mathbb R^k)$.
Idea:
Let $x \in \mathbb R^k$ and $y=f(x)$. Then since $f$ is continuous I can choose $\epsilon>0$ and $\delta >0$. The ball $B_\delta(x)$ in $\mathbb R^k$ is nonempty and all points must be within $\pm \epsilon$ of $f(x)$.
 A: The image of a connected space by a continuous function is connected, so $f(\mathbb R^k)$ is a subset of $\mathbb R$ connected and unbounded in both directions...
A: Since $f$ is unbounded in both directions, for any $x\in\mathbb{R}$ we have some $y_1,y_2\in\mathbb{R}^k$ such that $f(y_1) < x < f(y_2)$. Thus using the intermediate value theorem there must exist some $y\in\mathbb{R}^k$ such that $f(y)=x$.

Note that we use the generalized intermediate value theorem along with with the following facts:


*

*$\mathbb{R}^k$ is connected.

*$\mathbb{R}$ is a totally ordered set, with the usual order topology.

*$f$ is continuous.



One can also use the standard intermediate value theorem:
Let $y_1$ , $y_2$ and $x$ be as described above. Let $l_{y_1,y_2}$ be the (inclusive) k-dimensional line-segment between $y_1$ and $y_2$. We can rotate and move $\mathbb{R}^k$, via a rigid motion linear map $\tau$, so that $l_{y_1,y_2}$ lays on one of the axes. We shall use $X$ to denote that particular axis. Note that we have $\tau(l_{y_1,y_2})\subset X$ and in particular, we can write:
$$
\tau(y_1)=(0,...,a_1,...,0) \\
\tau(y_2)=(0,...,a_2,...,0)
$$
for some $a_1,a_2\in\mathbb{R}$. Without lose of generality we shall assume $a_1 <a_2$.
Finally, we define the map:
$$
g: [a_1,a_2] \to X \\
y \mapsto (0,...,y,...,0)
$$
Composing our functions we get: $$\,(f \circ \tau^{-1} \circ g) \,:\, [a_1,a_2] \to \mathbb{R}$$ If we observe the continuity of $f \circ \tau^{-1}$, while limiting our domain to $X$ we get the ordinary definition of continuity of single variable functions, and hence $f \circ \tau^{-1} \circ g$ is also continuous. Thus we can use the regular intermediate value theorem, along with the fact that:
$$
(f \circ \tau^{-1} \circ g)(a_1) = f(y_1) < x < f(y_2) = (f \circ \tau^{-1} \circ g)(a_2)
$$
to show that there exists some $y\in [a_1,a_2]$ such that  $(f \circ \tau^{-1} \circ g)(y) =f(\,(\tau^{-1} \circ g)(y)\,)= x$.
A: For any $c\in \mathbb R$, there exists some vectors $x,y\in \mathbb R^k$ so that $c\in [f(y), f(x)]$. This is because $f$ is unbounded from both sides and the interval $[f(x), f(y)]$ can be set as large as we want.
Now, take a look at the function $g(t) = f(tx + (1-t) y)$ which is a function from $[0,1]$ to $\mathbb R$ and continuous. Since $g(0)=f(y)\leq c$ and $g(1)=f(x)\geq c$, by the intermediate value theorem, there exists some $t$ for which $g(t) = c$. This $t$ gives a vector $z=tx+(1-t)y$ for which $f(z)=c$.
