Skip to content
All apps

Simplex algorithm

About this app

Understand the simplex algorithm step by step — follow tableau, pivot choice and Gaussian elimination interactively.

How the simplex method works

The simplex algorithm solves linear programs by moving from vertex to vertex of the feasible region without ever making the objective worse. The computation runs in the simplex tableau. Each iteration has three parts: the pivot column selects the variable that enters the basis, typically the one with the most negative entry in the objective row. The ratio test picks the pivot row and thus the variable that leaves the basis. Gaussian elimination turns the pivot column into a unit vector. Once no entry of the objective row is negative, the solution is optimal.

What the app shows

You enter a two-variable problem: objective and constraints. The tableau panel shows every iteration with highlighted pivot column, pivot row and ratios. In the background the feasible region is drawn as a green polygon and the current vertex as a red point. At the end the optimal solution appears with z*, x₁ and x₂. If all entries in the pivot column are ≤ 0, the app reports that there is no bounded optimum.

Try it yourself

“Step” advances one sub-step, “Iteration” a full pivot, and “Back” undoes any step. Watch the red point jump to the next vertex with each iteration while the objective value grows. Change the objective and compare how many iterations are needed. Take your time with the ratio test: it is what keeps the point inside the feasible region.

Frequently asked questions

How does the simplex algorithm work in simple terms?
It starts at a vertex of the feasible region and moves along an edge to a neighbouring vertex with a better objective value. It repeats this until no edge leads to an improvement. That vertex is optimal.
How do you choose the pivot column and pivot row?
Under the classic rule the pivot column has the most negative entry in the objective row (for maximisation written as z − c·x = 0). The pivot row has the smallest non-negative ratio of right-hand side to the positive entry in the pivot column.
How do you know the simplex tableau is optimal?
When the objective row has no negative entries, no further pivot can improve the objective, so the current basic solution is optimal. A zero entry can indicate alternative optimal solutions.
Can I undo steps in the app?
Yes. “Back” undoes each sub-step and “Reset” starts over, so you can replay individual pivots as often as you like.

Subject: Operations research

More from Operations research

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps