Convex Functions
A function defined on a convex domain is convex if for any two points , the function value at any intermediate point is at most the corresponding linear interpolation of the endpoints.
Geometrically: draw the chord (line segment in the graph) between any two points on the graph of . For a convex function, the chord always lies above or on the graph. The function's graph "bows downward from the chord" — or equivalently, "curves upward."
A strictly convex function has the chord strictly above the graph at interior points — a unique bowl shape. A linear function is convex but not strictly so (chords lie on the graph exactly).
For quadratics: is convex iff is PSD, and strictly convex iff is PD. This connects back to everything we know about definiteness.
Formal View
Why This Matters
Convexity is the key property that makes an optimization problem tractable — local search (gradient descent) is guaranteed to find the global optimum.
- Least squares regression: convex quadratic, unique global minimum
- Lasso and Ridge regularization in ML: convex objectives
- Portfolio optimization: convex quadratic objective with linear constraints
- Support vector machines: convex optimization at their core
Learning Resources
Quiz
A quadratic is convex if and only if:
The sum of two convex functions is convex.
For a strictly convex differentiable function, how many critical points can it have?
A convex function can have local minima that are not global minima.
Is a linear function convex?
Common Mistakes
- Thinking "convex function" means the graph is bowl-shaped (that's strictly convex) — linear functions are also convex.
- Confusing a convex function with a function defined on a convex set — these are separate concepts.
- Assuming convexity means the function has a global minimum — there might be none if the domain is unbounded.