Skip to content
MasterMath

Simplex Method Calculator

Solves a linear programming problem by the simplex method: maximise or minimise subject to less-than-or-equal constraints.

Optimal value

—

Optimal value—
Solution—
Binding constraints—
Algorithm passes—
Variables—

Use of each constraint

ConstraintUsedLimitSlack

How it was solved

    The formula

    max cᵀx subject to Ax ≤ b, x ≥ 0

    Why it works

    The simplex method rests on a geometric fact that changes everything: linear constraints enclose a region shaped like a polyhedron, and the optimum of a linear function over that region always sits at a vertex. That turns a problem with infinitely many candidate points into one with finitely many. The algorithm starts at a vertex and keeps hopping to the neighbour that most improves the objective, stopping when none does: that vertex is then the optimum. Bland’s rule, which always picks the first eligible column, guarantees the method never cycles.

    How to solve it by hand

    1. Write the objective and the constraints with one coefficient per variable
    2. Add a slack variable to each constraint to turn the inequality into an equality
    3. The variable that most improves the objective enters and the first to run out leaves
    4. Repeat until no column improves the result

    What is worth knowing

    The standard form this page solves needs less-than-or-equal constraints with positive limits and non-negative variables, which covers ninety per cent of textbook problems. A greater-than-or-equal constraint, or a negative limit, would need the two-phase simplex, and here you get a warning rather than a wrong answer. The slack column is the most useful part of the result and the least looked at: it says how much of each resource is left over at the optimum, and the constraints that run out entirely are the only ones actually limiting the result. Loosening any other one buys you nothing.

    Frequently asked questions

    What is the simplex method?

    An algorithm that walks the vertices of the feasible region, hopping to whichever most improves the objective, until none does.

    Why is the optimum at a vertex?

    Because a linear function over a convex region attains its maximum at an extreme point. Otherwise you could keep improving.

    What is a slack variable?

    The one that turns an inequality into an equality. Its final value says how much of that resource is spare.

    Does it handle greater-than constraints?

    Not in this version: that needs the two-phase simplex, and the page warns rather than returning a wrong answer.