Is it possible to construct a continuous and bijective map from $\mathbb{R}^n$ to $[0,1]$

compactnessgeneral-topologymetric-spacesvector-spaces

Let $U$ be a non-trivial finite-dimensional vector space over $\mathbb R.$ I am trying to use a bijective and continuous map $f: U \to [0,1]$ and $d(x,y)=|f(x)-f(y)|$ to prove that there exist a metric on $U$ that makes $U$ compact. However, I couldn't find such continuous and bijective map: $f:U\to[0,1] \text{ (or $[0,1]^n$).}$ Is there any example? Or is there any other way to prove there exists a metric on $U$ that makes $U$ compact?

Edited: Thank you for all of your comments. I just started to learn compactness these days so I am not very good at some of the concepts. Now I understand that there is no need to construct a continuous map to prove the compactness. I also know that there does not exist a norm on U which makes U compact. My question is: how to prove there does exist a metric on U which makes U compact?

Best Answer

To answer the question in the title: No for $n>1$.

If $f:\mathbb R^n\to[0,1]$ is continuous and surjective then $f^{-1}([0,\frac12))$ is a proper clopen subset of $f^{-1}([0,1]\setminus\frac12)$. That means $f^{-1}([0,1]\setminus\frac12)$ is disconnected. But $\mathbb R^n$ minus a single point is connected, so $f$ must not be injective.

Related Question