Show that a continuous function has a fixed point Question: Let $a, b \in \mathbb{R}$ with $a < b$ and let $f: [a,b] \rightarrow [a,b]$ continuous. Show: $f$ has a fixed point, that is, there is an $x \in [a,b]$ with $f(x)=x$.
I suppose this has to do with the basic definition of continuity. The definition I am using is that $f$ is continuous at $a$ if $\displaystyle \lim_{x \to a} f(x)$ exists and if $\displaystyle \lim_{x \to a} f(x) = f(a)$. I must not be understanding it, since I am not sure how to begin showing this... Should I be trying to show that $x$ is both greater than or equal to and less than or equal to $\displaystyle \lim_{x \to a} f(x)$ ?

One way is to use the property of continuous function on compact set. Take g(x) =|x - f(x)| on [a,b]. Clearly g is continuous so image of g must be compact, hence it will achieve it's minimum value. Can you show now that minimum will be zero ?
