Simplex Pivot Explained with Worked Examples

In a simplex step the entering column is the one with the most negative entry in the objective row (largest improvement per unit), and the leaving row is chosen by the minimum ratio over positive entries of that column, which keeps the solution feasible.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Simplex pivot means

Maximise subject to , . The objective row is : entries and , so enters (reduced cost ). The ratios are and ; the minimum, 4, selects row 1, so leaves. After pivoting, and the objective is ; no negative entries remain, so the solution is optimal.

The minimum ratio test prevents any basic variable becoming negative: if row 2 had been chosen, would give . A pivot moves from one vertex of the feasible region to an adjacent one (the optimum at a vertex), each time improving or keeping the objective. The pivot itself is Gaussian elimination on the tableau (Gaussian elimination cost).

Reading the final tableau gives the solution and shadow prices (reading the simplex tableau, LP duality). Degenerate ties in the ratio test can cause cycling, handled by anti-cycling rules.

What is it used for?

A simplex pivot moves to a neighbouring corner of the feasible region with a better objective value.

How to use simplex pivot

  1. Write the tableau with the objective row.
  2. Choose the column with the most negative objective-row entry.
  3. Compute for positive and choose the minimum.
  4. Pivot (row operations) and repeat until no negative entry remains.

Graph

Ratio test: 4/1 and 6/1 -- the smaller ratio picks the pivot rowrow 1: 4 (leaves)row 2: 600.511.522.5301234567Ratio test: 4/1 and 6/1 -- the smaller ratio picks the pivot rowrowyGraph with x from 0 to 3 and y from 0 to 7. Shows bars (2); point row 1: 4 (leaves) at (1, 4); point row 2: 6 at (2, 6).

Choosing the smaller ratio keeps all variables non-negative.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: entering column

Which objective-row entry is chosen in ?

Worked example
Answer
−3 (x enters)-3\ (x\text{ enters})
  1. Most negative

Example 2: ratio test

Find the minimum ratio for the column of with right-hand sides 4 and 6 (entries 1 and 1).

Worked example
Answer
44
  1. Ratios

Example 3: objective value

Find the objective value after the pivot.

Worked example
Answer
1212
  1. x = 4

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

Entering column

most negative objective entry: −3 (x)

Choose the variable to enter.

Ratio test

rhs ÷ column entry: 4 ÷ 1 = 4, 6 ÷ 1 = 6

Smallest ratio leaves.

After pivoting

row 2 rhs 6 − 4 = 2

Subtract row 1.

Objective

z = 12 after the pivot

3 × 4.

Word problems

A simplex pivot picks an entering variable (most negative objective-row entry), a leaving row by the minimum ratio rhs/column entry (positive entries only), then eliminates the column using row operations.

Choose the column

Objective row (−3, −2). Which column enters?

  1. Most negative−3
  2. Check: column x ✓x.

Ratio test

Column (1, 1), rhs (4, 6). Which row leaves?

  1. 4 ÷ 14
  2. 6 ÷ 16
  3. Check: smallest is 4 ✓Row 1.

Eliminate Higher

Update row 2 rhs after pivoting on row 1 (entry 1).

  1. 6 − 1 × 4
  2. Check: 2 ✓2.

Objective value Higher

Update z: add 3 × row 1 to the objective row rhs.

  1. 0 + 3 × 4
  2. Check: 12 ✓12.

Common mistakes

Using the largest ratio

max rhs/entry ✗

minimum ratio ✓

Otherwise feasibility breaks.

Including non-positive entries

dividing by 0 or negatives ✗

only positive entries ✓

Ignore them in the ratio test.

Forgetting to scale the pivot row

pivot ≠ 1 ✗

divide the row by the pivot ✓

Make it 1.

Stopping early

a negative entry remains ✗

continue until all ≥ 0 ✓

Optimality test.

Exam tips

  1. Most negative entry enters.
  2. Minimum ratio leaves.
  3. Positive entries only.
  4. Make the pivot 1.
  5. Stop when no negatives.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Ratio 8 ÷ 2 Foundation

4

2. Ratio 9 ÷ 3 Foundation

3

3. Row 2 rhs: 10 − 2 × 3 Foundation

4

4. Objective rhs: 0 + 5 × 4 Higher

20

5. Pivot row ÷ 2: rhs 8/2 Higher

4

6. Min of 4 and 6 Higher

4

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Simplex method
Moves between vertices.
Pivot
Entry used for elimination.
Entering variable
Becomes basic.
Leaving variable
Becomes non-basic.
Ratio test
Chooses the leaving row.
Tableau
Table of coefficients.

Frequently asked questions

What is a simplex pivot?

One step swapping a basic and non-basic variable.

How do I choose the entering variable?

The most negative objective entry.

What is the ratio test?

Smallest rhs ÷ positive column entry.

When do I stop?

When the objective row has no negatives.

Which page covers duality?

LP duality.

Which page covers reading a tableau?

reading the solution.

More in Numerical methods and optimisation and the formula sheets.