# Proof involving the continuous function $f:[0,1] \to [0,1]$

Theorem: Let $f:[0,1] \to [0,1]$. Assume $f$ is continuous. Then there exists $c \in [0, 1]$ such that $f(c) = c$.

1) For any function $f$, let $g(x) = f(x) − x$. If the theorem is true, what does that say about $g(c)$?

2) Write a proof of the theorem. Do it by applying the Intermediate Value Theorem in the appropriate way to the function $g(x) = f(x) − x$ with $a = 0$ and $b = 1$. Clearly state why the hypotheses of the IVT are satisfied here.

1) Well if the theorem is true, then there exists $c$ such that $f(c) = c$. Then $f(c) - c = 0$. Then $g(c) = 0$.

2)Intermediate Value Theorem: Let $I$ be an interval and $f$ a function whose domain contains $I$. If $f$ is continuous, then for all $a, b \in I$ with $a < b$ and all real numbers $k$, if $k$ is strictly between $f (a)$ and $f (b)$, then there exists $c$ such that $a < c < b$ and $f (c) = k$.

Proof Attempt: Take $a = 0$ and $b = 1$. Then $a,b \in[0,1]$ and $a < b$. Since $f:[0,1] \to [0,1]$, it follows that for all real numbers $k$ such that $f(a) < k < f(b)$, then there exists $c$ such that $a < c < b$ so $0 < c < 1$ and $f(c) = k$. Then $f(c) - k = 0$. Thus, since $g(x)=f(x)-x$, it follows that $g(c) = 0$.

Looking to see if I did this correctly and/or if there is a more elegant way to prove problem 2. I am a little confused why the first theorem is true, but I went with it.

• Your attempt of proof is wrong. You just said that, if $f(a)=b$, then $f(a)-b=0$, which is a tautology that tells you nothing about $f(x)-x$. – user228113 Nov 2 '16 at 19:57
• Again, $g(c)$ is $f(c)-c$, not $f(c)-k$. – user228113 Nov 2 '16 at 20:00
• Oh, shoot, you're right. – Remy Nov 2 '16 at 20:00

Here's a proof as, I suppose, would be expected:

Let's apply the IVT to the function $g$, on the interval $[a, b] = [0, 1]$.

We are especially interested in showing that the function $g$ has a zero in its domain. Therefore we apply the IVT with the intention of using a value of $k$ equal to $0$ (as per your statement of the IVT).

But $g(0) = f(0)-0=f(0)$, with the first equality by the definition of $g$. Also $g(1) = f(1)-1.$

But since $f$ has codomain $[0, 1]$, it must be $f(1)\leq1$. If the equality stands, then the proof is over: the point $x=1$ is such that $f(x)=x$.

If the inequality is strict, that is, $f(1)<1$, then $g(1)<0$.

Similarly, $g(0)=f(0)\geq0$, because $f$ has codomain $[0, 1].$ If the equality stands, we are done, just as before: $f(0)=0$.

Otherwise, $g(0)$ is positive, and finally we can apply the IVT:

The function $g$ is such that $g(0)>0$ and $g(1)<0$, and is continuous because it is sum of continuous functions, therefore a number $c$ must exist, such that $0<c<1$, and $g(c)=0$.

But if $g(c)=0$, then by the definition of $g$, $f(c)-c=0$, and rearranging, $f(c)=c$, Q.E.D.

I know this proof is extremely verbose, but since you appear to be at your first steps in proof-writing, I firmly believe that writing every single logical step in your proofs is a good habit to pick up, very much like being generous in indentation and verbose in comments is a good habit for beginner programmers.

• Thanks, and yes I am a beginner with proof writing. Thanks for showing it step-by-step for me. – Remy Nov 2 '16 at 20:16
• I have a question: If the equality stands and f(1)=1, and thus g(1)=0, doesn't that mean g has a 0 in the codomain, not domain? – Remy Nov 2 '16 at 20:30
• @JohnH Codomain is the set that $f$ is mapped to, the domain is the set that $f$ is mapping to the codomain. So $f$ can't have a zero in codomain. – Stefan4024 Nov 2 '16 at 20:36

Assume $f(0) \not = 0$ and $f(1) \not = 1$, as otherwise the solution is trivial. Then we have that $g(0) = f(0) - 0 > 0$ and $g(1) = f(1) - 1 < 0$. So by IVT there exists a $c \in [0,1]$, s.t $g(c) = N$ for any $N \in [g(1),g(0)]$. But obviously $0 \in [g(1),g(0)]$.

• Why is f(0) - 0 > 0 and f(1) - 1 < 1? – Remy Nov 2 '16 at 20:03
• @JohnH $f$ is a function from $[0,1]$ to $[0,1]$, so $max f = 1$ and $min f = 0$. Also we've assumed that $f(0) \not = 0$ and $f(1) \not = 1$ – Stefan4024 Nov 2 '16 at 20:05
• Oh, right. And since you put 0∈[g(1),g(0)], I suppose g(c) = 0 from problem 1 is correct? – Remy Nov 2 '16 at 20:06
• @JohnH Yeah, obviously – Stefan4024 Nov 2 '16 at 20:07
• Ok, thanks, just making sure. – Remy Nov 2 '16 at 20:08