Linear Programming: Why Does Complementary Slackness Characterize Optimality?

Answer‑First Intro

Complementary slackness characterizes optimality because it links the primal and dual solutions in a way that ensures neither can be improved without violating feasibility. It identifies exactly which constraints bind and which dual variables matter. The short answer: complementary slackness is the condition that makes primal and dual optimality agree.

Problem Setup

Primal (maximization):

Maximize: \(c’x\) Subject to: \(Ax \le b\), \(x \ge 0\)

Dual:

Minimize: \(b’y\) Subject to: \(A’y \ge c\), \(y \ge 0\)

Complementary slackness states:

  • If a primal constraint is slack, the corresponding dual variable must be zero.
  • If a dual constraint is slack, the corresponding primal variable must be zero.

Step‑by‑Step Explanation

1) Weak duality gives the inequality

For any feasible \(x\) and \(y\):

$$ c’x \le b’y. $$

Optimality requires equality.

2) Expand the inequality using slacks

Primal constraints: \(Ax + s = b\), with \(s \ge 0\). Dual constraints: \(A’y – t = c\), with \(t \ge 0\).

Substitute into the duality inequality:

$$ c’x = x'(A’y – t) = x’A’y – x’t. $$

And:

$$ b’y = (Ax + s)’y = x’A’y + s’y. $$

3) Combine the expressions

Weak duality becomes:

$$ x’A’y – x’t \le x’A’y + s’y. $$

Cancel \(x’A’y\):

$$ – x’t \le s’y. $$

4) Nonnegativity forces each term to be zero

Since \(x, t, s, y \ge 0\), the only way for the inequality to hold with equality is:

  • \(x_i t_i = 0\) for all \(i\)
  • \(s_j y_j = 0\) for all \(j\)

This is complementary slackness.

5) Complementary slackness is both necessary and sufficient for optimality

If complementary slackness holds, primal and dual objectives match, so both are optimal. If it fails, at least one side can be improved.

Intuition

Complementary slackness says: “Either a constraint binds, or its shadow price is zero — but never both.” It ensures that resources have value only when fully used, and variables are positive only when their cost is justified.

Common Exam Mistakes

  • Thinking complementary slackness is optional (it is required for optimality).
  • Confusing primal slacks with dual slacks.
  • Applying complementary slackness before checking feasibility.
  • Believing complementary slackness only applies at optimality (it characterizes optimality).
  • Mixing up which side corresponds to which constraint.

Why This Matters

Complementary slackness is the backbone of duality, simplex optimality, shadow prices, and sensitivity analysis. It explains which constraints matter, which variables enter the basis, and how primal and dual solutions align.

Final Summary

Complementary slackness characterizes optimality because it forces primal and dual solutions to match exactly. It ensures that no improvement is possible without violating feasibility, making it the key condition linking primal and dual optimality.


This explanation belongs to the broader Linear Programming and Optimization pillar.

If you want help working through these ideas for coursework or exams, you can talk directly to a tutor, not a marketer.

Call/Text: 646-543-0832
Email: tutor@mytutornyc.com