Strict monotony implies monotony, so $f$ is monotone on $[a,b]$. If it's not strictly so, then either $f(a) = f(c)$ for some $c \in (a,b]$ or $f(b) = f(d)$ for some $d\in [a,b)$. WLOG say the former is the case and that $f \uparrow$. Let $e = (a+c)/2$. Then $f(e) < f(c)$ by strict monotony on $(a,b)$, so $f(a) < f(c)$ since $f(a) \le f(e)$. A contradiction.