Convex Function definition
A function is convex on a convex domain when the line segment between any two points on its graph lies on or above the graph.
Convex Function in a picture
How it works
For 0 ≤ t ≤ 1, convexity requires f((1 − t)x + ty) ≤ (1 − t)f(x) + tf(y). For a twice-differentiable function on an open interval, a nonnegative second derivative is equivalent to convexity. In convex minimization, any local minimum is also a global minimum.
Worked examples
Is f(x) = x² convex on the real line?
Yes. Its second derivative is 2 everywhere.
Is f(x) = −x² convex on the real line?
No. The second derivative is −2 and its chords lie below the curve.
Is an affine function convex?
Yes. Its graph and the chord coincide, so the inequality holds with equality.
Common mistake
Check the entire stated domain. A function may be convex on one interval and fail to be convex on another.
Quick check
What sign of the second derivative supports convexity on an interval?
Show answer
Nonnegative.
Can a straight-line function be convex?
Show answer
Yes. Every chord coincides with the graph.
Sources
Flashcard
Convex Function
Reveal the definition
A function is convex on a convex domain when the line segment between any two points on its graph lies on or above the graph.
Effortless Math. “Convex Function.” Math Dictionary.
