What are the first-order and second-order conditions for a twice-differentiable function to be convex, and how do you prove that the second-order condition ( everywhere) implies the first-order condition ()?
Linear algebra and optimisation, Convexity
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can connect the tangent-plane lower bound (first-order) to curvature (second-order) via a 1-D slice and Taylor's theorem.
Key idea
Restrict along the line segment from to by defining for . The chain rule turns the multivariate gradient and Hessian into scalar derivatives and , and Taylor's theorem with second-order remainder finishes the proof.
Steps
- State the first-order condition: a differentiable function on is convex iff for all (the graph always lies on or above every tangent hyperplane).
- State the second-order condition: a twice-differentiable function on is convex iff its Hessian is positive semidefinite everywhere, for all .
- Reduce to 1-D: fix any , let , and define for . By the chain rule, and .
- Apply Taylor's theorem at : there exists an intermediate scalar such that , which reads .
- Conclude: since everywhere, the quadratic remainder term is , so .
Common mistakes
- Writing entrywise instead of (positive semidefinite). Entrywise non-negativity is neither necessary nor sufficient.
- Evaluating the Hessian in the Taylor remainder at or instead of at an intermediate point .
How long your answer should be
Half a page; 4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Linear algebra and optimisation: Why are the non-negative weighted sum (), the pointwise maximum , and the affine composition convex whenever each and is convex, and how do these rules show that the L2-regularised hinge loss is convex without computing any Hessian?
Next in Linear algebra and optimisation: What is the Armijo (sufficient decrease) condition in backtracking line search, why is simply requiring not enough to guarantee convergence, and what step size does backtracking choose on from in direction with initial , shrink factor and ?