Skip to content
Calcolatore del Metodo del Simplesso Calcolatore del Metodo del Simplesso
← Torna al blog
Big M Method: Steps and Solved Example with Every Tableau

Big M Method: Steps and Solved Example with Every Tableau

Pubblicato il October 16, 2026 · di Simplex Method Calculator Editorial Team

The ordinary simplex method needs a starting basis, and slack variables provide one only when every constraint is ≤ with a non-negative right-hand side. As soon as a problem contains a ≥ or an = constraint, there is no obvious starting solution. The Big M method solves this by adding artificial variables and giving them a huge penalty, M, in the objective function so that the simplex method removes them on its own.

This guide explains the method, then solves a complete example with every tableau. The Big M method calculator uses this approach, so you can follow the same pivots step by step.

Slack, Surplus and Artificial Variables

Each constraint type needs different helper variables:

ConstraintWhat to addExample
≤+ slack variablex1 + 2x2 ≤ 4 becomes x1 + 2x2 + s3 = 4
≥− surplus variable + artificial variable4x1 + 3x2 ≥ 6 becomes 4x1 + 3x2 − s2 + a2 = 6
=+ artificial variable3x1 + x2 = 3 becomes 3x1 + x2 + a1 = 3

The surplus variable cannot start the basis because its coefficient is −1, which would make it negative. The artificial variable has a +1 coefficient, so it can. Artificial variables have no real meaning, which is why every one of them must reach zero in the final answer. More detail is in our guide to slack, surplus and artificial variables.

How the Penalty Works

Each artificial variable gets the coefficient M in the objective, where M is larger than any other number in the problem:

  • Minimization: add +M times each artificial variable, so keeping one costs a huge amount.
  • Maximization: add −M times each artificial variable, so keeping one loses a huge amount.

Because the penalty dominates every other term, the simplex method drives the artificial variables out of the basis as early as it can, and then continues optimizing the real objective.

Big M Method Steps

  1. Convert every constraint to an equation with slack, surplus and artificial variables.
  2. Add the artificial variables to the objective with the penalty M (sign as above).
  3. Build the initial tableau with slack and artificial variables in the basis.
  4. Compute Cj − Zj. Entries will be of the form “number + number × M”. Compare them by the M part first, then by the plain number.
  5. Pivot with the usual entering and leaving rules until the tableau is optimal.
  6. Read the answer. If an artificial variable is still positive in the optimal tableau, the problem is infeasible.

Solved Example

Minimize Z = 4x1 + x2

Subject to

  • 3x1 + x2 = 3
  • 4x1 + 3x2 ≥ 6
  • x1 + 2x2 ≤ 4
  • x1, x2 ≥ 0

Setting Up

Add a1 to the first constraint, subtract surplus s2 and add a2 to the second, and add slack s3 to the third. To use the maximization rules, we maximize −Z instead of minimizing Z:

Maximize −Z = −4x1 − x2 − M a1 − M a2

The variable order below is x1, x2, a1, s2, a2, s3, the same order the calculator uses.

Initial Tableau

Basisx1x2a1s2a2s3RHS
a13110003
a2430−1106
s31200014
Cj − Zj−4 + 7M−1 + 4M0−M00−Z = −9M

The M parts decide the entering variable. x1 has 7M, the largest, so x1 enters. Ratios: 3/3 = 1, 6/4 = 1.5, 4/1 = 4. a1 leaves, pivot = 3.

Tableau 2

Basisx1x2a1s2a2s3RHS
x111/31/30001
a205/3−4/3−1102
s305/3−1/30013
Cj − Zj01/3 + (5/3)M4/3 − (7/3)M−M00−Z = −4 − 2M

One artificial variable is gone. x2 has the largest positive Cj − Zj, so x2 enters. Ratios: 1 / (1/3) = 3, 2 / (5/3) = 6/5, 3 / (5/3) = 9/5. a2 leaves, pivot = 5/3.

Tableau 3

Basisx1x2a1s2a2s3RHS
x1103/51/5−1/503/5
x201−4/5−3/53/506/5
s30011−111
Cj − Zj008/5 − M1/5−1/5 − M0−Z = −18/5

Both artificial variables are now out of the basis, so the solution x1 = 3/5, x2 = 6/5 is feasible, with Z = 18/5. It is not optimal yet: the surplus variable s2 has a positive Cj − Zj of 1/5. s2 enters. Ratios use positive entries only: 3/5 ÷ 1/5 = 3 and 1 / 1 = 1. s3 leaves, pivot = 1.

Tableau 4 (Optimal)

Basisx1x2a1s2a2s3RHS
x1102/500−1/52/5
x201−1/5003/59/5
s20011−111
Cj − Zj007/5 − M0−M−1/5−Z = −17/5

Every Cj − Zj is now zero or negative (remember that M is huge, so 7/5 − M is negative). The tableau is optimal.

Answer

  • x1 = 2/5 = 0.4, x2 = 9/5 = 1.8
  • Minimum Z = 4(0.4) + 1.8 = 17/5 = 3.4
  • s2 = 1, so the second constraint is exceeded by 1: 4(0.4) + 3(1.8) = 7, which is 1 more than 6.

Check the other constraints: 3(0.4) + 1.8 = 3 ✓ and 0.4 + 2(1.8) = 4 ✓.

Notice that the first feasible solution (Tableau 3, Z = 3.6) was not the optimal one. A common exam mistake is to stop as soon as the artificial variables leave the basis.

Advantages and Disadvantages

  • One phase. The whole problem is solved in a single sequence of tableaus.
  • Easy to set up by hand. You only need to add the penalty terms.
  • Messy arithmetic. Every Cj − Zj entry carries an M term, which makes hand calculation slower.
  • Numerical risk on computers. If M is replaced by a real number, it must be large enough to dominate but not so large that rounding errors appear. The two-phase method avoids this problem entirely. For a side-by-side comparison, read Big M method vs two-phase method.

Try It

Enter 4x1 + x2, choose minimize, and type the three constraints (3x1 + x2 = 3, 4x1 + 3x2 >= 6, x1 + 2x2 <= 4) in the Big M method calculator. It adds a1, s2, a2 and s3 for you and makes the same four pivots. The calculator uses M = 1,000,000 as a number and displays very large values in millions, so an entry this guide writes as −4 + 7M appears as 7M; the choices and the final answer are identical.