What is a convex set, what is a convex function, and what does the bowl shape of a convex problem mean for finding a minimum?
Linear algebra and optimisation, Convexity
Level L1 Beginner. Length Short. Nature Th Theoretical.
What's being asked
Whether you know the geometric definitions of a convex set and a convex function and why convexity prevents local traps.
Key idea
A set is convex if the straight line segment joining any two points inside it never leaves the set. A function on a convex set is convex if the straight line (chord) between any two points on its graph lies on or above the graph, creating a bowl shape with no suboptimal local dips.
Steps
- Define a convex set: pick any two points and in the set; every weighted average (with ) along the straight line between them stays inside the set — visually, a shape with no dents or holes, like a disk or a solid box.
- Define a convex function: its input domain is a convex set, and the graph curves upward like a bowl, meaning the chord joining any two points on the graph never dips below the curve: .
- State the optimisation consequence: because a bowl cannot have separate higher valleys, any local minimum you reach is guaranteed to be as low as the global minimum — gradient descent cannot get trapped in a fake dip (the formal proof comes at the next level).
Common mistakes
- Assuming a convex function must have a single unique minimum; flat bottoms (such as ) are allowed unless the function is strictly convex.
- Confusing a convex function with an increasing function; decreases for and increases for , yet is convex everywhere.
How long your answer should be
3–4 sentences.
Read this
- Boyd and Vandenberghe, Convex optimization: Sections 2.1.4 (convex sets) and 3.1 (convex functions): the definitions with many pictures, and why local minima of convex problems are global (section 4.2.2).
- Dive into deep learning, section 23.3 Convexity: Covers convex sets, Jensen's inequality, local minima being global, and the constrained-optimisation and projection sections, with plots.
- NPTEL: Convex Optimization (IIT Kanpur, Prof. Joydeep Dutta): Lectures 1-42 (the series is not split by topic), which cover convex sets, convex functions and why local minima are global in a full lecture course.
Previous in Linear algebra and optimisation: What does it mean for a symmetric matrix to be positive definite rather than positive semidefinite, and what shape does have in each case?
Next in Linear algebra and optimisation: What is a saddle point on a loss surface, and intuitively why are saddle points far more common than local minima in high-dimensional neural networks?