Slack variables turn inequalities into equalities
The next step converts each less-than-or-equal constraint into an exact equality by adding a slack variable that soaks up whatever amount of the resource goes unused. For flour the equation becomes $0.4c + 0.5d + s_F = 10$, where $s_F$ is the flour slack.
Here is the intuition with numbers. Suppose you make 10 kg of cookie mix and 8 kg of donut mix and that together they use only part of the flour available. Since usage is below the 10 kg cap, the flour slack absorbs the leftover amount. Each constraint gets its own slack variable, and in any one equation the other slacks are multiplied by zero, so they drop out. Sugar has its slack $s_S$, chocolate has $s_C$, and so on.
Slack variables are even added to the objective function, though with coefficient zero, so they contribute nothing to revenue. That is purely a formality: it makes every equation, objective included, carry the same list of variables in the same format. Uniform equations are exactly what you need before packing everything into a matrix.
Related cards
Video Content
Tasks
Card Info
- Topic: Simplex algorithm, StatQuest
- Difficulty: Intermediate
- Completed: 0 users