Convexity and the Second Derivative

Why does a graph shaped like a bowl always sit above its own tangent lines? This simple geometric fact — that convex curves never dip below their tangents — turns out to be exactly equivalent to an analytic statement about derivatives. It is the hinge on which a huge amount of calculus, optimization, and analysis turns. Convexity is the property that separates functions whose critical points are automatically global minima from functions with complicated landscapes of local extrema. It is also the reason inequalities like the arithmetic-geometric mean inequality or Jensen's inequality hold. The central discovery of this article is that convexity, a purely geometric condition about chords and tangent lines, can be completely characterized by monotonicity of the derivative. When a second derivative exists, it can also be characterized by its sign. This converts a global, quantifier-heavy geometric definition into a pointwise, computable criterion: check whether f′′(x)≥0f''(x) \geq 0. The bridge between the geometric and the analytic pictures is built using the Mean Value Theorem and the established link between Monotonicity and the Sign of the Derivative. The payoff is twofold. First, we get a rigorous second derivative test: at a critical point where f′′f'' is strictly positive, ff has a strict local minimum. Dually, where f′′f'' is strictly negative, ff has a strict local maximum. Second, we get a structural understanding of the entire graph of ff. This includes where it curves upward, where it curves downward, and where it switches (an inflection point). Such understanding is indispensable for accurate curve-sketching. It is also essential for later work on Taylor Polynomials and Local Approximation, where the second derivative controls the quadratic term of the local approximation. This article gives the precise definition of convexity for a function on an interval. It proves the equivalence with monotonicity of f′f', and proves the second-derivative criterion. It also proves the second-derivative test for local extrema. Full hypotheses and complete proofs are included, along with worked examples with asymmetric data. A counterexample shows exactly where each hypothesis is load-bearing.

Key takeaways
  • A function ff is convex on an interval if every chord lies on or above the graph; equivalently, the graph lies on or above every tangent line.
  • Convexity   ⟺  \iff f′f' is nondecreasing (assuming ff differentiable on the interval) — a direct corollary of the Mean Value Theorem.
  • If f′′f'' exists and f′′≥0f'' \geq 0 throughout an interval, ff is convex there; if f′′>0f'' > 0, ff is strictly convex.
  • The second derivative test: at a critical point cc with f′′(c)>0f''(c) > 0, ff has a strict local min; with f′′(c)<0f''(c) < 0, a strict local max; f′′(c)=0f''(c)=0 is inconclusive.
  • An inflection point is a point where convexity switches from one type to the other; if f′′f'' exists there and is continuous nearby, f′′f'' must vanish at such a point, but the converse can fail.
  • Strict inequalities in the hypothesis do not always give strict inequalities in the conclusion, and vice versa — the classic trap is assuming f′′(c)=0f''(c)=0 forces an inflection point.
  • Key idea: convexity is a global geometric statement about chords and tangents that collapses, via the Mean Value Theorem, into the simple pointwise condition f′′≥0f'' \geq 0.

Where this lives today

Convexity detected via f′′≥0f'' \geq 0 is the workhorse test in optimization theory: convex objective functions guarantee that any local minimum found by gradient descent is a global minimum, which is the theoretical bedrock of convex optimization used throughout machine learning, statistics (maximum likelihood estimation for exponential families), and operations research (linear and quadratic programming). In economics, concavity of utility functions (equivalently convexity of −u-u) encodes diminishing marginal utility, and the second-derivative sign test identifies optimal consumption bundles. In physics, the convexity of potential energy functions near equilibrium (via a positive second derivative, i.e. a positive "spring constant") is precisely the condition for stable equilibrium, a direct application of the second derivative test. In probability and information theory, Jensen's inequality — a direct consequence of the chord definition of convexity — underlies bounds on entropy, moment inequalities, and the AM–GM inequality. In numerical analysis and CS, convexity certificates (checking f′′≥0f''\geq0 symbolically or numerically) are used to certify that a numerical solver's found critical point is trustworthy, and convex functions admit especially efficient root-finding and optimization algorithms (e.g. Newton's method converges globally on convex problems under mild conditions).

Ask the tutor: How does the second derivative controlling convexity foreshadow the role of the quadratic term in a Taylor expansion?

DefinitionConvex function

Let I⊆RI \subseteq \mathbb{R} be an interval and let f:I→Rf : I \to \mathbb{R}. We say ff is convex on II if for all x1,x2∈Ix_1, x_2 \in I and all t∈[0,1]t \in [0,1],

f(tx1+(1−t)x2)  ≤  tf(x1)+(1−t)f(x2).f\big(t x_1 + (1-t) x_2\big) \;\leq\; t f(x_1) + (1-t) f(x_2).

We say ff is strictly convex on II if the inequality is strict whenever x1≠x2x_1 \neq x_2 and t∈(0,1)t \in (0,1). We say ff is (strictly) concave if −f-f is (strictly) convex. Geometrically: the point (tx1+(1−t)x2, tf(x1)+(1−t)f(x2))(t x_1 + (1-t)x_2,\ tf(x_1)+(1-t)f(x_2)) traces the chord joining (x1,f(x1))(x_1, f(x_1)) to (x2,f(x2))(x_2, f(x_2)) as tt ranges over [0,1][0,1], so convexity says every chord lies on or above the graph. A point cc in the interior of II is an inflection point of ff if ff is convex on one side of cc and concave on the other — i.e., there exist δ>0\delta > 0 with ff convex on (c−δ,c](c-\delta, c] and concave on [c,c+δ)[c, c+\delta), or vice versa.

Intuition

Picture the graph of ff as a wire bent into some shape. Convexity says: stretch a rubber band between any two points on the wire, and the band (the chord) stays above the wire everywhere in between. This is a statement about all pairs of points simultaneously — a global condition. Yet intuitively, "curving upward like a bowl" feels like a local property, something you could in principle detect by zooming in on a single point and checking how fast the slope is changing there. The derivative f′(x)f'(x) is the instantaneous slope. If f′f' is increasing as xx increases, the tangent lines are rotating counterclockwise as we sweep left to right — exactly the rotation pattern that keeps chords above the curve. This is the first bridge: convex   ⟺  \iff f′f' nondecreasing. The second derivative measures the rate at which the slope changes, so f′′≥0f'' \geq 0 is the infinitesimal version of "f′f' nondecreasing," which the Mean Value Theorem promotes to the full statement about f′f' on the whole interval, which in turn (via another application of MVT) promotes to the full chord statement about ff. At a critical point (f′(c)=0f'(c) = 0), convexity near cc means the tangent line at cc is horizontal and the curve stays above it — so cc must be a local minimum. This is the geometric heart of the second derivative test.

Figure
Convex graph, its chord, and its tangent line at a point
x y (x₁, f(x₁)) (x₂, f(x₂)) tangent at c chord lies above curve; curve lies above tangent
TheoremConvexity, monotonicity of f′f', and the sign of f′′f''

Let I⊆RI \subseteq \mathbb{R} be an open interval and let f:I→Rf : I \to \mathbb{R} be differentiable on II.

(A) ff is convex on II if and only if f′f' is nondecreasing on II.

(B) ff is strictly convex on II if and only if f′f' is strictly increasing on II.

(C) If in addition ff is twice differentiable on II, then:

  • ff is convex on II if and only if f′′(x)≥0f''(x) \geq 0 for all x∈Ix \in I.
  • If f′′(x)>0f''(x) > 0 for all x∈Ix \in I, then ff is strictly convex on II (the converse is false in general).

(The analogous statements for concave functions hold with all inequalities reversed, applying the theorem to −f-f.)

Proof

We break the proof into steps, each a self-contained lemma, using the Mean Value Theorem as the sole analytic engine and the established equivalence between sign of a derivative and monotonicity from Monotonicity and the Sign of the Derivative for part (C).

Step 1: An equivalent three-point form of convexity. Claim: ff is convex on II if and only if for all a,b,c∈Ia, b, c \in I with a<b<ca < b < c,

f(b)−f(a)b−a  ≤  f(c)−f(a)c−a  ≤  f(c)−f(b)c−b.(∗)\frac{f(b)-f(a)}{b-a} \;\leq\; \frac{f(c)-f(a)}{c-a} \;\leq\; \frac{f(c)-f(b)}{c-b}. \tag{$\ast$}

Proof of claim. Write b=ta+(1−t)cb = ta + (1-t)c where t=c−bc−a∈(0,1)t = \frac{c-b}{c-a} \in (0,1) (so 1−t=b−ac−a1-t = \frac{b-a}{c-a}). Convexity applied to x1=a,x2=cx_1=a, x_2=c gives

f(b)≤tf(a)+(1−t)f(c)=f(a)+(1−t)(f(c)−f(a))=f(a)+b−ac−a(f(c)−f(a)).f(b) \leq t f(a) + (1-t) f(c) = f(a) + (1-t)\big(f(c)-f(a)\big) = f(a) + \frac{b-a}{c-a}\big(f(c)-f(a)\big).

Subtracting f(a)f(a) and dividing by b−a>0b - a > 0:

f(b)−f(a)b−a≤f(c)−f(a)c−a.\frac{f(b)-f(a)}{b-a} \leq \frac{f(c)-f(a)}{c-a}.

This is the left inequality of (∗)(\ast). For the right inequality, rewrite the same convexity inequality as

f(c)−f(b)≥f(c)−tf(a)−(1−t)f(c)=t(f(c)−f(a))=c−bc−a(f(c)−f(a)),f(c) - f(b) \geq f(c) - t f(a) - (1-t) f(c) = t\big(f(c) - f(a)\big) = \frac{c-b}{c-a}\big(f(c)-f(a)\big),

and divide by c−b>0c-b>0 to get f(c)−f(b)c−b≥f(c)−f(a)c−a\frac{f(c)-f(b)}{c-b} \geq \frac{f(c)-f(a)}{c-a}, the right inequality. Conversely, if (∗)(\ast) holds for all a<b<ca<b<c in II, reversing the algebra above (for any x1≠x2x_1 \neq x_2 in II and t∈(0,1)t\in(0,1), set a=min⁡(x1,x2)a = \min(x_1,x_2), c=max⁡(x1,x2)c=\max(x_1,x_2), b=tx1+(1−t)x2b = tx_1+(1-t)x_2, which lies strictly between aa and cc) recovers the defining inequality of convexity. This proves the claim, with strict inequalities throughout corresponding to strict convexity by the identical argument with ≤\leq replaced by <<. ■\blacksquare (end of Step 1)

Step 2 (A, ⇒\Rightarrow): Convex implies f′f' nondecreasing. Suppose ff is convex on II. Let u<vu < v in II; we must show f′(u)≤f′(v)f'(u) \leq f'(v). Pick any ww with u<w<vu < w < v (possible since II is an interval, hence contains (u,v)(u,v)). By (∗)(\ast) with a=u,b=w,c=va=u, b=w, c=v:

f(w)−f(u)w−u≤f(v)−f(u)v−u≤f(v)−f(w)v−w.\frac{f(w)-f(u)}{w-u} \leq \frac{f(v)-f(u)}{v-u} \leq \frac{f(v)-f(w)}{v-w}.

Now let w→u+w \to u^+ in the leftmost expression: since ff is differentiable at uu, f(w)−f(u)w−u→f′(u)\frac{f(w)-f(u)}{w-u} \to f'(u). This gives

f′(u)≤f(v)−f(u)v−u.f'(u) \leq \frac{f(v)-f(u)}{v-u}.

Similarly, let w→v−w \to v^- in the rightmost expression: f(v)−f(w)v−w→f′(v)\frac{f(v)-f(w)}{v-w} \to f'(v), giving

f(v)−f(u)v−u≤f′(v).\frac{f(v)-f(u)}{v-u} \leq f'(v).

Chaining these: f′(u)≤f(v)−f(u)v−u≤f′(v)f'(u) \leq \frac{f(v)-f(u)}{v-u} \leq f'(v), so f′(u)≤f′(v)f'(u) \leq f'(v). Since u<vu<v were arbitrary, f′f' is nondecreasing on II.

Step 3 (A, ⇐\Leftarrow): f′f' nondecreasing implies convex. Suppose f′f' is nondecreasing on II. We verify (∗)(\ast) for arbitrary a<b<ca<b<c in II. By the Mean Value Theorem applied to ff on [a,b][a,b] and on [b,c][b,c] (valid since ff is differentiable, hence continuous, on these closed sub-intervals contained in II), there exist ξ1∈(a,b)\xi_1 \in (a,b) and ξ2∈(b,c)\xi_2 \in (b,c) with

f(b)−f(a)b−a=f′(ξ1),f(c)−f(b)c−b=f′(ξ2).\frac{f(b)-f(a)}{b-a} = f'(\xi_1), \qquad \frac{f(c)-f(b)}{c-b} = f'(\xi_2).

Since ξ1<b<ξ2\xi_1 < b < \xi_2 and f′f' is nondecreasing, f′(ξ1)≤f′(ξ2)f'(\xi_1) \leq f'(\xi_2), i.e.

f(b)−f(a)b−a≤f(c)−f(b)c−b.(†)\frac{f(b)-f(a)}{b-a} \leq \frac{f(c)-f(b)}{c-b}. \tag{$\dagger$}

This gives the outer inequality of a rearranged form of (∗)(\ast); we still must derive the two inequalities in (∗)(\ast) involving the chord over [a,c][a,c]. Note that

f(c)−f(a)c−a\frac{f(c)-f(a)}{c-a}

is a weighted average of f(b)−f(a)b−a\frac{f(b)-f(a)}{b-a} and f(c)−f(b)c−b\frac{f(c)-f(b)}{c-b}: explicitly, with λ=b−ac−a∈(0,1)\lambda = \frac{b-a}{c-a} \in (0,1),

f(c)−f(a)c−a=λ⋅f(b)−f(a)b−a+(1−λ)⋅f(c)−f(b)c−b,\frac{f(c)-f(a)}{c-a} = \lambda \cdot \frac{f(b)-f(a)}{b-a} + (1-\lambda)\cdot \frac{f(c)-f(b)}{c-b},

which is verified directly: f(c)−f(a)=(f(b)−f(a))+(f(c)−f(b))f(c)-f(a) = (f(b)-f(a)) + (f(c)-f(b)), and dividing through appropriately recovers this weighted-average identity (a short algebraic check: λ(b−a)+(1−λ)(c−b)⋅c−ac−a\lambda(b-a) + (1-\lambda)(c-b) \cdot \frac{c-a}{c-a} reduces correctly since λ=b−ac−a\lambda = \frac{b-a}{c-a} makes the two terms combine to (f(b)−f(a))+(f(c)−f(b))c−a=f(c)−f(a)c−a\frac{(f(b)-f(a))+(f(c)-f(b))}{c-a} = \frac{f(c)-f(a)}{c-a}). Since a weighted average of two numbers lies between them, and by (†)(\dagger) the first is ≤\leq the second, we get

f(b)−f(a)b−a≤f(c)−f(a)c−a≤f(c)−f(b)c−b,\frac{f(b)-f(a)}{b-a} \leq \frac{f(c)-f(a)}{c-a} \leq \frac{f(c)-f(b)}{c-b},

which is exactly (∗)(\ast). By Step 1, ff is convex on II.

Step 4 (B): Strict version. If f′f' is strictly increasing, the inequality f′(ξ1)≤f′(ξ2)f'(\xi_1) \leq f'(\xi_2) in Step 3 becomes strict (since ξ1<ξ2\xi_1 < \xi_2), making (†)(\dagger) strict, and the weighted-average argument then gives strict inequalities in (∗)(\ast); by the strict case of Step 1's claim, ff is strictly convex. Conversely, if ff is strictly convex, then (∗)(\ast) holds strictly for all a<b<ca<b<c; running the limiting argument of Step 2 with u<vu<v fixed and inserting a strict inequality point ww shows f′(u)<f(v)−f(u)v−u<f′(v)f'(u) < \frac{f(v)-f(u)}{v-u} < f'(v) whenever such a ww exists strictly between u,vu,v — which it always does since II is an interval — giving f′(u)<f′(v)f'(u) < f'(v) strictly. (The key point: the two limiting inequalities from Step 2 remain non-strict in the limit even when the pre-limit inequality is strict, but here we get the sharper strict middle term f(v)−f(u)v−u\frac{f(v)-f(u)}{v-u} sandwiched strictly, which forces f′(u)≠f′(v)f'(u) \neq f'(v) combined with the already-established f′(u)≤f′(v)f'(u)\le f'(v) from part (A); hence f′(u)<f′(v)f'(u)<f'(v).) This establishes (B).

Step 5 (C): The second-derivative criterion. Now suppose ff is twice differentiable on II, so f′′=(f′)′f''=(f')' exists on II. By the result Monotonicity and the Sign of the Derivative applied to the function g:=f′g := f' (which is differentiable with g′=f′′g' = f''):

g is nondecreasing on I  ⟺  g′(x)≥0 for all x∈I,g \text{ is nondecreasing on } I \iff g'(x) \geq 0 \text{ for all } x\in I,

i.e. f′f' is nondecreasing on II if and only if f′′(x)≥0f''(x) \geq 0 for all x∈Ix \in I. Combined with part (A), this gives:

f convex on I  ⟺  f′′(x)≥0 for all x∈I.f \text{ convex on } I \iff f''(x) \geq 0 \text{ for all } x \in I.

For the strict statement: the same cited result gives that g′(x)>0g'(x) > 0 for all xx implies gg strictly increasing (this is the direction of that theorem that does not require a converse), i.e. f′′>0f''>0 everywhere implies f′f' strictly increasing, which by part (B) implies ff strictly convex. The converse fails — a strictly convex ff need not have f′′>0f''>0 everywhere — as exhibited in the counterexample below, so we assert only the one-directional implication. ■\blacksquare

∎

Worked examples

Example 1 — locating convexity/concavity regions and an inflection point for an asymmetric cubic-quartic mix. Let

f(x)=x4−4x3+6x2−4x+3,x∈R.f(x) = x^4 - 4x^3 + 6x^2 - 4x + 3, \qquad x \in \mathbb{R}.

(This is chosen non-symmetrically so no shortcut from symmetry is available.) Compute derivatives:

f′(x)=4x3−12x2+12x−4=4(x3−3x2+3x−1)=4(x−1)3.f'(x) = 4x^3 - 12x^2 + 12x - 4 = 4(x^3 - 3x^2 + 3x - 1) = 4(x-1)^3.

(Check: (x−1)3=x3−3x2+3x−1(x-1)^3 = x^3 - 3x^2+3x-1. ✓.)

f′′(x)=12(x−1)2.f''(x) = 12(x-1)^2.

Since (x−1)2≥0(x-1)^2 \geq 0 for all xx, with equality only at x=1x=1, we get f′′(x)≥0f''(x) \geq 0 everywhere, and f′′(x)>0f''(x) > 0 for all x≠1x \neq 1. By Theorem (C), ff is convex on all of R\mathbb{R}, and since f′′>0f''>0 off a single point, ff is in fact strictly convex on R\mathbb{R} (strict convexity survives a single zero of f′′f''; we verify this directly: f′(x)=4(x−1)3f'(x)=4(x-1)^3 is strictly increasing on R\mathbb{R} since t↦t3t\mapsto t^3 is strictly increasing, so by Theorem (B), ff is strictly convex — this shows the "only if" direction of the strict statement in (C) can fail to be needed when we argue via (B) directly). Is x=1x=1 an inflection point? By definition we need ff to change from convex to concave or vice versa across x=1x=1. But we just showed ff is convex on all of R\mathbb{R}, including both sides of 11 — there is no switch. So x=1x=1 is a zero of f′′f'' but not an inflection point. This is a clean illustration that f′′(c)=0f''(c)=0 is necessary for an inflection at cc (when f′′f'' is continuous, as we prove in the Scope section) but not sufficient. Finally, since f′(x)=4(x−1)3f'(x) = 4(x-1)^3 vanishes only at x=1x=1, and ff is strictly convex, x=1x=1 is the unique critical point and (by strict convexity, chords lie strictly above the graph, forcing the tangent-below-graph property globally) it is the global minimum. Value: f(1)=1−4+6−4+3=2f(1) = 1-4+6-4+3 = 2.

Example 2 — second derivative test with an asymmetric transcendental-polynomial function, including an inconclusive case. Let

f(x)=x3e−x,x∈R.f(x) = x^3 e^{-x}, \qquad x \in \mathbb{R}.

First derivative (product rule):

f′(x)=3x2e−x−x3e−x=x2e−x(3−x).f'(x) = 3x^2 e^{-x} - x^3 e^{-x} = x^2 e^{-x}(3 - x).

Critical points: f′(x)=0  ⟺  x2(3−x)=0  ⟺  x=0 or x=3f'(x) = 0 \iff x^2(3-x) = 0 \iff x = 0 \text{ or } x = 3 (since e−x≠0e^{-x}\neq0 always). Second derivative: differentiate f′(x)=e−x(3x2−x3)f'(x) = e^{-x}(3x^2 - x^3) using the product rule,

f′′(x)=−e−x(3x2−x3)+e−x(6x−3x2)=e−x[−3x2+x3+6x−3x2]=e−x(x3−6x2+6x).f''(x) = -e^{-x}(3x^2-x^3) + e^{-x}(6x - 3x^2) = e^{-x}\big[-3x^2+x^3+6x-3x^2\big] = e^{-x}(x^3 - 6x^2 + 6x).

Factor: x3−6x2+6x=x(x2−6x+6)x^3-6x^2+6x = x(x^2-6x+6).

At x=3x=3: f′′(3)=e−3(27−54+18)=e−3(−9)=−9e−3<0f''(3) = e^{-3}\big(27 - 54 + 18\big) = e^{-3}(-9) = -9e^{-3} < 0. Since f′(3)=0f'(3)=0 and f′′(3)<0f''(3)<0, the second derivative test (proved below) gives that x=3x=3 is a strict local maximum, with value

f(3)=27e−3≈27×0.049787≈1.3443.f(3) = 27 e^{-3} \approx 27 \times 0.049787 \approx 1.3443.

At x=0x=0: f′(0)=0f'(0)=0, and f′′(0)=e0(0−0+0)=0f''(0) = e^{0}(0 - 0 + 0) = 0. The second derivative test is inconclusive at x=0x=0. We resolve it by direct inspection: for xx near 00, e−x>0e^{-x} > 0 always, and x2≥0x^2 \geq 0, so the sign of f′(x)=x2e−x(3−x)f'(x) = x^2 e^{-x}(3-x) near x=0x=0 is the sign of (3−x)(3-x), which is positive for xx near 00 (indeed for all x<3x<3). So f′(x)≥0f'(x) \geq 0 on both sides of 00 (with equality only at x=0x=0 itself) — ff is nondecreasing through x=0x=0 with a "flat" critical point that is neither a local max nor a local min (it is a saddle-type critical point where the graph merely levels off while continuing to rise). This shows concretely why f′′(c)=0f''(c)=0 genuinely gives no information without further work, matching the theorem's own disclaimer. As a bonus, check where f′′f'' changes sign to locate inflection points: f′′(x)=xe−x(x2−6x+6)f''(x) = x e^{-x}(x^2-6x+6). The roots of x2−6x+6=0x^2-6x+6=0 are x=3±3x = 3 \pm \sqrt{3} (by the quadratic formula: x=6±36−242=3±3x = \frac{6\pm\sqrt{36-24}}{2} = 3\pm\sqrt{3}), numerically 3−3≈1.2683-\sqrt3\approx1.268 and 3+3≈4.7323+\sqrt3\approx4.732. Together with the root x=0x=0, f′′f'' has three real zeros: 0, 3−3, 3+30,\ 3-\sqrt3,\ 3+\sqrt3, and generically changes sign at each (a short sign-chart check on e−x⋅x⋅(x2−6x+6)e^{-x}\cdot x\cdot(x^2-6x+6), noting e−x>0e^{-x}>0 always, confirms each is a genuine sign change), giving three inflection points — a richer structure than the purely polynomial Example 1.

TheoremSecond Derivative Test

Let ff be twice differentiable on an open interval containing cc, with f′(c)=0f'(c) = 0.

  • If f′′(c)>0f''(c) > 0, then ff has a strict local minimum at cc.
  • If f′′(c)<0f''(c) < 0, then ff has a strict local maximum at cc.
  • If f′′(c)=0f''(c) = 0, the test is inconclusive: examples exist in each of the categories (strict local min, strict local max, neither).
Proof

Using the technique of direct estimation from the definition of the second derivative as a limit (avoiding any circular appeal to Theorem (C) restricted to a one-sided neighborhood, so this is proved independently and can even be used as an alternate route to local statements of Theorem (C)): Suppose f′′(c)>0f''(c) > 0. By definition,

f′′(c)=lim⁡h→0f′(c+h)−f′(c)h=lim⁡h→0f′(c+h)hf''(c) = \lim_{h\to 0} \frac{f'(c+h) - f'(c)}{h} = \lim_{h \to 0} \frac{f'(c+h)}{h}

using f′(c)=0f'(c) = 0. Since this limit is a positive number, there exists δ>0\delta > 0 such that for all hh with 0<∣h∣<δ0 < |h| < \delta,

f′(c+h)h>0.\frac{f'(c+h)}{h} > 0.

(This is the standard "limit positive ⇒\Rightarrow eventually positive" fact: taking ε=f′′(c)/2>0\varepsilon = f''(c)/2 > 0 in the definition of the limit produces such a δ\delta.) This means: for 0<h<δ0<h<\delta, f′(c+h)>0f'(c+h) > 0; and for −δ<h<0-\delta < h < 0, f′(c+h)<0f'(c+h) < 0 (dividing by a negative hh flips the sign). So f′f' is negative immediately to the left of cc and positive immediately to the right of cc, on (c−δ,c+δ)(c-\delta,c+\delta). By the theorem Monotonicity and the Sign of the Derivative, ff is strictly decreasing on (c−δ,c](c-\delta, c] and strictly increasing on [c,c+δ)[c, c+\delta). Hence for any x∈(c−δ,c+δ)x \in (c-\delta,c+\delta) with x≠cx \neq c: if x<cx<c, f(x)>f(c)f(x) > f(c) (strict decrease means values to the left are larger); if x>cx > c, f(x)>f(c)f(x) > f(c) (strict increase means values to the right are larger). In both cases f(x)>f(c)f(x) > f(c), so cc is a strict local minimum. The case f′′(c)<0f''(c) < 0 is identical with all inequalities reversed (or apply the above to −f-f, noting (−f)′′(c)=−f′′(c)>0(-f)''(c) = -f''(c) > 0 and a local min of −f-f at cc is a local max of ff at cc). For f′′(c)=0f''(c)=0 inconclusiveness: exhibit f1(x)=x4f_1(x) = x^4, f2(x)=−x4f_2(x)=-x^4, f3(x)=x3f_3(x) = x^3, all with c=0c=0, fi′(0)=0f_i'(0)=0, fi′′(0)=0f_i''(0)=0. Direct check: x4x^4 has a strict local (indeed global) min at 00; −x4-x^4 a strict local max; x3x^3 is strictly increasing everywhere (since (x3)′=3x2≥0(x^3)' = 3x^2 \geq 0 with equality only at an isolated point, which by the strict-monotonicity criterion still gives strict increase) hence has neither a local max nor min at 00. This exhibits all three possible outcomes, proving the inconclusiveness claim. ■\blacksquare

∎
CounterexampleWhy twice-differentiability (or even differentiability) cannot be dropped from Theorem (C)

Dropping differentiability of ff entirely. Consider f(x)=∣x∣f(x) = |x| on I=RI = \mathbb{R}. This function is convex (the chord between any two points on the V-shape lies on or above the graph — a direct check: for x1,x2x_1,x_2 of the same sign, ff is affine there and the chord equals the graph; for x1<0<x2x_1<0<x_2, the chord is a straight segment lying above the "kink" at 00 since ff is dips down only exactly to the corner). But ff is not differentiable at x=0x=0, so Theorem (C) — which requires ff twice differentiable on the whole open interval II — simply does not apply at that point; there is no contradiction, but it shows the hypothesis "differentiable on II" (used even in part (A)) is not a mere technicality; without it, the entire chain of reasoning through f′f' collapses since f′(0)f'(0) does not exist.

Dropping "f′′>0f''>0 implies strict convexity" as an "if and only if." The converse claimed false in Theorem (C) — that strictly convex does not imply f′′>0f''>0 everywhere — is witnessed by f(x)=x4f(x) = x^4 on I=RI=\mathbb{R}. We showed in the proof of the Second Derivative Test that this function is convex; in fact by Theorem (B) applied to f′(x)=4x3f'(x)=4x^3 (strictly increasing since t↦t3t\mapsto t^3 is strictly increasing), ff is strictly convex on all of R\mathbb{R}. Yet

f′′(x)=12x2,f''(x) = 12x^2,

which vanishes at x=0x=0, so it is false that f′′>0f''>0 everywhere. This is a genuine counterexample to the converse direction, confirming exactly what Theorem (C) asserts (only one direction of that particular implication) and warning against over-claiming the biconditional there.

Scope, edge cases & common traps

SituationWhat holdsWhat can fail
ff differentiable on open IIConvex   ⟺  f′\iff f' nondecreasing (Theorem A)Nothing extra needed; this direction is a full "iff"
ff twice differentiable on open IIConvex   ⟺  f′′≥0\iff f''\geq 0 (Theorem C)Still a full "iff"
f′′>0f''>0 on IIff strictly convexConverse fails: strictly convex functions can have isolated zeros of f′′f'' (Example: x4x^4)
f′′(c)=0f''(c)=0 at a single pointNo conclusion by itselfcc may be local min, local max, neither, or an inflection point — all four are possible
ff not differentiable somewhere on IIDefinition of convexity (chords) still makes senseTheorem (A)/(C) simply do not apply there; must fall back to the chord definition directly
Closed interval endpointsConvexity as a chord condition extends fine to closed intervalsThe derivative-based criterion needs one-sided derivatives at endpoints, a mild extension not covered by the open-interval statement above

The mathematician behind it

Origins · 1 minJean Gaston Darboux and how this was discovered
JG
Jean Gaston Darboux
1842–1917 · French analysis, differential geometry

Darboux is best known for the Mean Value Theorem-adjacent result that derivatives satisfy the intermediate value property even when discontinuous (the Darboux property), a fact quietly underlying careful treatments of when f′′f'' must vanish at a genuine inflection point. He worked at the École Normale Supérieure and the Sorbonne, shaping the rigorous French school of analysis that formalized exactly the kind of ε\varepsilon–δ\delta reasoning used to convert the geometric notion of convexity into the analytic criterion on f′′f''.

History
- 1837 — Legendre-era work on convex bodies in geometry predates the analytic formalization but supplies the chord/tangent intuition.
- 1893 — Otto Hölder gives an early rigorous treatment connecting convexity to derivative inequalities, a precursor to the modern statement.
- 1905 — Jensen formalizes the convexity inequality for general (not necessarily differentiable) functions, isolating the chord definition used here.
- 1930s — Convex analysis crystallizes as an independent field, driven by optimization needs; the second-derivative criterion becomes a standard textbook tool.
- 1949 — Fenchel's systematic treatise on convex functions cements the modern definitions and duality theory built atop the differential criteria proved here.
Does convexity require ff to be differentiable at all?

No. The chord definition (every secant line lies on or above the graph) makes sense for any function on an interval, differentiable or not — the classic example is f(x)=∣x∣f(x)=|x|, which is convex but fails to be differentiable at x=0x=0. The derivative-based characterizations in this article (convex   ⟺  f′\iff f' nondecreasing, or   ⟺  f′′≥0\iff f''\geq0) require differentiability, or twice-differentiability, respectively, as explicit hypotheses; they are tools for verifying convexity efficiently when derivatives exist, not part of the definition itself.

Why is "nondecreasing," not "increasing," the correct condition for plain (non-strict) convexity?

Plain convexity allows straight-line (affine) pieces in the graph, and an affine function has constant derivative, which is nondecreasing but not strictly increasing. For instance f(x)=max⁡(0,x)f(x) = \max(0,x) is convex (check the chord condition directly) with f′f' nondecreasing (constant 00, then jump to constant 11) but not strictly increasing on any interval containing the kink. If you want to rule out flat pieces, you need strict convexity, which correctly corresponds to strictly increasing f′f', as proved in part (B) of the theorem.

Is the second derivative test the same thing as the first derivative test?

They are different tools proving the same kind of conclusion by different means. The first derivative test examines the sign of f′f' on both sides of a critical point directly, and works even when f′′f'' fails to exist or vanishes. The second derivative test is often computationally faster (evaluate one number, f′′(c)f''(c)) but is inconclusive exactly when f′′(c)=0f''(c)=0, in which case you must fall back to the first derivative test or examine higher derivatives (as foreshadowed by Taylor Polynomials and Local Approximation, where the first nonzero derivative at cc determines the local behavior).

How does convexity relate to Jensen's inequality?

Jensen's inequality is the natural extension of the two-point chord definition to finitely many points (and to expectations of random variables): if ff is convex and x1,…,xn∈Ix_1,\dots,x_n \in I with weights λi≥0\lambda_i \geq 0, ∑λi=1\sum \lambda_i = 1, then

f(∑iλixi)≤∑iλif(xi).f\Big(\sum_i \lambda_i x_i\Big) \leq \sum_i \lambda_i f(x_i).

The n=2n=2 case is exactly the definition of convexity given in this article; the general case follows by induction on nn, splitting off one term and applying the two-point definition to the remaining weighted average. This is the mechanism behind AM–GM, entropy bounds, and many moment inequalities in probability.

Can a function be convex on an interval but have no second derivative anywhere?

Yes, though it takes some care to arrange, and such examples are more delicate than they first appear; the key fact used in this article's proof of Theorem (A) is that convexity only requires f′f' (first derivative) to exist and be nondecreasing — it does not require f′′f'' to exist. A convex function's derivative f′f', being monotonic, is guaranteed by a classical real-analysis fact to be differentiable almost everywhere (a theorem of Lebesgue), but it can genuinely fail to be differentiable on a (measure-zero) set of points, so f′′f'' need not exist everywhere even though convexity holds everywhere in the chord sense.

Why does the theorem require the interval II to be open?

Openness ensures every point of II has points of II on both sides, which is exactly what is needed to freely pick ww strictly between uu and vv in Step 2 of the proof, and to apply the Mean Value Theorem on sub-intervals whose closures still sit inside II in Step 3. On a closed interval [a,b][a,b], one typically needs one-sided derivatives at the endpoints a,ba,b to state the fully analogous criterion; the chord (Jensen-style) definition of convexity itself works perfectly well on closed or even non-open intervals without any change.

What exactly distinguishes an inflection point from a mere zero of f′′f''?

An inflection point is defined purely in terms of convexity switching type on either side of the point — it is a statement about ff, not directly about f′′f''. When f′′f'' exists and is continuous near a genuine inflection point cc, the Intermediate Value Theorem forces f′′(c)=0f''(c)=0 (since f′′f'' must pass through zero to switch sign, assuming it switches sign cleanly), but the converse can fail, as shown explicitly in Example 1 where f′′(1)=0f''(1)=0 yet no switch occurs. Always confirm an actual, persistent sign change of f′′f'' on both sides before calling a point an inflection point.

Before this

Where this leads