Complementary slackness explains how the primal and dual optima fit together constraint by constraint. A positive variable pairs with a tight constraint, while unused slack pairs with a zero price. This lesson shows the exact products that must vanish at the certificate.

highlighted = computed this step

Primal slack products

Each primal resource slack times its dual price is 0. Why: a positive resource price can only appear when the resource is tight.

primal slacky=0\text{primal slack}\cdot y^*=0
Complementary slackness productsThe exact complementary-slackness products are recomputed at the primal and dual optima.Constraint CSslack_iprice y_iproduct01/3001/30Variable CSA^T y-cvalue x_jproduct04/3004/30

Reduced-cost products

Each reduced cost times its primal variable value is 0. Why: a positive primal variable can only appear when the corresponding dual constraint is tight.

reduced costx=0\text{reduced cost}\cdot x^*=0
Complementary slackness productsThe exact complementary-slackness products are recomputed at the primal and dual optima.Constraint CSslack_iprice y_iproduct01/3001/30Variable CSA^T y-cvalue x_jproduct04/3004/30

What binds

At (4/3, 4/3), the binding constraints make all four displayed products 0. Why: complementary slackness is the local shape of the certificate.

all products =0\text{all products }=0
Complementary slackness productsThe exact complementary-slackness products are recomputed at the primal and dual optima.Constraint CSslack_iprice y_iproduct01/3001/30Variable CSA^T y-cvalue x_jproduct04/3004/30

Diagram note

The first table uses constraint slacks and prices; the second uses reduced costs and primal values. Pixel positions are rounded for layout; every number shown is exact.

complementary slackness checks the certificate\text{complementary slackness checks the certificate}
Complementary slackness productsThe exact complementary-slackness products are recomputed at the primal and dual optima.Constraint CSslack_iprice y_iproduct01/3001/30Variable CSA^T y-cvalue x_jproduct04/3004/30