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$? 
 A: 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? 
A: 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]$. 
A: 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?
