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]$? 

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)$.
