# Proof that an injective function is strictly monotonic

I'm self learning real analysis from a book and in one of the exercise I struggle to understand the correction of the second point. Here is the instruction of the exercise :

$$f$$ is an injective function form $$I$$ to $$\mathbb R$$, continue on $$I$$:

1. Assume that f is not strictly monotonic on I. Show that there exist 4 real number a,b,x,y in I such $$x and $$f(x)>f(y)$$, $$a and $$f(a).

This was straight forward, I write what it mean in term of quantificator.

$$\exists (x,y)\in I^2 (x \neq y\Rightarrow f(x)\geq f(y)) \\\text{and}\\ \exists (a,b)\in I^2 (a \neq b\Rightarrow f(a)\leq f(b))$$ and because f is an injectiv function we can replace the inequality signs by strict one.

1. Consider the map: $$\phi(x): \lambda \in [0,1] \mapsto f((1-\lambda)b+\lambda y)-f((1-\lambda)a+\lambda x)$$ The goal is to show that there exists $$\lambda_0$$ such that $$\phi(\lambda_0)=0$$.

Here is where I struggle. I understand that $$(1-\lambda)b+\lambda y$$ lie in between $$b$$ and $$y$$ similarly that $$(1-\lambda)a+\lambda x)$$ lie in between $$a$$ and $$x$$ and therefore those two number belong to $$I$$. However on the solution of the exercise they say that $$\phi(a)=\phi(b)=0$$ and this is the part that I don't understand. Then,they used the mean value theorem to conclude that $$\lambda_0$$ exist.

1. This was straight forward but in case someone is interested in the exercise. Show that $$\phi(\lambda_0)=0$$ is a contradiction with f being injective. Then conclude that an injective function for $$I$$ to $$\Bbb R$$ is strictly monotonic.

Note that$$\phi(0)=f(b)-f(a)>0\quad\text{and}\quad\phi(1)=f(y)-f(x)<0.$$So, since $$\phi$$ is continuous, it must be equal to $$0$$ somewhere between $$0$$ and $$1$$.