Definition:Convex Real Function

Definition
Let $f$ be a real function which is defined on a real interval $I$.

Then $f$ is convex on $I$ iff:


 * $\forall x, y \in I: \forall \alpha, \beta \in \R_{>0}, \alpha + \beta = 1: f \left({\alpha x + \beta y}\right) \le \alpha f \left({x}\right) + \beta f \left({y}\right)$

Equivalently:


 * $\forall x, y \in I: \forall t \in \left({0 \,.\,.\, 1}\right) : f \left({tx + \left({1 - t}\right) y}\right) \le t f\left({x}\right) + \left({1 - t}\right) f \left({y}\right)$

The function $f$ is strictly convex on $I$ if, in the above inequalities, equality cannot hold unless $x = y$.


 * [[File:ConvexFunction1.png]]

The geometric interpretation is that any point on the chord drawn on the graph of any convex function always lies on or above the graph.

Alternative Definition
A real function $f$ defined on a real interval $I$ is convex on $I$ iff:


 * $\forall x_1, x_2, x_3 \in I: x_1 < x_2 < x_3: \dfrac {f \left({x_2}\right) - f \left({x_1}\right)} {x_2 - x_1} \le \dfrac {f \left({x_3}\right) - f \left({x_2}\right)} {x_3 - x_2}$

or:


 * $\forall x_1, x_2, x_3 \in I: x_1 < x_2 < x_3: \dfrac {f \left({x_2}\right) - f \left({x_1}\right)} {x_2 - x_1} \le \dfrac {f \left({x_3}\right) - f \left({x_1}\right)} {x_3 - x_1}$

The function $f$ is strictly convex on $I$ if, in the above inequalities, equality cannot hold.


 * ConvexFunction2.png ConvexFunction3.png

Hence a geometrical interpretation:
 * In the left hand image above, the slope of $P_1 P_2$ is less than that of $P_2 P_3$.
 * In the right hand image above, the slope of $P_1 P_2$ is less than that of $P_1 P_3$.

Equivalence of Definitions
These two definitions can be seen to be equivalent from Equivalence of Convex and Concave Definitions.

Also known as
Some sources refer to a convex function as a concave up function.

Also see

 * Compare concave function. It is immediately obvious from the definition that $f$ is convex on $I$ iff $-f$ is concave on $I$.