Fixed point in a continuous function

Solution 1:

Note that a fixed point is when $f(x) = x$ or $f(x) - x = 0$. Consider the function $f(x) -x$. Can it be everywhere positive? Can it be everywhere negative? As it is continuous, it thus has to have a zero.

Solution 2:

I think you can prove it using the properties of the real line. If $f(a)=a$ or $f(b)=b$ then the result follows. If not then $f(a)\gt a$ and $f(b)\lt b$ try using the continuity of $f$ to show that $\sup\{x\in [a,b]\space|\space f(x)\gt x\}$ is a fixed point for $f$.