Fixed-Point Theorem Proof Merry Christmas everybody.

Let $a,b\in\mathbb{R}$ and $a<b$. Prove that: If $f: [a,b] \rightarrow [a,b]$ is continuous, then there is a fixed-point in $f$.

So basically, if f is continous I should find a $c \in[a,b]$ so that $f(c) = c$. - Isn't this equivalent to $f(a) = a$ or $f(b) = b$ since a and b $\in[a,b]$? 
 A: Let $g(x)=f(x)-x$.
Then $g(a)=f(a)-a\geq0$, since $a$ is a lower bound of $[a,b]$ and $f(a)$ is in $[a,b]$. Likewise $g(b)=f(b)-b\leq 0$.
If equality holds in either case, then we're done. If not, apply the intermediate value theorem! That is, $0$ is between $g(b)$ and $g(a)$, and $g$ is continuous, so $g(c)=0$ for some $c\in(a,b)$.
A: This question is directly followed by Brouwer's fixed point theorem, which states that any continuous function mapping a compact convex set into itself has fixed point.
To show an elementary method, assume there's no fixed point, then $f(x)>x$ or $f(x)<x$ for $x\in[a,b]$ since $f$ is continuous. It follows that $(f(a)-a)(f(b)-b)>0$. However, this is contradiction because $a,b$ is the boundary of the range and thus $f(a)\geq a$ and $f(b)\leq b$.
A: This answer is a slight modification of the answer posted by Nick D. On contrary, suppose that there is no fixed point of $f$. Now put $g(x)=\frac{f(x)-x}{|f(x)-x|}$. Then $g$ is a continuous function on a connected set having disconnected image, which is a contradiction.
