Math can help us plan. 
Math can help us plan. 
Math can help us find the best way to do things. This is called linear programming. 
To solve a problem, we look at a shape called a polytope. This shape is made by rules called constraints. These rules show what is possible. The best answer is always at a corner of the shape. We call these corners vertices. 
The simplex algorithm is a set of steps to find that best corner. First, the math finds a starting corner. This is called Phase I. Then, the math moves along the edges of the shape. It moves from one corner to another. It only moves to corners that make the goal better. This goal is called an objective function. We want to make this value as large as possible. This part is called Phase II. The math stops when it reaches the best corner. It can also stop if the goal can grow forever.
Math can help us find the best way to do things. This is called linear programming. 
To understand how it works, imagine a geometric shape called a polytope. 
George Dantzig developed this method during World War II. He worked for the US Army Air Force. At that time, he used a desk calculator for his planning. A colleague challenged him to make the process automatic in 1946. Dantzig used ideas from the work of Wassily Leontief. He realized he could turn ground rules into an objective function. This is a mathematical goal that we want to maximize.
Finding the best answer happens in two main steps. The first step is called Phase I. In this phase, the math looks for a starting corner. If no corner can be found, the problem is called infeasible. This means there are no answers that follow all the rules. The second step is called Phase II. 
We can use math symbols to show how the algorithm moves. A pivot operation is the way the math jumps between corners. It changes which variables are part of the solution. One variable enters the group while another leaves. This process is done using a table called a tableau. The tableau helps keep track of all the numbers. By following these steps, the algorithm always finds the best answer or tells us if no answer exists.
Mathematical optimization is the study of finding the best possible solution to a problem. One of the most important tools for this is the simplex algorithm. This algorithm is used for linear programming, which is a way to reach a specific goal while following a set of rules. These rules are known as constraints. The simplex algorithm allows us to find the maximum or minimum value of an objective function. 
To use the simplex algorithm, a problem must first be written in standard form. This process makes the math easier to manage. First, any variable with a lower bound other than zero is changed. We introduce a new variable to represent the difference between the original variable and its bound. Next, we handle inequality constraints by adding slack variables. A slack variable turns an inequality into an equality by representing the difference between the two sides. Finally, any unrestricted variables are replaced by the difference of two restricted variables. This transforms the problem into a clean system of linear equations.
In geometric terms, these equations define a shape called a polytope.
The simplex algorithm operates through two distinct stages. The first stage is called Phase I. In this phase, the algorithm searches for a starting basic feasible solution. If the algorithm cannot find any corner that follows the rules, the problem is declared infeasible. This means the constraints are impossible to satisfy at the same time. If a starting point is found, the algorithm moves to Phase II. 
George Dantzig developed the simplex method during World War II. He was working on planning methods for the US Army Air Force. At the time, he used a desk calculator to perform his work. In 1946, a colleague challenged him to mechanize the planning process. Dantzig was inspired by the work of Wassily Leontief. He realized that military ground rules could be translated into a linear objective function. This allowed him to turn a vague set of rules into a specific mathematical goal to maximize. Dantzig later published his work as a doctoral thesis.
The actual movement between corners is done through a process called a pivot operation. To keep track of the numbers, mathematicians use a table called a tableau. The tableau shows the coefficients of the objective function and the constraints. During a pivot, a nonbasic variable is chosen to become an entering variable. This variable moves into the set of basic variables. To make room, an existing basic variable must leave the set. This is known as the leaving variable. 
The algorithm is highly efficient because it always moves in the direction of the objective function. It walks along the edges of the polytope from one vertex to another. Each step is chosen to increase the value of the objective function. The process continues until the algorithm reaches a vertex where no adjacent edge leads to a higher value. Because a polytope has a finite number of vertices, the algorithm is guaranteed to terminate. It will either find the optimal solution or conclude that the objective function is unbounded, meaning the value can increase forever.
🖼️ Images & Media (3)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.