# $f: [0,1] \to [0,1]$ is a continuous bijection $\implies\{f(0),f(1)\}=\{0,1\}$

I have to prove that if $$f: [0,1] \to [0,1]$$ is a bijection and continuous, only two things happen that $$f(0)=0$$ and $$f(1)=1$$ or $$f(1)=0$$ and $$f(0)=1$$.

This was my idea, let $$f(0)=a$$ and $$f(1)=b$$, then exists $$a',b' \in [0,1]$$ such that $$f(a')=a$$ and $$f(b')=b$$, but I don't know how to do

• @Fawkes4494d3 I forgot to write that f is continuous – Alejandra Benítez Sep 17 at 3:12

This is false. Define $$f(x) = \begin{cases} 0.25 & x = 0 \\ 0.75 & x = 1 \\ 0 & x = 0.25 \\ 1 & x = 0.75 \\ x & \text{otherwise} \end{cases}$$ That's a bijection but doesn't have the claimed property.

If you ask about continuous bijections, then the claim is true, however.

• I forgot to write that f is continuous – Alejandra Benítez Sep 17 at 3:12
• This answer (and also the deleted answer) completely answer your question as it originally posted. I don't understand why somebody down voted for them. – Bumblebee Sep 17 at 3:26
• Indeed. Once you have multiple correct answers to a mistaken question, it's probably nicer to re-ask as a NEW question, so that the correct answers don't end up looking stupid. After all, the folks who answered those are the ones who did something right. – John Hughes Sep 17 at 3:29

Suppose $$f(0) = v$$ with $$v \neq 0$$ and $$v \neq 1$$, that is $$v \in (0, 1)$$. Since the function is surjective, there must be some $$a, b \in (0, 1]$$ with $$f(a) = 0$$ and $$f(b) = 1$$. By the intermediate value theorem, there is $$c \in (a, b)$$ (or $$c \in (b, a)$$ if $$b < a$$) with $$f(c) = v$$ and the function is not injective, a contradiction. A similar argument also applies for $$f(1)$$.

The continuous image of a compact set is compact; in the reals, Heine-Borel says that means closed and bounded. Hence such a function achieves its maximum. So there's a point $$c$$ with $$f(c) = 1.$$ If $$0 < c < 1$$, then pick $$a = c/2$$; $$b = \frac{1 + c}{2}$$. Then evidently $$0 < a < c < b < 1$$, and $$f(a) < 1$$ and $$f(b) < 1$$.

Now the continuous image of a connected set is connected, so $$f([a, c])$$ is a connected interval $$[A, 1]$$, where $$A < 1$$; similarly, $$f([c, b])$$ is a connected interval $$[B, 1]$$. Letting $$u = \max{A,B} < 1$$, we have $$u \in f([a, c))$$ and $$u \in f( (c, b])$$, hence $$f$$ is not injective.

Thus the assumption that $$f(1)$$ is strictly between $$0$$ and $$1$$ is false, so $$f(1) = 0$$ or $$f(1) = 1$$. A similar argument shows the same thing for $$f(0)$$.

• $A$ and $B$ are not necessarily less than 1 as the function can be constant near the maximum (though the rest of the argument stands anyway) – MBW Sep 17 at 3:40
• The function cannot be constant near the max, because it's a bijection --- the max may be assumed at at most one argument. But I should have noted that. – John Hughes Sep 17 at 10:57

In fact, there's a fact about $$\underline{\text{continuous functions which are bijections}}$$ the idea of the proof of which comes in handy:

If $$f:\Bbb{R}\to\Bbb{R}$$ is bijective and continuous, $$f$$ is strictly monotone.

Proof: Suppose $$f$$ is not strictly monotone, that is, without loss of generality, $$\exists a,b,c\in\Bbb{R}, a such that $$f(a)f(c)$$,
call $$A=f(a),B=f(b), C=f(c)$$, i.e. $$A,C
by the Intermediate value theorem, for a $$D$$ such that $$D\in(C,B)$$ and $$D\in (A,B)$$,
$$\exists d_1 \in (b,c),$$ such that $$f(d_1)=D$$
$$\exists d_2 \in (a,b),$$ such that $$f(d_2)=D$$
but $$d_2 \in (a,b), d_1\in (b,c)\implies d_1\ne d_2$$ but $$f(d_1)=f(d_2)\implies$$ $$f$$ is not a bijection, which is a contradiction. So $$f$$ is strictly monotone.
($$\because$$ $$f$$ is bijective, no equality signs i.e [ $$\le,\ge$$ ] among $$f(a),f(b),f(c)$$ have been considered after assuming the negation of $$f$$ being strictly monotone.)

This fact can be directly used to prove your claim.

• For which fact there's an easier proof: math.stackexchange.com/questions/170147/…. – Michael Hoppe Sep 17 at 11:44
• @MichaelHoppe ah yes :D that is easier, and it's a more helpful proof even when the problem does not offer much geometric/graphical intuition. – Fawkes4494d3 Sep 17 at 12:00