Mathematics · Glossary

What is Convex function?

Also known as: convexity · concave

Definition 22.11 High School Mathematics · Chapter 22 — Differentiation and Convexity

A function ff defined on an interval II is convex on II if every chord of its graph lies above the graph: for all a,bIa, b \in I and t[0,1]t \in \intcc{0}{1},

f((1t)a+tb)(1t)f(a)+tf(b).f\bigl((1-t)a + t b\bigr) \leq (1-t) f(a) + t f(b).

It is concave if the reverse inequality holds (f-f convex).

A convex function: every chord (red) lies above the graph, and the graph lies above each of its tangents (orange). The dashed segment shows the gap between f ((1-t)a+tb ) and (1-t)f(a)+tf(b).
A convex function: every chord (red) lies above the graph, and the graph lies above each of its tangents (orange). The dashed segment shows the gap between f((1t)a+tb)f\bigl((1-t)a+tb\bigr) and (1t)f(a)+tf(b)(1-t)f(a)+tf(b).

Examples

Example 22.14

f(x)=x3f(x) = x^3 has f(x)=6xf''(x) = 6x: ff is concave on (,0]\intoc{-\infty}{0}, convex on [0,+)\intco{0}{+\infty}, with an inflection point at the origin, where the curve crosses its tangent (the xx-axis).

Example 22.15 (Convexity inequalities)

The exponential is convex on R\R (its second derivative is itself, positive). Its tangent at 00 is y=1+xy = 1 + x, so

ex1+xfor all xR.\eu^x \geq 1 + x \quad \text{for all } x \in \R .

Such tangent line inequalities are a standard product of convexity.

Read in context →
Definition 14.18 University Mathematics — Year 1 · Chapter 14 — Differentiation

f ⁣:IRf \colon I \to \R is convex when every chord lies above the graph:

x,yI, t[0,1],f(tx+(1t)y)tf(x)+(1t)f(y).\forall x, y \in I,\ \forall t \in \intcc{0}{1}, \quad f\bigl(tx + (1-t)y\bigr) \leq t f(x) + (1-t) f(y).

(ff is concave when f-f is convex.)

Convexity, twice: every chord (gray) lies above the graph, and the graph lies above every tangent (dashed).
Convexity, twice: every chord (gray) lies above the graph, and the graph lies above every tangent (dashed).

Examples

Example 14.20 (Classical convexity inequalities)

exp\exp is convex (exp=exp>0\exp'' = \exp > 0): its tangent at 00 gives ex1+x\eu^x \geq 1 + x for all xx. ln\ln is concave: its tangent at 11 gives lnxx1\ln x \leq x - 1; its chords give, for 0<ab0 < a \leq b, the inequality between geometric and arithmetic means: taking t=12t = \frac12 in concavity,

lna+b2lna+lnb2=lnab,soaba+b2.\ln\frac{a + b}{2} \geq \frac{\ln a + \ln b}{2} = \ln\sqrt{ab}, \qquad\text{so}\qquad \sqrt{ab} \leq \frac{a+b}{2} .

The general arithmetic–geometric inequality is Exercise 14.9.

Example 14.21 (A convexity inequality from scratch)

The function f(t)=tlntf(t) = t\ln t is convex on (0,+)\intoo{0}{+\infty}: f(t)=1t>0f''(t) = \frac1t > 0. Its midpoint inequality, multiplied by 22, reads: for all a,b>0a, b > 0,

alna+blnb    (a+b)lna+b2,a\ln a + b\ln b \;\geq\; (a + b)\,\ln\frac{a + b}{2} ,

with equality iff a=ba = b (strict convexity). Test drive: a=1a = 1, b=3b = 3 gives 3ln3=3.2963\ln 3 = 3.296 against 4ln2=2.7734\ln 2 = 2.773. This innocuous inequality is the two-point case of the entropy comparison that reappears with Jensen’s inequality (Exercise 14.9) and in the information-theoretic asymptotics of the Year 3 volume. The closing insight: to manufacture an inequality, find a function whose second derivative has a sign and write down what convexity says — the differential characterization turns one sign check into infinitely many inequalities.

Example 14.24 (Young’s inequality from concavity)

Let p,q>1p, q > 1 with 1p+1q=1\frac1p + \frac1q = 1. For all a,b>0a, b > 0:

ab    app+bqq.ab \;\leq\; \frac{a^p}{p} + \frac{b^q}{q} .

Proof by one application of the concavity of ln\ln with weights 1p,1q\frac1p, \frac1q (the two-point Jensen inequality, as in Exercise 14.9):

ln(app+bqq)    1pln(ap)+1qln(bq)=lna+lnb=ln(ab),\ln\Bigl(\frac{a^p}{p} + \frac{b^q}{q}\Bigr) \;\geq\; \frac1p \ln(a^p) + \frac1q \ln(b^q) = \ln a + \ln b = \ln(ab),

and ln\ln increasing converts the inequality of logarithms into the claim; equality iff ap=bqa^p = b^q (strict concavity). The case p=q=2p = q = 2 is the arithmetic-geometric inequality aba2+b22ab \leq \frac{a^2 + b^2}{2} in disguise. The closing insight: Young’s inequality is the algebraic seed of the Hölder and Minkowski inequalities of the Year 2 volume — one concavity statement about ln\ln, harvested for norms.

Read in context →