# Continuous map from $[0,1]$ to $[0,1].$

Let $f$ be a continuous map from $[0,1]$ to $[0,1].$ Show that there exists $x$ with $f(x)=x.$

I have $f$ being a continuous map from $[0,1]$ to $[0,1]$ thus $f: [0,1]\to [0,1]$. Then I know from the intermediate value theorem there exists an $x$ with $f(x)=x$ but I don't know how to formally prove it?

Is there another way of proving this besides using $g(x) = f(x) - x$?

• Is $\text{im}(f)=[0,1]$ in someway implied? Nov 9 '13 at 0:10
• @GitGud It's not necessary. Nov 9 '13 at 0:10
• @egreg Right.${}$ Nov 9 '13 at 0:12
• I think it's a far better idea to make sure you understand the proof you've been given using $g(x)$ than to ask for a proof without it. If you don't understand the $g(x)$ proof, you don't understand the intermediate value theorem. Nov 10 '13 at 9:04
• Following on Gerry Myerson's comment, I can imagine proofs without using this particular $g(x)$, which may conceal it in some way or not. I can't imagine a proof that didn't use the intermediate value theorem (or the more general contraction mapping theorem). Nov 11 '13 at 4:25

Yeah it is by the intermediate value theorem.

Consider the function $g(x) = f(x) - x$.

What can you say about $g(0)$? $g(1)$? Now apply the IVT.

Edit: If you want to do it without $g$ or the IVT explicitly you can use the proof idea of IVT and say:

If not :

$\{x: f(x) < x \}$ and $\{x: f(x) > x \}$

Are open, non-empty (since $f(0) > 0$ and $f(1) < 1$) which is a contradiction to connectedness of $[0,1]$.

• What can I say about $g(0)$ and $g(1)$? Nov 9 '13 at 0:20
• @user104235 $g(0)=f(0)\in [0,1]$ and $g(1)=f(1)-1\in [-1,0]$. Nov 9 '13 at 0:28
• @GitGud Gud. Thank you for replying while I was away, appreciated. Nov 9 '13 at 0:31
• I still don't know how to formally prove it? Nov 9 '13 at 0:38
• @user104235 Combine what Git Gud said with the IVT. You get $g(z) = 0$ for some $z$ right? What does this tell you about $f(z)$? Nov 9 '13 at 0:44

If it helps, you can think of this problem graphically as saying that for any function $f:[0,1]\to[0,1]$, $f$ must cross the diagonal of the square with vertices at $(0, 0),\ (1,1).$

Here's a picture: Hopefully it's clear from this picture that $f$ is going to have to cross this diagonal, since $f$ starts somewhere on the $y$-axis and and ends up somewhere on the rightmost side of the square.

Now you can use your idea with the function $g(x)=f(x)-x$. Note that $g(0)=f(0) \geq 0$, and $g(1)=f(1)-1 \leq 0$. Can you finish the rest?

• I like this picture. It emphasized the intuitive idea of the intermediate value theorem: "You can draw a continuous function without picking up your pencil". Nov 10 '13 at 17:44
• Thank you very much! How would I continue and finish with your proof at the end? Nov 10 '13 at 22:25
• You know that $f(0) \geq 0$ and $f(1) \leq 1$, so you can apply the Intermediate Value Theorem with a little bit of casework to prove the result.
– user71641
Nov 10 '13 at 22:46

Can anyone check my answer to see if I understand this?

We have three cases: When $f(x) > x$ for every $x \in [0,1]$. When $f(x)< x$ for every $x \in [0,1]$ And finally, when $f(x)<x$ at some points of $x$ and $f(x)>x$ at other points of $x$.

If $f(x)> x$ at some points of $x\in [0,1]$ and $f(x)<x$ at other points of $x\in [0,1]$ then we can use the IVT and we are done.

Now, consider when $f(x) >x$ for all $x\in [0,1].$ Now, to map $[0,1] \to [0,1]$ we must have that $f(0)$ must exist and since $f$ is a continuous function such that $f: [0,1]\to [0,1]$ we have that $f(0) = 0$ which contradicts $f(x) < x$ for all $x\in [0,1].$

Now consider when $f(x) < x$ then in order to map $f: [0,1]\to [0,1]$ we must have the function $f(1)$ exists but this is not that case since $f(x)< x$ for all $x$ which contradicts the choice of $x\in [0,1]$. Hence contradiction.

Is this correct?

• It is not possible that $f(x) \gt x$ for every $x \in [0,1]$. Specifically $f(1) \le 1$. Similarly $f(0) \ge 0$. Your third paragraph avoids $f(x)-x$ but the logic is the same, as you are using the IVT. I could argue you were using $g(x)=f(x)-x$ but hiding it. It depends on the order you prove things. In the development you need to pay attention to that, afterward you use whichever theorem suits your needs at the time. Nov 11 '13 at 4:42
• @RossMillikan So I did use $g(x) = f(x) -x$ but I hide it? Is my proof correct? I supposed $f(x)>x$ then I showed it is a contradiction. Nov 11 '13 at 4:46
• Your proof is fine, depending on what you have proved at this point. I think the IVT usually depends on this-we prove that if you have continuous $f(x)$ and $f(a)\gt 0, f(b) \lt 0$ there is an $x$ between $a$ and $b$ such that $f(x)=0$. Then, using this and $g(x)=f(x)-x$ we prove the IVT. It is a long time since I did this, so my memory may be faulty. Nov 11 '13 at 4:53
• @RossMillikan Thank you ! Nov 11 '13 at 4:55
• How do you get $f(0)=0$ from $f$ being continuous? The function $f:[0,1]\to[0,1]$ given by $f(x)=(2x+1)/4$ does not have $f(0)=0$. $f$ can even be one-one and onto and not have $f(0)=0$, e.g., $f(x)=1-x$. Nov 11 '13 at 12:35