# Defining a convex function geometrically - proof explanation

I am currently reading a book about inequalities, and am on the section about convex functions. It is defined as follows:

A function $f : [a,b] \rightarrow \Bbb R$ is called convex in the interval $I=[a,b]$ if for any $t \in [0,1]$ and for all $a \le x \lt y \le b$, the following inequality holds:

$$f(ty+(1-t)x)\le tf(y)+(1-t)f(x)$$

Geometrically, the inequality in the definition means the graph of $f$ between $x$ and $y$ is below the segment which joins the points $(x,f(x))$ and $(y,f(y))$. In fact, the equation of the line joining the points $(x,f(x))$ and $(y,f(y))$ is expressed as $$L(s)=f(x) + \frac{f(y)-f(x)}{y-x}(s-x)$$

Q1: What does the s in the formula represent

Then, evaluating at the point $s=ty+(1-tx)$, we get

$$L(ty+(1-tx))=f(x) + \frac{f(y)-f(x)}{y-x}(t(y-x))=f(x)+t(f(y)-f(x))=tf(y)+(1-t)f(x)$$

Hence, the top inequality is equivilant to

$$f(ty+(1-t)x)\le L(ty+(1-t)x)$$

Q2: Can somebody please explain the transition in the last two lines and where the final inequality comes from? (I do understand the substitution and the manipulations, it is just how the last inequality was deduced).

Thanks.

• What does the s in the formula represent $s$ is an abscissa between $x$ and $y$ and $(s, L(s))$ is a point on the line segment between $(x, f(x))$ and $(y, f(y))$. – dxiv Sep 19 '16 at 23:20