How do slack variables change inequalities into equalities in the simplex method?
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 ) 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 such that ā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