Big M Method vs Two Phase Method: Differences and Solved Example
Opublikowano June 27, 2026 · autor Simplex Method Calculator Editorial Team
When a linear program contains ≥ or = constraints, slack variables alone cannot give a starting solution, so the simplex method needs artificial variables. Two standard techniques get rid of them again: the Big M method and the two phase method. Both always reach the same optimal solution. They differ in how much arithmetic they need, how they detect infeasible problems, and how safe they are on a computer.
This page compares the two side by side on the same problem. For the complete tableaus, see the full guides to the Big M method and the two phase method.
Why Artificial Variables Are Needed
The simplex method starts from a basic feasible solution with one basic variable per row, each with a +1 coefficient. A ≤ constraint provides this through its slack variable. A ≥ constraint does not: its surplus variable enters with −1, so setting the decision variables to zero would make the surplus negative. An = constraint has no helper variable at all.
An artificial variable fills the gap. It has no real meaning, so any final answer must have every artificial variable equal to zero. The Big M and two phase methods are two ways of forcing that to happen. The rules for adding each helper variable are in slack, surplus and artificial variables.
The Big M Method in Brief
Each artificial variable is added to the objective with a huge penalty M: +M in a minimization problem, −M in a maximization problem. Because M dominates every other number, the simplex method removes the artificial variables as early as it can, then continues optimizing the real objective. Everything happens in one run of tableaus.
- Strength: one objective, one sequence of tableaus.
- Weakness: every Cj − Zj entry has the form “number + number × M”, which makes hand arithmetic slow. On a computer, M must be replaced by a real number, which must be big enough to dominate but small enough not to cause rounding errors.
The Two Phase Method in Brief
-
Phase 1 ignores the real objective and minimizes W = the sum of the artificial variables. If the minimum W is greater than zero, the problem is infeasible. If W = 0, the final Phase 1 tableau is a feasible starting point.
-
Phase 2 deletes the artificial columns, restores the real objective, and continues with the ordinary simplex method.
-
Strength: no M, so the numbers stay simple and there is no numerical risk.
-
Weakness: two objectives and an extra step to rebuild the Cj − Zj row between phases.
Solved Example: Same Problem, Both Methods
Minimize Z = 4x1 + x2 subject to 3x1 + x2 = 3, 4x1 + 3x2 ≥ 6, x1 + 2x2 ≤ 4, and x1, x2 ≥ 0.
Both methods first rewrite the constraints: add a1 to the first, subtract surplus s2 and add a2 to the second, and add slack s3 to the third. Then:
| Step | Big M method | Two phase method |
|---|---|---|
| Objective used | Max −Z = −4x1 − x2 − M a1 − M a2 | Phase 1: Max −W = −a1 − a2 |
| Pivot 1 | x1 enters, a1 leaves | x1 enters, a1 leaves |
| Pivot 2 | x2 enters, a2 leaves | x2 enters, a2 leaves; W = 0, Phase 1 ends |
| First feasible point | x1 = 3/5, x2 = 6/5, Z = 18/5 | x1 = 3/5, x2 = 6/5 (start of Phase 2), Z = 18/5 |
| Pivot 3 | s2 enters, s3 leaves | Phase 2: s2 enters, s3 leaves |
| Optimal answer | x1 = 2/5, x2 = 9/5, Z = 17/5 | x1 = 2/5, x2 = 9/5, Z = 17/5 |
Both methods make exactly the same pivots on this problem and reach x1 = 0.4, x2 = 1.8, minimum Z = 3.4. The difference is only in what is written in the Cj − Zj row. In the Big M method, the first tableau’s row reads −4 + 7M, −1 + 4M and so on. In Phase 1 of the two phase method, the same row reads simply 7, 4 and so on.
Notice too that the first feasible solution (Z = 3.6) is not optimal in either method. One more pivot is needed after the artificial variables leave.
Detailed Comparison
| Big M method | Two phase method | |
|---|---|---|
| Number of objectives | One | Two (W, then Z) |
| Uses the constant M | Yes | No |
| Hand arithmetic | Heavier: every Cj − Zj carries an M term | Lighter: plain numbers |
| Numerical stability on computers | Lower: M must be chosen carefully | Higher |
| How infeasibility shows | Artificial variable still positive in the optimal tableau | W greater than 0 at the end of Phase 1 |
| Extra work | None between phases | Rebuild Cj and Cj − Zj for Phase 2 |
| Used by LP software | Rarely | Yes (in some form) |
Which One Should You Use?
- In an exam, use whichever method the question names. If it does not name one, the two phase method usually means fewer arithmetic mistakes, because you never have to compare expressions such as 4/3 − (7/3)M.
- For a quick hand solution of a small problem, Big M is fine and needs only one table layout.
- On a computer, the two phase method avoids having to pick a value for M.
- If the problem is a minimization with ≥ constraints and non-negative costs, consider the dual simplex method instead. It needs no artificial variables at all.
Common Mistakes
- Wrong sign of the penalty. Minimization uses +M, maximization uses −M. Getting it backwards keeps the artificial variables in the basis.
- Stopping when the artificial variables leave. That gives a feasible solution, not necessarily the optimal one, as the example shows.
- Keeping the artificial columns in Phase 2. They must be deleted after Phase 1.
- Forgetting to recompute Cj − Zj at the start of Phase 2. The Phase 1 values belong to W, not to Z.
Check Your Answer
The Big M method calculator solves problems with ≥ and = constraints using the Big M technique and shows every tableau. The 2-phase simplex method calculator uses the same solver, so its tableaus follow the Big M layout. Both confirm the optimal solution above, which is identical for either method.