This question already has an answer here:

I wish to prove the following by contradiction:

Let $f:[0,1]\rightarrow[0,1]$ be a continuous function. Prove that there exists $x\in [0,1]$ such that $f(x)=x$.

Proving this directly, one would have to define a new function $g(x):=f(x)-x$ and prove that there exists $x\in [0,1]$ such that $g(x)=0$ using Intermediate Value Theorem, hence $f(x)=x$. But I'm struggling to elaborate a proof by contradiction.

My approach is as follows. Suppose by contradiction that it does not exist $x\in [0,1]$ such that $f(x)=x$. Then for all $x\in [0,1]$, $f(x)\neq x$. Then $f(x)>x$ or $f(x)<x$ for all $x$. This is where I'm not sure if it's correct.

If $f(x)>x$ for all $x\in [0,1]$, let $x:=1$. Then $f(1)>1 \implies f(1)\notin [0,1]$ which is a contradiction because $f$ was defined in $[0,1]$

If $f(x)<x$ for all $x\in [0,1]$, let $x:=0$. Then $f(0)<0 \implies f(0)\notin [0,1]$ leading to the same contradiction as above.

I'm skeptical because my contradiction does not involve $f$s continuity. Is the proof correct? If not, how can I approach this by contradiction? Thanks.


marked as duplicate by Arnaud Mortier, Xander Henderson, Henrik, max_zorn, Mostafa Ayaz Aug 3 '18 at 7:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    $\begingroup$ But how do you know that $f(x) > x$ for all $x$, or that $f(x) < x$ for all $x$? This requires continuity. $\endgroup$ – user61527 May 26 '14 at 1:58

For each individual $x$, we can conclude that $f(x) > x$ or $f(x) < x$; this doesn't imply that the same inequality holds for all $x \in [0, 1]$ - this is exactly where we have to use the fact that $f$ is continuous. As an example of this can fail without using the continuity of $f$, consider the function which is $1$ on $[0, 1/2]$ and $0$ otherwise.

Using the continuity of $f$ to prove that the inequality is the same for all points in $[0, 1]$ is really equivalent to the argument using the IVT that you outlined at the beginning of your question: Since $f(x) - x$ has no zeros, it can't change sign, implying what we want.

  • $\begingroup$ Now I understand why my cases do not hold for all $x$ but then I don't know how to approach this at all using contradiction. $\endgroup$ – AndreGSalazar May 26 '14 at 2:14
  • $\begingroup$ You can always phrase a direct proof into a contradiction one (although I'm not sure that one would ever want to do this). $\endgroup$ – user61527 May 26 '14 at 2:15
  • $\begingroup$ Yes, not very efficient in the end. Thank you very much. $\endgroup$ – AndreGSalazar May 26 '14 at 3:46

If you insist on a proof by contradiction, here is one, based on your argument:

Suppose $g$ has no zero. Then, by the Intermediate Value Theorem, $g(x)>0$ for all $x\in [0,1]$ or $g(x)<0$ for all $x\in [0,1]$. (Here you have used the continuity of $g$, which is equivalent to the continuity of $f$.) In the first case, $g(1)>1$. In the second case, $g(0)<0$. In either case, you get contradiction.

The standard proof is a direct proof, not by contradiction, and I find it simpler:

If $f(0)=0$ or $f(1)=1$, then you have found a fixed point of $f$. Otherwise, $f(0)>0$ and $f(1)<1$ and so $g(0)>0$ and $g(1)<0$. The Intermediate Value Theorem now gives you a zero of $g$ and this is a fixed point of $f$.

  • $\begingroup$ I didn't notice that the argument by contradiction could make use of the new defined function as well. I am alongside the standard as well, I was just curious of how the contradiction would take place. Thank you very much $\endgroup$ – AndreGSalazar May 26 '14 at 3:46

You could also word it like this: suppose that $f$ has no fixed point then $f(0) >0$ and $f(1) < 1.$ Hence $g(x) = x-f(x)$ is negative at $x =0$ and positive at $x =1.$ Since $g(x)$ is continuous, we must have $g(x) = 0$ for some $x \in (0,1)$ by the intermediate value theorem, so $f(x) = x$ for this $x,$ contrary to our assumption.


Not the answer you're looking for? Browse other questions tagged or ask your own question.