Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

complementary slackness

At a jointly optimal primal/dual pair, every constraint is either tight or its paired variable is zero.

A feasible primal x and feasible dual y are both optimal if and only if, for every constraint pair, either the constraint holds with equality or its paired variable is 0 (or both). The LP-specific instance here (complementary-slackness-lp) is the same idea Chapter 6's general KKT system already established for a constrained optimum broadly (kkt-complementary-slackness), specialized to a linear objective and linear constraints -- and it runs in both directions, letting either optimal solution be recovered from the other with no second LP solved.

Read the full section →
Graph settings

Calculator