Britannica Sources used in this answer

How do slack variables change inequalities into equalities in the simplex method?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In the simplex method, slack variables are introduced to convert linear inequalities into a system of equations, which is a necessary step to put the problem into canonical form.

Because an inequality (such as x1≤8) represents a range of possible values, it cannot be solved directly using standard algebraic methods for systems of equations. By adding a non-negative slack variable—for example, defining x3≥0 such that x1+x3=8—the inequality is transformed into an equality. This slack variable effectively measures the "gap" or difference between the left-hand side of the original inequality and its upper bound.

Once these constraints are expressed as equalities, the algorithm can systematically navigate between extreme points of the feasible region to identify the optimal solution.1