Convexity & the Hessian
A function is convex when its Hessian is PSD everywhere, guaranteeing that any local minimum is a global one — the key to trusting an optimizer's answer.
1. The idea
A twice-differentiable function is convex if its Hessian matrix (the matrix of second partial derivatives) is positive semi-definite everywhere. Geometrically, the function curves upward or stays flat in every direction, never downward.
Convexity guarantees that any local minimum is automatically a global minimum, and that the set where is a convex set. This is why convex optimization problems (like mean-variance portfolio problems) have unique, tractable solutions.
Checking convexity in practice means computing the Hessian and testing positive semi-definiteness (via eigenvalues or leading principal minors), the same tools used for covariance matrices.
2. Why it matters
Interviewers use convexity checks to confirm that a proposed optimization (portfolio variance minimization, likelihood maximization) actually has a well-behaved unique solution.
3. Core mathematics
Hessian
Convexity criterion
Strict convexity
4. How to recognize it
Think of this when…
- 'Show the optimization problem is convex' or 'is the minimum unique'
- Checking a quadratic objective like for convexity via
- Questions about whether gradient descent will converge to a global optimum
5. Worked example
Worked example
Is convex?
- 1
Compute the Hessian.
- 2
Check leading principal minors.
- 3
Both positive, so is PD, and is strictly convex.
- Answer: Yes, f is (strictly) convex; it has a unique global minimum.
6. Common mistakes
- Confusing convexity of the function with convexity of the feasible set — both matter for the overall problem
- Checking convexity at only one point instead of confirming the Hessian condition holds globally
- Assuming a quadratic form is always convex without checking that its matrix is PSD
7. Quick check
A function is convex when its Hessian is:
The main benefit of convexity in optimization is:
8. Practice
2 QuantSolve questions use this concept.
Practice this concept9. Related methods
Create a free account to save lesson progress.
Recommended next lessonNo-Arbitrage & Replication →