There are two definitions of a convex function over an interval $I$ (i) For $x_1 < x < x_2$  
we have
$$
\frac{f(x)-f(x_1)}{(x-x_1)} \le \frac{f(x_2)-f(x)}{(x_2-x)} \tag{1}
$$
and 
(ii) For every $x_1$ and $x_2$ in $I$ and every $λ: 0 < \lambda < 1$ 
we have
$$
f(\lambda x_1+(1-\lambda)x_2)\le \lambda f(x_1)+(1-\lambda)f(x_2)\tag{2}
$$
Show that $(1)\implies(2)$
I have tried cross-multiplying the denominators in $(1)$ but I'm completely stuck.
 A: After the cross multiplication, we have $(x_2-x_1)f(x)\leq(x_2-x)f(x_1)+(x-x_1)f(x_2)$
Hint: any number $x\in [x_1,x_2]$ can be written in the form $\lambda x_1+ (1-\lambda) x_2$, with $\lambda\in (0,1)$. I'm leaving this unproven as an exercise!
After that, our inequality becomes :$(x_2-x_1)f(x)\leq \lambda(x_2-x_1)f(x_1)+(1-\lambda)(x_2-x_1)f(x_2)$. By cancelling the common factor $(x_2-x_1)>0$ from both sides, you have what you want.
A: Assume that  $x_1 < x < x_2$, and let $L$ be the function whose graph is the line segment joining the points $(x_1,f(x_1))$ and $(x_2, f(x_2))$. 
$\qquad \qquad \qquad \qquad $
Of course, the slope of the segment on the left is equal to the slope of the segment on the right:
$$
\frac{L(x) - f(x_1)}{x - x_1} = \frac{f(x_2) - L(x)}{x_2 - x}.
$$
If we were to replace $L(x)$ with a greater number, then the term on the left would increase and the term on the right would decrease. 
$\qquad \qquad \qquad \qquad$
So, if it were true that $f(x) > L(x)$, then we would have
$$
\frac{f(x) - f(x_1)}{x - x_1} > \frac{L(x) - f(x_1)}{x - x_1} = \frac{f(x_2) - L(x)}{x_2 - x} > \frac{f(x_2) - f(x)}{x_2 - x} .
$$
But this contradicts condition (i). Thus, condition (i) implies that $f(x) \leq L(x)$.
