[Home]

Table of contents


Convex function

Here are two possible definitions of a convex function. We have already given the first definition:
Definition: Convex function (version 1) A function $f:{\mathbb R}\rightarrow{\mathbb R}$ is called convex if $\forall a\in{\mathbb R}$ there is a line $y = \ell_a(x)$ through $(a,f(a))$ that lies on or below the graph of $f(x),$ i.e., $$ \forall x\in{\mathbb R}~~ \ell_a(x) \leq f(x). $$

The second definition is

Definition: Convex function (version 2) A function $f:{\mathbb R}\rightarrow{\mathbb R}$ is called convex if $\forall a< b \in{\mathbb R}$ and $\forall \alpha \in (0,1)$ we have $$ f(\alpha a + (1-\alpha) b) \leq \alpha f(a) + (1-\alpha) f(b). $$
Given any two number $a,b$ all numbers between them may be expressed as $\alpha a+ (1-\alpha) b$ for some $\alpha\in(0,1).$ Also for any $\alpha\in(0,1)$ the number $\alpha a+ (1-\alpha) b$ must lie between $a$ and $b.$ So graphically, the second definition means the chord always lies above the graph of the function.

We shall now show that these two definitions are equivalent.

Theorem If $f(x)$ is convex according to the first version, then it must be convex according to the second version.

Proof: We shall show this using probability!

Take any $a < b\in{\mathbb R}$ and any $\alpha \in (0,1).$

Define a random variable that takes values $a$ and $b$ with probabilities $\alpha$ and $1-\alpha,$ respectively.

Then Jensen's inequality says $f(E(X))\leq E(f(X)).$

Now $E(X) = \alpha a + (1-\alpha) b$ and $E(f(X)) = \alpha f(a) + (1-\alpha) f(b).$

Hence the result. [QED]

Theorem If $f(x)$ is convex according to the second version, then it must be convex according to the first version.

Proof: For any $a < b\in{\mathbb R}$ define $slope(a,b)$ as the slope of the chord of $f(x)$ over $[a,b].$ In other words, $$ slope(a,b) = \frac{f(b)-f(a)}{b-a}. $$

Notice that if $x_1 < x_2 < x_3,$ then $slope(x_1,x_2) \leq slope(x_2,x_3)$ and $slope(x_1,x_3) \leq slope(x_2,x_3).$

Now take any $a\in{\mathbb R}.$ Fix any $b > a.$

Define, for $ x< a,$ a new function $g(x) = slope(x,a).$

Notice that $g(x)$ is a nondecreasing function. (Why?) Also it is bounded from above by $slope(a,b).$ (Why?)

So $\lim_{x\rightarrow a-} g(x)$ must exist finitely. (Why?) Call it $m.$

Define $\ell_a(x)$ as the line through $(a,f(a))$ with slope $m.$ In other words, $\ell_a(x) = f(a) + m(x-a).$

It is easy to see that this $\ell_a(x)$ works for us. [QED]

Comments

To post an anonymous comment, click on the "Name" field. This will bring up an option saying "I'd rather post as a guest."