Skip to content

Convexity and Concavity

Definition

Let EE be an interval and let f ⁣:E→Rf\colon E\to\mathbb{R} be a function. The function ff is convex on EE if, for all x1,x2∈Ex_1,x_2\in E and every 0<α<1,0<\alpha<1\text{,}

f((1−α)x1+αx2)≤(1−α)f(x1)+αf(x2),f((1-\alpha )x_1+\alpha x_2)\leq (1-\alpha )f(x_1) +\alpha f(x_2),

and concave on EE if the inequality is reversed. If x1≠x2x_1\neq x_2 always gives a strict inequality, we say that ff is strictly convex or strictly concave.

The point (1−α)x1+αx2(1-\alpha)x_1+\alpha x_2 lies between x1x_1 and x2,x_2\text{,} which is why the domain has to be an interval.


Interpretation

Convexity compares a function with its chords: ff is convex when the chord between any two points of its graph lies on or above the graph, and concave when it lies on or below it. A convex graph bends upwards, a concave one downwards.

The parabola y = x squared, which lies below its dashed chord, and the parabola y = -x squared, which lies above its dashed chord.

The dashed chords join the points of each graph at x=−1.5x=-1.5 and x=1.5x=1.5. For y=x2y=x^2 the chord lies at height 2.252.25, while the graph dips to 00 in the middle, so x2x^2 is convex. For y=−x2y=-x^2 everything is reflected: the chord lies below the graph, and −x2-x^2 is concave.

Move x1x_1, x2x_2 and α\alpha and compare f((1−α)x1+αx2)f((1-\alpha)x_1+\alpha x_2) with the chord value (1−α)f(x1)+αf(x2)(1-\alpha)f(x_1)+\alpha f(x_2). For x3x^3 the answer depends on where the chord sits.

In the definition, the point (1−α)x1+αx2(1-\alpha)x_1+\alpha x_2 runs from x1x_1 to x2x_2 as α\alpha runs from 00 to 11, and (1−α)f(x1)+αf(x2)(1-\alpha)f(x_1)+\alpha f(x_2) is the height of the chord above that point, with the same weights. So the inequality says: the value at a weighted average of two inputs is at most the same weighted average of the two values. For differentiable functions this is equivalent to f′f' being increasing, and for twice differentiable functions to f′′≥0f''\ge0, as the Key Results state; but convexity itself needs no derivatives, as ∣x∣|x| shows.

Convexity makes optimization simple. A convex differentiable function lies above each of its tangent lines, so on an interval every stationary point of it is a global minimum. Some books say "concave up" for convex and "concave down" for concave; the meaning is the same. The averaging inequality returns in Probability Distributions as Jensen's inequality, and Math IV extends the definition to functions of several variables.


Key Results

  • Tangent/secant line test. For a convex graph, secants lie above the curve and tangents lie below it; for a concave graph both comparisons reverse.
  • A differentiable function ff is (strictly) convex on EE exactly when f′f' is (strictly) increasing on E,E\text{,} and (strictly) concave exactly when f′f' is (strictly) decreasing.
  • ff is (strictly) convex if and only if −f-f is (strictly) concave.
  • Necessary condition. If ff is twice differentiable at x0x_0 and convex on some interval (x0−ε,x0+ε),(x_0-\varepsilon,x_0+\varepsilon)\text{,} then f′′(x0)≥0;f''(x_0)\geq 0\text{;} if it is concave there, then f′′(x0)≤0.f''(x_0)\leq 0\text{.}
  • Sufficient condition. If f′′>0f''>0 on (a,b)(a,b) then ff is strictly convex there; if f′′<0f''<0 then strictly concave; and ff is affine on (a,b),(a,b)\text{,} i.e. of the form f(x)=mx+c,f(x)=mx+c\text{,} if and only if f′′≡0.f''\equiv 0\text{.}
  • Complete criterion. For twice-differentiable f ⁣:(a,b)→R,f\colon (a,b)\to\mathbb{R}\text{,} ff is convex on (a,b)(a,b) if and only if f′′≥0f''\geq 0 throughout, and concave if and only if f′′≤0f''\leq 0 throughout.
  • Strict inequalities are sufficient for strictness but not necessary: f(x)=x4f(x)=x^4 is strictly convex although f′′(0)=0.f''(0)=0\text{.}

Examples

  • The function f(x)=exf(x)=\mathrm{e}^x is strictly convex on R\mathbb{R} since f′′(x)=ex>0.f''(x)=\mathrm{e}^x>0\text{.}
  • The function f(x)=−x2f(x)=-x^2 is strictly concave on R.\mathbb{R}\text{.}
  • The function f(x)=∣x∣f(x)=|x| is convex although it is not differentiable at x=0;x=0\text{;} it is not strictly convex.
  • The function f(x)=1/x2f(x)=1/x^2 is strictly convex on (0,+∞)(0,+\infty) and on (−∞,0)(-\infty,0) separately, but not on (−∞,0)∪(0,+∞),(-\infty,0)\cup(0,+\infty)\text{,} which is not an interval.

Prerequisites

Sources

Aliases: concave up, concave down Keywords: convex function, concave function Symbols: alpha, element of, epsilon, infinity, real numbers, union

Last updated: 22 October 2026 19:04