Below you will find our **online calculator of the Big M method** where you can solve linear programming problems easily and quickly. This tool has the same operation and aesthetics very similar to our online application of the two-phase simplex method.

## How to use the Big M Method Calculator

To use our application, you must perform the following steps:

- Enter the number of variables and constraints of the problem.
- Select the type of problem:Β
**maximize**Β orΒ**minimize**. - Enter the coefficients in the objective function and the constraints. You can enter negative numbers, fractions, and decimals (with point).
- Click on βSolveβ.
- The online calculator will adapt the entered values to the standard form of the
**simplex algorithm**and create the first table. - Depending on the sign of the constraints, the normal
**simplex algorithm**or the**big M method**is used. - We can see step by step the
**iterations**and tables of the exercise. - In the last part will show the results of the problem.

It is important to emphasize that the **Big M method** is used to solve problems with constraints with equal and greater or equal signs. These types of constraints will add artificial variables to the standard linear programming model. If the problem only has less or equal sign constraints, the calculator will solve it with the traditional simplex method. In any case, our tool can solve any type of problem, be it minimization and/or maximization.

In the same way as in our previous calculator, for problems with over 20 variables, we recommend using some specialized software.

### Solving an exercise with the Big M Method Calculator

**Maximize** 3X_{1} + 4X_{2}

**Subject to** 2X_{1} + X_{2} β€ 600

X_{1} + X_{2} β€ 225

5X_{1} + 4X_{2} β€ 1000

X_{1} + 2X_{2} β₯ 150

X_{1}, X_{2} β₯ 0

#### Solution:

We enter the number of variables and the number of restrictions and click on “Generate Model”:

In the following form, we select the objective and enter the coefficients of the objective function and the constraints:

Finally, we click on “Solve” and we will see the adaptation of the problem to the standard form and the iterations of the simplex table with the algorithm of the Big M method. For this example the explanation would be:

The problem will be adapted to the standard linear programming model, adding the slack, excess and / or artificial variables in each of the constraints:

**Constraint 1:**It has a sign “β€” (less than or equal) so the slack variable will be added S_{1}.**Constraint 2:**It has a sign “β€” (less than or equal) so the slack variable will be added S_{2}.**Constraint 3:**It has a sign “β€” (less than or equal) so the slack variable will be added S_{3}.**Constraint 4:**It has a sign “β₯” (greater than or equal) so the excess variable S_{4}will be subtracted and the artificial variable A_{1}will be added.

The problem has artificial variables so we will use the **Big M method**. As the problem is one of **maximization, the artificial variables will be subtracted from the objective function multiplied by a very large number** (represented by the letter **M**) in this way the simplex algorithm will penalize them and eliminate them from the base.

The problem is shown below in standard form. The coefficient 0 (zero) will be placed where it corresponds to create our table:

#### Objective Function:

Maximize: Z = 3X_{1} + 4X_{2} + 0S_{1} + 0S_{2} + 0S_{3} + 0S_{4} – MA_{1}

#### Subject to:

2X_{1} + 1X_{2} + 1S_{1} + 0S_{2} + 0S_{3} + 0S_{4} + 0A_{1} = 600

1X_{1} + 1X_{2} + 0S_{1} + 1S_{2} + 0S_{3} + 0S_{4} + 0A_{1} = 225

5X_{1} + 4X_{2} + 0S_{1} + 0S_{2} + 1S_{3} + 0S_{4} + 0A_{1} = 1000

1X_{1} + 2X_{2} + 0S_{1} + 0S_{2} + 0S_{3} – 1S_{4} + 1A_{1} = 150

X_{1}, X_{2}, S_{1}, S_{2}, S_{3}, S_{4}, A_{1} β₯ 0

#### Initial Table

Table 1 | C_{j} |
3 | 4 | 0 | 0 | 0 | 0 | – M | |
---|---|---|---|---|---|---|---|---|---|

C_{b} |
Base | X_{1} |
X_{2} |
S_{1} |
S_{2} |
S_{3} |
S_{4} |
A_{1} |
R |

0 | S_{1} |
2 | 1 | 1 | 0 | 0 | 0 | 0 | 600 |

0 | S_{2} |
1 | 1 | 0 | 1 | 0 | 0 | 0 | 225 |

0 | S_{3} |
5 | 4 | 0 | 0 | 1 | 0 | 0 | 1000 |

– M | A_{1} |
1 | 2 | 0 | 0 | 0 | -1 | 1 | 150 |

Z | -M-3 | -2M-4 | 0 | 0 | 0 | M | 0 | -150M |

Enter the variable **X _{2}** and the variable

**A**leaves the base. The pivot element is

_{1}**2**

#### Iteration 1

Table 2 | C_{j} |
3 | 4 | 0 | 0 | 0 | 0 | – M | |
---|---|---|---|---|---|---|---|---|---|

C_{b} |
Base | X_{1} |
X_{2} |
S_{1} |
S_{2} |
S_{3} |
S_{4} |
A_{1} |
R |

0 | S_{1} |
3/2 | 0 | 1 | 0 | 0 | 1/2 | -1/2 | 525 |

0 | S_{2} |
1/2 | 0 | 0 | 1 | 0 | 1/2 | -1/2 | 150 |

0 | S_{3} |
3 | 0 | 0 | 0 | 1 | 2 | -2 | 700 |

4 | X_{2} |
1/2 | 1 | 0 | 0 | 0 | -1/2 | 1/2 | 75 |

Z | -1 | 0 | 0 | 0 | 0 | -2 | M+2 | 300 |

Enter the variable **S _{4}** and the variable

**S**leaves the base. The pivot element is

_{2}**1/2**

#### Iteration 2

Table 3 | C_{j} |
3 | 4 | 0 | 0 | 0 | 0 | – M | |
---|---|---|---|---|---|---|---|---|---|

C_{b} |
Base | X_{1} |
X_{2} |
S_{1} |
S_{2} |
S_{3} |
S_{4} |
A_{1} |
R |

0 | S_{1} |
1 | 0 | 1 | -1 | 0 | 0 | 0 | 375 |

0 | S_{4} |
1 | 0 | 0 | 2 | 0 | 1 | -1 | 300 |

0 | S_{3} |
1 | 0 | 0 | -4 | 1 | 0 | 0 | 100 |

4 | X_{2} |
1 | 1 | 0 | 1 | 0 | 0 | 0 | 225 |

Z | 1 | 0 | 0 | 4 | 0 | 0 | M | 900 |

The optimal solution is Z = 900

X_{1}= 0, X_{2}= 225, S_{1}= 375, S_{2}= 0, S_{3}= 100, S_{4}= 300, A_{1}= 0

## Final reflection

We are sure that our **online calculator of the Big M method** will become your major ally for practicing this methodology and being successful in your exams and/or assignments.

We remind you that the objective of this tool is to learn the simplex method and the **Big M**, so the use that you can give it is exclusively under your responsibility. Also, we are not responsible for any errors or inaccuracies in the results.

If you have questions about it or find an error in our application, we will appreciate if you can write to us on our contact page.