Maximum and minimum function on an interval Let $I := [a,b]$, where $a<b$. Suppose that $f$ is continuous and $1-1$ on $I$. Let $m$ denote the minimum value of $f$ on $I$ and let $M$ denote the maximum value of $f$ on $I$.
(a) Carefully show that either $m = f(a)$ and $M = f(b)$ or $m = f(b)$ and $M = f(a)$.
(b)Deduce from part (a) that $f$ is either strictly inscreasing on $I$ or $f$ is strictly decreasing on $I$.
Should we use the infinum and supremum here? I am a little confused about how to prove this. Could anyone help me out please? Thanks
 A: Here's my general strategy for the case where the min doesn't occur at an endpoint. To write out the proof completely, you'd have to do the same for the max as well, and you'd get a few cases. But they're all the same general idea.
Assume to the contrary that the max/min's do not occur at the end points. Then, without loss of generality, you have a point $c\in (a,b)$ such that $f(c)$ is the minimum value of $f$ on $I$. Thus $f(a)>f(c)$ and $f(b)>f(c)$. Consider $\min({f(a), f(b)})$. Again without loss of generality, let this be $f(a)$. Then by the Intermediate Value Theorem, we know $\exists d\in (c, b)$ with $f(d)=f(a)$ (since $f(b)\geq f(a)\geq f(c)$ and $f$ is continuous). But this contradicts our assumption that $f$ is one to one. So the min must occur at an endpoint.
A: @Michael already posted an answer which contains the idea, here it is one more time, perhaps explained a bit different. 
A continuous function on a closed, bounded interval attains its min and its max, so it is ok to talk about min and max, rather than inf and sup. 
Also a continuous function sends connected sets onto connected sets, and compact sets onto compact sets, that is the image of $[a,b]$ mist be a closed interval, say $[m,M]$. We will first show that either $f(a)=m$ or $f(a)=M$. If neither was the case, then $m<f(a)<M$. Starting with $t=a$ and going toward $t=b$ there must be a first moment of time, say $t=c$, when either $f(c)=m$ or $f(c)=M$. That is, $f([a,c))\cap\{m,M\}=\emptyset$, and without loss of generality we may assume that say $f(c)=M$. At some later moment of time, $d>c$ we must also have that $f(d)=m$. But then since $f([c,d])$ is connected and contains the endpoints $m$ and $M$, it must be the case that $f([c,d])=[m,M]$. 
So there must be some $e\in (c,d)$ with $f(e)=f(a)$, contradicting that $f$ is 1-1. (If it were the case that $f(c)=m$ then at some later moment of time we would have $f(d)=M$ but again $f([c,d])=[m,M]$, so this case is similar). 
It is not clear what they mean by "deduce from part (a)"etc. Part (a) on its own is not enough to deduce (b). You could have points say $a<p<q<b$ with $f(a)=m$, $f(p)=M$, $f(q)=m$, $f(b)=M$, which satisfies (a), but not (b), of course such an $f$ is not 1-1, but this shows that you could not forget that $f$ is 1-1 and use (a) only to show (b). So, what they mean is, use what you are given to prove (b), and try to mention somewhere in your proof part (a) in some interesting and non-trivial way. 
I guess you could employ part (a), perhaps with different endpoints of $I$, that might be what they meant. Consider the case when $f(a)=m$, $f(b)=M$, clearly $m<M$ since $f$ is 1-1. We will show that $f$ is strictly increasing. If not, then there are $p<q$ with $f(p)\ge f(q)$. Since $f$ is 1-1 it must be the case that $f(p)>f(q)$. So, consider the interval $J=[a,q]$. By part (a) applied to the restriction of $f$ on the interval $J$ we must have that $f$ has a maximum at either the point $a$ or at the point $q$. But, neither could be the case as $f(p)>f(q)\ge m=f(a)$. This contradiction shows that $f$ must be strictly increasing on $[a,b]$ assuming $f(a)=m$, $f(b)=M$. The case when $f(a)=M$, $f(b)=m$ is considered similarly, then $f$ must be strictly decreasing on the interval $[a,b]$. 
