Visual walkthrough — Convex optimization — convex sets, convex functions
We are unpacking the central theorem from the parent note:
For a convex function over a convex set , every local minimum is a global minimum.
Let us earn every word of that sentence.
Step 1 — What a "point in between" even means
WHAT. Pick any two points. Call them and . A point "in between" them is written Read each piece slowly:
- (the Greek letter "theta") is a dial that we turn from to .
- is just "whatever is left over" so the two weights always add to .
- When : we get . We are standing at .
- When : we get . We are standing at .
- When : we get the exact midpoint.
WHY this formula and not something else? Because it is the straight-line recipe. As we turn the dial smoothly from to , the point slides along the straight segment from to — no curving, no jumping. That is the simplest possible "path between two points", and every idea below rides on this one segment.
PICTURE. The dot slides along the straight line as the dial turns.

Step 2 — What a convex SET guarantees
WHAT. A set (think: a shaded region on the page) is convex when: pick any inside it, and the entire segment between them stays inside too. In symbols,
WHY we need this. Our theorem is about walking from one point to another without leaving the feasible region. A convex set is exactly the guarantee that the straight walk never falls off the edge. A region with a dent (or a hole) would let the segment poke outside — and then the walk we do in Step 5 would be illegal.
PICTURE. Left: a convex blob — every chord stays inside. Right: a dented "bean" — one chord escapes (red). That escaping chord is precisely what convexity forbids.

Recall Why "the circle" is NOT convex but "the disk" is
The disk is the filled region — chords stay inside. The circle is only the rim; a chord cuts straight across the empty middle and leaves the rim. Convexity is about the filled region, never smoothness. Circle vs disk — which is convex? ::: The filled disk is convex; the rim is not.
Step 3 — What a convex FUNCTION guarantees
WHAT. Now put a height on top of the region. A function takes a point and returns a number — its height on a graph. We call convex when, for any two points , Term by term:
- The left side is the graph's real height at the in-between point .
- The right side is the height of the chord — the straight line drawn between the two graph points and — evaluated at the same . Note the weight multiplies (matching how multiplies inside ), and multiplies .
- "" says: the real graph is never higher than its own chord.
WHY this is "bowl-shaped". A bowl bulges downward; it never bulges up past a string stretched across it. That is precisely "graph on or below every chord" — equivalently "chord on top". This single inequality is the entire personality of a convex function.
PICTURE. The blue bowl; a chord (orange) drawn between two points; the vertical green gap shows the chord sitting above the graph everywhere in between.

Step 4 — "Local minimum" vs "global minimum": the thing we fear
WHAT. First, a neighbourhood of a point means "all points within some small radius of it" — the little disk , where is the distance from to (see Norms and Inner Products).
- A global minimum is a point with for every in the whole region — nothing anywhere is lower.
- A local minimum is weaker: there exists some radius such that for every within distance of . It is lowest only inside its own little neighbourhood — a dip you might get stuck in even if a deeper valley sits far away.
WHY this distinction is the whole game. Optimization algorithms (like Gradient Descent) feel their way locally — they only see the ground within a tiny radius under their feet. On a bumpy (non-convex) landscape they can settle into a shallow dip and declare victory, missing the true bottom. The theorem we are about to prove says: on a convex bowl this trap cannot exist.
PICTURE. Top: a wavy non-convex curve with a fake dip (red) and the true bottom (green) — a marble can get stuck in the red one. Bottom: a convex bowl — only one bottom, no trap.

Step 5 — The proof: assume a trap exists, then destroy it
This is the payoff. We argue by contradiction: we pretend a fake trap exists and show the convex inequality makes it impossible.
WHAT we assume. Suppose is a local minimum, but somewhere out there sits a point that is strictly lower:
WHAT we do — walk from toward . Because is a convex set (Step 2), the whole segment is legal, so we may take a tiny step: Here small means is right next to — inside the neighbourhood (radius ) from Step 4.
WHAT convexity forces. Apply the convex-function inequality of Step 3 to these very points: Now watch the right-hand side carefully. Since , replacing 's "share" with the smaller number pulls the average strictly down: Chaining the two lines:
WHY this is a contradiction. We found a point that is (a) arbitrarily close to (because is tiny, so sits inside the radius ) yet (b) strictly lower than . That is exactly what " is a local minimum" forbids. The assumption "a lower exists" collapses. Therefore no point is lower than — it is global.
PICTURE. The tiny step from toward lands on the chord (orange), which convexity keeps below the flat dashed line at height — so the graph there is lower still.

Step 6 — The tangent view: the same fact from below
WHAT — first, the tools, from zero. For a smooth (differentiable) we need two objects:
- The gradient (say "grad ") is simply the slope of the graph at : in one dimension it is the ordinary derivative ; in more dimensions it is the list of slopes in each direction. It points in the steepest-uphill direction.
- The dot product multiplies the slope by the displacement and adds up the results — it reads off how much height the flat slope predicts if you walk from to . (The "" just means "line them up and multiply-then-sum"; see Norms and Inner Products.) In one dimension it is plainly .
Now the second face of convexity: the graph lies above every tangent line: "" says the real graph is always at least as high as that flat prediction.
WHY it matters for finding the bottom. Set the slope to zero: . Then the inequality becomes for every — an instant certificate that is the global bottom. This is why "slope " is not just a candidate but a guarantee on a convex bowl.
WHAT about the two-dimensional curvature test? For a twice-differentiable there is the Hessian — the table of second derivatives (all the "how the slope itself changes" numbers). We say it is positive semidefinite, written (the symbol "" means "curves upward or flat in every direction, never downward"), exactly when is convex. In one dimension this collapses to the familiar . See Positive Definite Matrices for the full story of .
PICTURE. The tangent at (orange) slides underneath the whole blue graph; the green gap is never negative. At the flat tangent, the graph's lowest point sits right on it.

Step 7 — Edge & degenerate cases (so you never get surprised)
Convexity has soft edges. Here are the boundary situations, each shown so no scenario is unseen.
Case A — the flat line. (a horizontal graph) is convex: the chord equals the graph, so "" holds with equality. But it is not strictly convex (Step 3) — the chord touches the graph rather than staying strictly above. Here every point is simultaneously a local and global minimum — a whole flat valley. The theorem still holds (each is global), but the minimizer is not unique. Flatness is exactly why we needed strict convexity for uniqueness in Step 5.
Case B — the kink. has a sharp corner at and no slope there, so the tangent test of Step 6 cannot be applied at the tip. Yet it is genuinely convex (its chords stay on top) and its minimum at is global. Lesson: convexity does not require smoothness; when the tangent test breaks, fall back to the chord definition of Step 3.
Case C — the empty middle (non-convex domain). If has a hole or dent, Step 5's "tiny step toward " might leave — the walk becomes illegal and the guarantee evaporates. This is why both the set and the function must be convex; drop either and traps can return.
PICTURE. Three panels: (A) flat valley — many minima; (B) with a global-min kink; (C) a dented domain where the straight walk escapes (red).

The one-picture summary
Everything above compresses into one frame: a convex bowl over a convex region, its lowest point marked, a tiny arrow showing that stepping toward any allegedly-lower point only takes you further down the same slope — so the first bottom you find is the only bottom.

Recall Feynman retelling — the whole walkthrough in plain words
Imagine a smooth skate-bowl with no dents and no holes (that's the convex set — Step 2). The surface itself sags like a bowl, never bulging up past a string you stretch across it (that's the convex function — Step 3). Now drop a marble and let it settle at some low spot, . Could there be a secret deeper spot somewhere else? Walk a baby step from straight toward . Because the bowl sags below every string, that baby step is already lower than where you started (Step 5). But you just settled — nothing right next to you was supposed to be lower! Contradiction. So no secret deeper spot exists: your first bottom is the true bottom. And from the slope's-eye view (Step 6), the moment the ground goes flat under your feet, you're guaranteed to be at the global bottom. The only wrinkles: a perfectly flat valley has many equally-low spots (need strict sag for a single one), a sharp V-kink has no slope to test but still works, and if the region has a hole your straight walk can fall off the edge — which is why both the region and the surface must be dent-free.
Connections
- Gradient Descent — walks downhill locally; convexity is what makes "downhill" reach the global bottom.
- Lagrange Multipliers and KKT Conditions — Step 6's "slope certifies global min" is why KKT becomes sufficient under convexity.
- Positive Definite Matrices — the multi-dimensional "curves upward" test and the symbol.
- Jensen's Inequality — the Step 3 chord inequality generalized to averages.
- Norms and Inner Products — the dot product of Step 6 and the distance ; and every norm (like in Case B) is convex.
- Linear Programming — the convex set here is the polyhedral feasible region.