*The
Leaving Variable*

**Example: Product
Planning**

We need to find out which solution variable will
first be driven to zero as units of x_{2} are introduced into the
solution. Since variable x_{1} will remain an outside variable
with value zero, we can write the constraint equations as:

If x_{3} were to be the leaving variable
(and hence become zero), we could solve the above equations for x_{2}
and x_{4}, obtaining x_{2} = 8, x_{4} = 8. This
is a feasible solution.

If x_{4} were to be the leaving variable
(and hence become zero), solving the equations for x_{2} and x_{3
}gives
x_{2} = 16, x_{3} = -24. This is an infeasible solution,
since it would require negative amounts of x_{3}. In other words,
as units of x_{2} are added, at the point x_{2} = 8, the
solution variable x_{3} would be driven to zero; this is the first
solution variable driven to zero (x_{4}, the other solution variable,
is still positive at that point), so x_{3} is the leaving variable.

The same result can be obtained using the table and
a more mechanical rule. Divide each amount in the "Solution values" column
by the amount in the comparable row of the entering x_{j} column
using the formula:

For x_{3} row: 24/3 = 8

For x_{4} row: 16/1 = 16

The smallest number obtained by this computation
gives the maximum number of units of x_{2} - 8, which may be injected
into the solution without driving some solution variable negative. If any
of the amounts calculated by dividing are negative, they should be eliminated
from consideration; otherwise, the smallest amount, as computed above,
determines the leaving variable. In this case, the x_{3} row has
the smallest number (8), and x_{3} is the leaving variable.. The
x_{3} row is marked with an arrow :

Note what we have done so far in the simplex procedure.
First, we identified a variable that will increase profitability and indicated
that it is to be included in the next solution. Then, we guaranteed that
the next solution would be a basic feasible one by identifying a variable
to be removed from the solution that will keep all variable values nonnegative.
The following step is to determine the new solution and construct the second
simplex table. In the intersection of the entering variable column and
the leaving variable line lies the pivot element.