Complementary Slackness Conditions
Use the complementary slackness conditions to relate primal and dual optimal solutions of a linear program: identify forced-zero dual variables, compute one optimum from the other, and certify optimality of a primal-dual pair.
Step 1 of 157%
Tutorial
Introduction to Complementary Slackness
Consider the standard primal–dual LP pair.
Primal: subject to
Dual: subject to
By the strong duality theorem, any optimal pair satisfies Combined with primal–dual feasibility, this identity forces a precise pairing between constraint slacks and variable values — the complementary slackness (CS) conditions.
For each primal constraint
For each primal variable
Equivalently:
- (positive dual variable ⇒ primal constraint is tight).
- (slack primal constraint ⇒ zero shadow price).
- (positive primal variable ⇒ corresponding dual constraint is tight).
- (slack dual constraint ⇒ corresponding primal variable is zero).
These conditions are both necessary and sufficient for a primal–dual feasible pair to be optimal.