# Continuous bijection from non-compact set to compact set

So, I was wondering if one could find a continuous bijection from a non-compact set to a compact set. I had an exam today where one of the questions asked me to find a continuous bijection (if there is one) from $$\mathbb{R}$$ to $$\left[0,1\right]$$ which obviously does not exist because $$f$$ has to be monotonic. That generalization sort of popped up in my head, and at some point I thought I had a proof (I've tried to prove that for every compact $$X$$ in the codomain, $$f^{-1}(X)$$ is compact), which proved to be wrong. So the question is, is that fact even true, at least maybe by adding some more conditions?

• I don't understand why you accepted an answer that does not answer your question about what conditions would make that statement true. May 10 at 2:25

Take the map $$f : \mathbb{N} \to (\{\frac{1}{n} \mid n > 0\} \cup \{0\})$$ defined by $$f(0) = 0$$ and $$f(n + 1) = \frac{1}{n+1}$$. Here we use the discrete topology on the domain, and the subspace topology inherited from $$\mathbb{R}$$ for the codomain.

The map is a continuous bijection, the domain is not compact, and the codomain is compact.

• In other words, $f : \mathbb N \to \alpha\mathbb N$, $f(0) = \infty$, $f(n + 1) = n$. Apr 25 at 16:36

The common example is: $$$$f:[-\pi,\pi) \to \left\{ (x, y) \in \mathbb R^2 : x^2 + y^2 = 1 \right\} \\ f(x)=(\cos(x),\sin(x))$$$$ This function is continuous and bijective, $$[-\pi,\pi)$$ is not compact, but $$f\left[[-\pi,\pi)\right]$$ is (unit circle). Note that its inverse function is not continuous at $$(-1,0)$$. This is a common example of the function that is continuous and bijective, but its inverse is not continuous, meaning it is not homeomorphism.

The topologies in all of the spaces mentioned are standard.

Let $$K$$ be any infinite compact space, $$X$$ the same set with the discrete topology, and $$f$$ the identity map from $$X$$ to $$K$$.

• In general, the discrete and indiscrete topologies are very useful counterexamples for questions about the existence of continuous bijections, since they can be used to guarantee continuity trivially. Jan 31 at 23:39

You can get a true generalization:

✻ There is no continuous bijection from an open subset of ℝ to a compact subset of ℝ.

Take any open $$D⊆ℝ$$ and compact $$K⊆ℝ$$ and any continuous bijection $$f : D{→}K$$.
Let $$m = \max(K)$$, which exists since $$K$$ is bounded and closed.
Let $$c∈D$$ such that $$f(c) = m$$.
Let $$a,b∈ℝ$$ such that $$c∈(a,b)$$ and $$[a,b]⊆D$$, which exists since $$D$$ is open.
Then $$f(a) < f(c) > f(b)$$, since $$f$$ is injective.
By symmetry we can assume that $$f(a) > f(b)$$.
Let $$x∈[c,b]$$ such that $$f(x) = f(a)$$, which exists by IVT since $$f$$ is continuous.
Then $$f(a) = f(x)$$ but $$a ≠ x$$.