# Are all bijective functions continuous?

I'm teaching my self topology with a book, and I'm trying to understand continuity better. Using the following definition,

If X and Y are topological spaces, a map $f$: $X \rightarrow Y$ is said to be continuous if for every open subset $U \subseteq Y$, its preimage $f^{-1}(U)$ is open in $X$.

I know the following function is not continuous:
$f: \mathbb{R} \rightarrow \mathbb{R}$

$$f(x) = \left\{ \begin{array}{ll} 2x + \frac{|x|}{x} & \quad x \neq 0 \\ 0 & \quad x = 0 \end{array} \right.$$

If we set $U=(-1/2,+\infty)$. Then $U$ are open in $\mathbb R$. But $f^{-1}(U)=[0,+\infty)$, which is not open. Thus, $f$ is not continuous.

However, this function is not a bijection. If I redefine the range to make it a bijection as follows:
$f: \mathbb{R} \rightarrow (-\infty, 1)\cap\{0\}\cap(1,\infty)$
Now $U$ cannot be defined the same way.

Is the bijective version of $f$ now continuous? If it is, can someone please give an example of a simple 1-dimensional bijective function that is not continuous?

• Well what is your topology on that range? – M10687 Jun 14 '16 at 18:53
• No. If all bijective functions were continuous, then every bijection would be a homeomorphism, and therefore topology would be very boring. As an explicit instructive example, try equipping the two-point with two different topologies. Is the identity map (considered as a map between these two spaces - remember that the topologies are different) continuous? – user98602 Jun 14 '16 at 18:54
• Also, you may be interested in so-called "invariance of domain": en.wikipedia.org/wiki/Invariance_of_domain – M10687 Jun 14 '16 at 19:01
• Note that there exist bijections between any two of the following: the interval $(0,1),$ the interval $[0,1],$ ${\mathbb R},$ ${\mathbb R}^{42},$ the Cantor middle thirds set, a sphere (boundary of a ball in ${\mathbb R}^{3}),$ a ball (including its interior) in ${\mathbb R}^{3},$ etc. because all these sets have cardinality $2^{\aleph_0} = c.$ – Dave L. Renfro Jun 14 '16 at 19:01
• All bijective increasing functions from $\Bbb R$ to $\Bbb R$ are continuous, I think. – Akiva Weinberger Jun 14 '16 at 19:56

To the question in your title and last sentence: it is not true that all bijective functions are continuous.

Consider the function from $\mathbb{R}$ to $\mathbb{R}$ (with the usual topology) given by $$f(x) = \begin{cases} x & \text{ if } x \not \in \mathbb{Z} \\ x + 1 & \text{ if } x \in \mathbb{Z} \end{cases}$$ Then this is a bijective function, sending integers to integers (and shifting them up by $1$) and sending all other real numbers to themselves. But it is not continuous.

Generally, there is no reason to suspect a strong relationship between continuity and bijectivity.

The point $0$ is an isolated point in the set $R=(\leftarrow,1)\cup\{0\}\cup(1,\to)$ that is the range of your function $f$. If you take $f$ as a function from $\Bbb R$ to $R$, $\{0\}$ is an open set in $R$, and $f^{-1}[\{0\}]=\{0\}$ is not open in $\Bbb R$, so $f$ is still not continuous.

One fairly easy bijection from $\Bbb R$ to $\Bbb R$ that is not continuous is the function defined by

$$f(x)=\begin{cases} 0,&\text{if }x=0\\ \frac1x,&\text{otherwise}\;. \end{cases}$$

This function is not continuous at $0$, though it is continuous everywhere else.

In general there is no connection between continuity and bijectiveness.

Your function is not continuous as a function $\mathbb{R}\to\mathbb{R}$, so it cannot be continuous if you limit the codomain to the range (with the relative topology).

I believe the decisive example showing that there is no connection between bijectivity and continuity is the following. Consider two topologies $\tau$ and $\sigma$ on the set $X$. Then the identity map $I_X\colon(X,\tau)\to(X,\sigma)$ is continuous if and only if $\sigma\subseteq\tau$ ($\tau$ is finer than $\sigma$), by definition of continuity. Given two topologies, there is no reason for one to be finer than the other.

If you have a bijective map $f\colon (X,\tau)\to(Y,\sigma)$, you can define a topology $\hat\sigma$ on $X$ by declaring that $U\in\hat\sigma$ if and only if $f(U)\in\sigma$. Then you can check that the continuity of $f$ is equivalent to the continuity of $I_X\colon (X,\tau)\to(X,\hat\sigma)$, so we're again in the same situation as before.

The property of $(X,\tau)$ that

for all topological spaces $(Y,\sigma)$, every bijection $(X,\tau)\to(Y,\sigma)$ is continuous

is only satisfied if $|X|\le1$, so there is only one topology on $X$.

If you restrict to Hausdorff topologies, then the property characterizes finite spaces, as on every infinite set there exists a Hausdorff nondiscrete topology.

There is also a nice counting argument that shows that not all bijections can be continuous. It also shows that the two notions have very little in common. (NOTE: I assume AC for all the following otherwise counting bijections is hard)

For $f:\mathbb{R}\to\mathbb{R}$ continuous, you have that $f$ is determined by it's values on $\mathbb{Q}$ This means you get at most the number of countable sized subsets of the real numbers which is no bigger than the real numbers $|\mathbb{R}|=\mathfrak{c}$.

On the other hand the number of bijections of $\mathbb{R}$ is $\mathfrak{c}^\mathfrak{c}$. Which is strictly bigger.

Now you can easilly get more continuous functions then bijections by making sure there are no bijections (due to cardinality) but many open sets in the source space and very few in the target space. So consider $\mathbb{R}$ and $\mathbb{N}$ with the discrete topology on $\mathbb{R}$ and the indiscrete topology on $\mathbb{N}$ that makes all functions between the two spaces continuous but none are bijections.