Complementary Slackness Theorem
Complementary Slackness Theorem
The Complementary Slackness Theorem is a key result in linear programming and optimization,
particularly in the primal-dual relationship. It provides conditions under which a feasible solution to
the primal and dual problems is optimal.
max cT x
subject to:
Ax ≤ b, x≥0
min bT y
subject to:
AT y ≥ c, y≥0
Let x∗ be an optimal solution for the primal problem and y∗ be an optimal solution for the dual
problem. Then, the Complementary Slackness Theorem states:
x∗i ((AT y∗ )i − ci ) = 0 ∀i
Interpretation
1. If a dual constraint is not tight (i.e., (AT y∗ )i > ci ), then the corresponding primal variable
x∗i = 0.
2. If a primal constraint is not tight (i.e., (Ax∗ )j < bj ), then the corresponding dual variable yj∗ =
0.
This theorem helps in checking optimality and interpreting shadow prices in optimization problems.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/3
Give me an example
subject to:
x1 + 2x2 ≤ 4
2x1 + x2 ≤ 5
x1 , x2 ≥ 0
subject to:
y1 + 2y2 ≥ 3
2y1 + y2 ≥ 2
y1 , y2 ≥ 0
1. yj∗ (bj
− (Ax∗ )j ) = 0 for each constraint in the primal.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/3
2. x∗i ((AT y∗ )i
− ci ) = 0 for each constraint in the dual.
y1∗ (4 − 4) = 1 × 0 = 0 (Satisfied)
y2∗ (5 − 5) = 1 × 0 = 0 (Satisfied)
y1 + 2y2 ≥ 3
x∗1 (3 − 3) = 2 × 0 = 0 (Satisfied)
2y1 + y2 ≥ 2
Conclusion
This is how Complementary Slackness helps validate optimal solutions. Would you like a more
complex example or a different explanation?
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/3