Simplex Method Calculator

Type the objective and the constraints to solve the linear programme.

A linear expression to maximise or minimise, such as 3x + 2y.

Linear constraints with <=, >= or =, separated by semicolons. Every variable is taken as ≥ 0.

Try

Result

You enteredmaximise z=3x+2y\text{maximise } z = 3x + 2y

z=11 at x=3, y=1\displaystyle z = 11\ \text{at}\ x = 3,\ y = 1

Point

(3,1)\displaystyle \left(3, 1\right)
Show the work
  1. Standard form

    Every right side is made ≥ 0; each ≤ gets a slack variable (s), each ≥ a surplus (e) and an artificial variable (a), each = an artificial; all variables are ≥ 0.

    Using maximise z=3x+2y\text{maximise } z = 3x + 2y

    x+y≤4x+3y≤6x≤3\begin{gathered} x + y \le 4 \\ x + 3y \le 6 \\ x \le 3 \end{gathered}
  2. Pivot: x enters, s3 leaves

    The most useful column is the first with a negative entry in the bottom row (Bland's rule, which never cycles); the ratio test (RHS ÷ positive entries of that column) picks the row whose limit is smallest.

    minimum ratio=3\text{minimum ratio} = 3
  3. Pivot: y enters, s1 leaves

    The most useful column is the first with a negative entry in the bottom row (Bland's rule, which never cycles); the ratio test (RHS ÷ positive entries of that column) picks the row whose limit is smallest.

    minimum ratio=1\text{minimum ratio} = 1
  4. Tableaux

    The tableaux; the bottom row holds z_j − c_j and, last, the value of the objective.

    basisxys1s2s3RHSs1111004s2130106s3100013z−3−20000⟶basisxys1s2s3RHSs10110−11s20301−13x100013z0−20039⟶basisxys1s2s3RHSy0110−11s200−3120x100013z0020111\begin{array}{c|ccccc|c} \text{basis} & x & y & s_{1} & s_{2} & s_{3} & \text{RHS} \\ \hline s_{1} & 1 & 1 & 1 & 0 & 0 & 4 \\ s_{2} & 1 & 3 & 0 & 1 & 0 & 6 \\ s_{3} & 1 & 0 & 0 & 0 & 1 & 3 \\ \hline z & -3 & -2 & 0 & 0 & 0 & 0 \end{array}\quad\longrightarrow\quad \begin{array}{c|ccccc|c} \text{basis} & x & y & s_{1} & s_{2} & s_{3} & \text{RHS} \\ \hline s_{1} & 0 & 1 & 1 & 0 & -1 & 1 \\ s_{2} & 0 & 3 & 0 & 1 & -1 & 3 \\ x & 1 & 0 & 0 & 0 & 1 & 3 \\ \hline z & 0 & -2 & 0 & 0 & 3 & 9 \end{array}\quad\longrightarrow\quad \begin{array}{c|ccccc|c} \text{basis} & x & y & s_{1} & s_{2} & s_{3} & \text{RHS} \\ \hline y & 0 & 1 & 1 & 0 & -1 & 1 \\ s_{2} & 0 & 0 & -3 & 1 & 2 & 0 \\ x & 1 & 0 & 0 & 0 & 1 & 3 \\ \hline z & 0 & 0 & 2 & 0 & 1 & 11 \end{array}
  5. Optimal

    No entry of the bottom row is negative, so no move improves the objective: this corner is optimal. Read each basic variable from its row; the others are 0.

    x=3, y=1x = 3,\ y = 1
  6. Result

    The maximum value and where it is reached.

    zmax⁡=11 at x=3, y=1z_{\max} = 11\ \text{at}\ x = 3,\ y = 1

Worked examples