A classic production problem
Maximizing 3x₁ + 5x₂ subject to x₁ ≤ 4, 2x₂ ≤ 12, and 3x₁ + 2x₂ ≤ 18 gives an optimal value of 36, at x₁ = 2, x₂ = 6.
Result
Fill in the fields to see your result.
Each constraint here is a "less than or equal to" limit on a linear combination of the variables, with every variable required to stay non-negative — the standard form the simplex method was originally built around. A slack variable is added to each constraint to convert the inequality into an equation, and the algorithm then pivots between corner points of the feasible region, always moving toward a better objective value, until no further improvement is possible.
The result is guaranteed optimal when one exists: the simplex method never settles for a local improvement that isn't also the global best, unlike many general-purpose optimization techniques.
Maximize c₁x₁ + c₂x₂ + …, subject to each aᵢ₁x₁ + aᵢ₂x₂ + … ≤ bᵢ, and every xⱼ ≥ 0
Maximizing 3x₁ + 5x₂ subject to x₁ ≤ 4, 2x₂ ≤ 12, and 3x₁ + 2x₂ ≤ 18 gives an optimal value of 36, at x₁ = 2, x₂ = 6.
To minimize the same objective under the same constraints, the best value is 0, achieved at x₁ = 0, x₂ = 0 — minimizing a positive-coefficient objective under these limits is trivially solved at the origin.
One line per constraint, with the coefficient of each variable in order followed by the limit — for x₁ + 2x₂ ≤ 10, enter "1, 2, 10". A variable absent from a constraint gets a coefficient of 0.
Not directly in this version — it solves standard-form problems with "≤" constraints and non-negative variables only. A "≥" constraint can sometimes be rewritten as a "≤" by multiplying both sides by −1.
It means the objective can be improved forever within the given constraints — there is no ceiling, so no single optimal answer exists. This usually signals a missing constraint in the problem setup.
This is the standard assumption in most real linear programming problems (you cannot produce a negative quantity of something), and it is what the classic simplex method is built to exploit.
Updated