Simplex Method Examples: 3 Solved Problems (Maximization, Minimization, 3 Variables)
Yayınlanma tarihi October 16, 2026 · yazan Simplex Method Calculator Editorial Team
The fastest way to learn the simplex method is to follow complete examples. This page solves three linear programming problems from start to finish, showing every tableau, the entering and leaving variable at each step, and the final answer with a check. Each example highlights a different situation you will meet in homework and exams.
If you need the rules first, read how to solve an LPP by the simplex method. To check any of these examples, enter them in the simplex method calculator with steps.
Example 1: Maximization with Three Constraints
Maximize Z = 3x1 + 5x2 subject to x1 ≤ 4, 2x2 ≤ 12, 3x1 + 2x2 ≤ 18, and x1, x2 ≥ 0.
Add slack variables s1, s2 and s3. The initial tableau is:
| Basis | Cb | x1 | x2 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|
| s1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
| s2 | 0 | 0 | 2 | 0 | 1 | 0 | 12 |
| s3 | 0 | 3 | 2 | 0 | 0 | 1 | 18 |
| Cj − Zj | 3 | 5 | 0 | 0 | 0 | Z = 0 |
Iteration 1. x2 enters (Cj − Zj = 5). Ratios: row s1 has a 0 in the x2 column, so it is skipped; row s2 gives 12/2 = 6; row s3 gives 18/2 = 9. s2 leaves, pivot = 2.
| Basis | Cb | x1 | x2 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|
| s1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
| x2 | 5 | 0 | 1 | 0 | 1/2 | 0 | 6 |
| s3 | 0 | 3 | 0 | 0 | −1 | 1 | 6 |
| Cj − Zj | 3 | 0 | 0 | −5/2 | 0 | Z = 30 |
Iteration 2. x1 enters (Cj − Zj = 3). Ratios: row s1 gives 4/1 = 4; row s3 gives 6/3 = 2. s3 leaves, pivot = 3.
| Basis | Cb | x1 | x2 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|
| s1 | 0 | 0 | 0 | 1 | 1/3 | −1/3 | 2 |
| x2 | 5 | 0 | 1 | 0 | 1/2 | 0 | 6 |
| x1 | 3 | 1 | 0 | 0 | −1/3 | 1/3 | 2 |
| Cj − Zj | 0 | 0 | 0 | −3/2 | −1 | Z = 36 |
All Cj − Zj ≤ 0, so the tableau is optimal.
Answer: x1 = 2, x2 = 6, maximum Z = 36. Check: 3(2) + 5(6) = 36, and the constraints give 2 ≤ 4, 12 ≤ 12 and 6 + 12 = 18 ≤ 18. The slack s1 = 2 shows that the first constraint has 2 units to spare.
What this example teaches: a row with a zero (or negative) entry in the pivot column is left out of the ratio test.
Example 2: Minimization with Negative Coefficients
Minimize Z = x1 − 3x2 + 2x3 subject to
- 3x1 − x2 + 2x3 ≤ 7
- −2x1 + 4x2 ≤ 12
- −4x1 + 3x2 + 8x3 ≤ 10
- x1, x2, x3 ≥ 0
Conversion. Minimizing Z is the same as maximizing −Z = −x1 + 3x2 − 2x3. Solve the maximization problem with the usual rules, then change the sign of the result. This technique is explained in maximization vs minimization in the simplex method.
| Basis | Cb | x1 | x2 | x3 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|---|
| s1 | 0 | 3 | −1 | 2 | 1 | 0 | 0 | 7 |
| s2 | 0 | −2 | 4 | 0 | 0 | 1 | 0 | 12 |
| s3 | 0 | −4 | 3 | 8 | 0 | 0 | 1 | 10 |
| Cj − Zj | −1 | 3 | −2 | 0 | 0 | 0 | 0 |
Iteration 1. x2 enters (Cj − Zj = 3, the only positive value). Ratios use positive entries only: row s2 gives 12/4 = 3; row s3 gives 10/3 (about 3.33). Row s1 has −1 and is skipped. s2 leaves, pivot = 4.
| Basis | Cb | x1 | x2 | x3 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|---|
| s1 | 0 | 5/2 | 0 | 2 | 1 | 1/4 | 0 | 10 |
| x2 | 3 | −1/2 | 1 | 0 | 0 | 1/4 | 0 | 3 |
| s3 | 0 | −5/2 | 0 | 8 | 0 | −3/4 | 1 | 1 |
| Cj − Zj | 1/2 | 0 | −2 | 0 | −3/4 | 0 | 9 |
Iteration 2. x1 enters (Cj − Zj = 1/2). Only row s1 has a positive x1 entry: 10 / (5/2) = 4. s1 leaves, pivot = 5/2.
| Basis | Cb | x1 | x2 | x3 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|---|
| x1 | −1 | 1 | 0 | 4/5 | 2/5 | 1/10 | 0 | 4 |
| x2 | 3 | 0 | 1 | 2/5 | 1/5 | 3/10 | 0 | 5 |
| s3 | 0 | 0 | 0 | 10 | 1 | −1/2 | 1 | 11 |
| Cj − Zj | 0 | 0 | −12/5 | −1/5 | −4/5 | 0 | 11 |
All Cj − Zj ≤ 0, so the maximization problem is optimal with −Z = 11.
Answer: x1 = 4, x2 = 5, x3 = 0, minimum Z = −11. Check: 4 − 3(5) + 0 = −11. Constraints: 12 − 5 = 7 ≤ 7, −8 + 20 = 12 ≤ 12 and −16 + 15 = −1 ≤ 10.
What this example teaches: negative coefficients in the constraints are fine. Only the entries used in the ratio test must be positive.
Example 3: Three Variables
Maximize Z = 5x1 + 4x2 + 3x3 subject to
- 2x1 + 3x2 + x3 ≤ 5
- 4x1 + x2 + 2x3 ≤ 11
- 3x1 + 4x2 + 2x3 ≤ 8
- x1, x2, x3 ≥ 0
| Basis | Cb | x1 | x2 | x3 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|---|
| s1 | 0 | 2 | 3 | 1 | 1 | 0 | 0 | 5 |
| s2 | 0 | 4 | 1 | 2 | 0 | 1 | 0 | 11 |
| s3 | 0 | 3 | 4 | 2 | 0 | 0 | 1 | 8 |
| Cj − Zj | 5 | 4 | 3 | 0 | 0 | 0 | 0 |
Iteration 1. x1 enters (Cj − Zj = 5). Ratios: 5/2 = 2.5, 11/4 = 2.75, 8/3 ≈ 2.67. s1 leaves, pivot = 2.
| Basis | Cb | x1 | x2 | x3 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|---|
| x1 | 5 | 1 | 3/2 | 1/2 | 1/2 | 0 | 0 | 5/2 |
| s2 | 0 | 0 | −5 | 0 | −2 | 1 | 0 | 1 |
| s3 | 0 | 0 | −1/2 | 1/2 | −3/2 | 0 | 1 | 1/2 |
| Cj − Zj | 0 | −7/2 | 1/2 | −5/2 | 0 | 0 | 25/2 |
Iteration 2. x3 enters (Cj − Zj = 1/2). Ratios: row x1 gives (5/2) / (1/2) = 5; row s3 gives (1/2) / (1/2) = 1; row s2 has 0 and is skipped. s3 leaves, pivot = 1/2.
| Basis | Cb | x1 | x2 | x3 | s1 | s2 | s3 | RHS |
|---|---|---|---|---|---|---|---|---|
| x1 | 5 | 1 | 2 | 0 | 2 | 0 | −1 | 2 |
| s2 | 0 | 0 | −5 | 0 | −2 | 1 | 0 | 1 |
| x3 | 3 | 0 | −1 | 1 | −3 | 0 | 2 | 1 |
| Cj − Zj | 0 | −3 | 0 | −1 | 0 | −1 | 13 |
All Cj − Zj ≤ 0, so the tableau is optimal.
Answer: x1 = 2, x2 = 0, x3 = 1, maximum Z = 13. Check: 5(2) + 3(1) = 13. Constraints: 4 + 1 = 5 ≤ 5, 8 + 2 = 10 ≤ 11, 6 + 2 = 8 ≤ 8.
What this example teaches: the variable with the largest objective coefficient (x1) enters first, but the optimum can still include a variable with a smaller coefficient (x3) once the first pivot changes the Cj − Zj row.
Practice With Your Own Problems
These three examples cover the patterns behind most exam questions. For more practice, change one number in any example and solve it again, then compare with the 3-variable simplex calculator or the simplex tableau calculator. If your problem contains ≥ or = constraints, continue with the Big M method vs two phase method guide.