After a variable enters, the ratio test decides which basic variable must leave. This lesson computes the allowable step lengths exactly. The smallest positive ratio is the one that preserves feasibility.

highlighted = computed this step

Positive ratios

For the x column, the ratios are 2 and 4. Why: the ratio test asks how far x can increase before a slack reaches zero.

ratios 2,4\text{ratios }2,4
Ratio testThe highlighted row is recomputed by the minimum positive ratio.Ratio test2110412014-1-1000xys1s2rhss1s2z

Leaving row

The smaller ratio is 2, so the first slack leaves. Why: choosing the larger ratio would step past a constraint and lose feasibility.

min=2\min=2
Ratio testThe highlighted row is recomputed by the minimum positive ratio.Ratio test2110412014-1-1000xys1s2rhss1s2z

Diagram note

The pivot element is the intersection of the recomputed entering column and leaving row. Pixel positions are rounded for layout; every number shown is exact.

ratio test protects feasibility\text{ratio test protects feasibility}
Ratio testThe highlighted row is recomputed by the minimum positive ratio.Ratio test2110412014-1-1000xys1s2rhss1s2z