4.10.19 · D1Advanced Topics (Elite Level)

Foundations — KKT conditions for constrained optimization

3,321 words15 min readBack to topic

This page builds every symbol used in the parent KKT note from absolute zero. Read it top to bottom: each item uses only the ones above it.


0. What a "function" and a "minimum" even mean

Picture a landscape. The horizontal floor is where your input lives; the height above each spot is . Low valleys = cheap; high peaks = expensive.

Figure — KKT conditions for constrained optimization

Why the topic needs it: the entire game is "find the lowest reachable height." Without a cost function there is nothing to minimize.


1. The input space and the point

  • : is a single slider on a line.
  • : is a dot on a flat map — the floor of the landscape above (the same floor figure s01 draws its contours on).
  • : a point in a room. Beyond that we can't draw it, but the algebra is identical.

Why the topic needs it: the ball can be anywhere in this space. Constraints will carve out the part where it's allowed to be, and the winner (defined above) is one specific such point.


2. Constraints: fences () and wires ()

Now we forbid part of the yard.

Figure — KKT conditions for constrained optimization

Why the convention? Any inequality can be pushed into this shape: becomes ; "" becomes "." One convention → one clean rulebook.


3. The gradient — the "uphill arrow"

This is the star of KKT, so we build it carefully. (Recall the standing assumption above — that is exactly what lets us write at all.)

Figure — KKT conditions for constrained optimization
  • points uphill → so points downhill (steepest descent — the direction a rolling ball wants to go, and the engine of Gradient Descent and Projected Gradient).
  • Where the ground is flat, every partial is zero, so the gradient is the zero vector (it still exists — it just has no length). That's the unconstrained minimum test.
  • is the same arrow built from a fence: it points out of the allowed region (toward larger , i.e. toward , the forbidden side).

Why the topic needs it: KKT is entirely a statement about arrows — where can point once the fences box it in.


4. Perpendicular, dot product, and "balancing arrows"


5. Active vs inactive fences, and the "cone"

Before we can talk about which fence-arrows matter, we must know which fences you are actually touching at a point.

Figure — KKT conditions for constrained optimization

Why non-negative weights? A fence can only push, never pull. Push = a amount of its outward arrow. That single restriction is what makes inequality constraints different from wires — and it becomes the rule .


6. Multipliers and


7. The Lagrangian — bundling it all


8. Convexity and constraint qualifications (why the rulebook is trustworthy)

These foundations combine directly in the flagship application, Support Vector Machines, where every symbol above reappears.


Prerequisite map

smoothness C1 assumption

gradient nabla f uphill arrow

point x in R^n

objective f cost

optimal point x star arg min

constraints g fences and h wires

perpendicular and dot product

active vs inactive fence

linear combination and cone

multipliers lambda and mu

complementary slackness

the Lagrangian L

convexity and constraint qualification

KKT conditions


Equipment checklist

Cover the right side and recite before moving to the main note.

What smoothness do need, and why?
Continuously differentiable () — otherwise the gradients don't exist and KKT can't even be written.
What does mean?
A point = a list of real-number coordinates; where you stand in the landscape.
What is , and how does it differ from ?
is the optimal location (input); is the optimal cost (the number/height it achieves).
What does measure?
The cost / height at point — the thing we minimize.
Convert "" to standard fence form.
(move everything to one side as ).
What does the gradient point toward, and ?
points steepest uphill; points steepest downhill.
At the valley floor, does the gradient vanish or cease to exist?
It still exists — it is the zero vector (an arrow of zero length).
Write the dot product formula and the perpendicular test.
; perpendicular when .
What makes a fence "active" vs "inactive" at ?
Active: (touching). Inactive: (strictly inside).
What is a cone of gradients, and why non-negative weights?
All sums of active fence-arrows with weights ; because a fence can only push outward, never pull.
Which multipliers are and which are free in sign?
Fence (inequality) multipliers ; wire (equality) multipliers free.
Is a distance?
No — it's a signed constraint value (slack); KKT only cares about its sign / whether it's zero.
State complementary slackness in words.
A fence only pushes when its slack is used up: .
Why is convexity the golden property?
One valley, no false bottoms → KKT become sufficient for the global minimum.
State one constraint qualification.
LICQ — active fence and wire gradients are linearly independent at ; or Slater — a strictly feasible interior point exists.
What breaks if the constraint qualification fails?
Multipliers may not exist even at a true optimum, so KKT can be inapplicable.