Question about Intermediate Value Theorem 
In the solution, it says that $f(a)\ge a$ and $f(b)\le b$  but it do not seem obvious for me. If I am just given that a $f:[a,b]\to[a,b]$, how do I know is this function increasing, decreasing or just a horizontal line? 
 A: Recall what $f:[a,b] \to [a,b]$ means. It means that given any $x \in [a,b]$, we know $f(x) \in [a,b]$. What does it mean for $f(x)$ to be in the interval $[a,b]$? That $a \leq f(x) \leq b$. For $a$, $a \leq f(a) \leq b$ and for $b$, $a \leq f(b) \leq b$. See that nothing about the shape or behavior of $f$ is required: just that the range, or image of $f$ is a subset of $[a,b]$.
A: Just for the sake of completeness, here is an answer to the actual problem.
Consider a function  $g(x) = f(x) - x$. We want to show that 
$$
\exists c \space g(c)=0 
$$
Now, $f(a) - a$ is necessarily non-negative, since $f(a) \geq a $ and similarly $f(b) - b$ is necessarily non-positive.
If either of these are $0$, then we are done and $c = a$ or $c = b$. If not, we have:
$$
f(a) - a > 0 > f(b) - b \\
g(a) > 0 > g(b)
$$ 
Thus by the IVT, we have $g(c) = 0$ for some $c \in [a, b]$, and thus $f(c) -c = 0$, or $f(c) = c$.
As you can see, you don't need to know that the function is increasing or decreasing or constant, the vital piece of information is that $f : [a, b] \rightarrow [a, b]$ as this implies $a \leq f(x) \leq b$.
A: hint: draw a picture as follows:
(a) draw the square bounded by the lines $x = a, x = b, y = a$ and $y = b.$
(b) draw the diagonal line $y = x$
(c) draw the graph of the function $y = f(x)$ starting on the left edge of the square ending at the right edge because  $f: [a,b] \rightarrow [a,b]$
can you see that the function must cross the diagonal because it cannot escape through the bottom or the top of the square.
A: Go by contradiction, let $f:[a,b]\rightarrow [a,b]$be continuous with no fixed point, so $\forall x\in[a,b]:f(x)\ne x$.


*

*If you consider $a\in[a,b]$, then it has to follow $f(a)\ne a \Rightarrow f(a) > a$.

*If there exists $x\in[a,b]$ such that $f(x) < x$, then continuity would imply $\exists x'\in[a,b]: f(x') = x'$, so $\forall x\in[a,b]:f(x) > x$.

*Since $f(b)\in[a,b]$, either $f(b) = b$ or $f(b) < b$. First case is an instant contradiction, second case would follow (2) and give a contradiction.
So $f$ has to have a fixed point.
