Converting Inequalities to Equalities with Slack Variables
Learn how to convert linear inequality constraints into equality constraints by introducing nonnegative slack and surplus variables. This is the first step in putting any linear program into standard form.
Tutorial
Slack Variables for ≤ Constraints
The standard form of a linear program requires every constraint to be an equality. To convert a inequality into an equality, we introduce a nonnegative slack variable that absorbs the gap between the two sides.
For a constraint of the form
we introduce a slack variable and rewrite the constraint as
The variable measures how much slack remains between the left-hand side and the bound . Since the original inequality says LHS is at most , the gap is automatically nonnegative.
Illustration. The constraint becomes
At the point , the LHS equals , so the slack is .