Graphical Solution of 2-Variable LPs
Solve a linear program in two variables by graphing the feasible region, enumerating its vertices, and evaluating the objective at each vertex to identify the optimum.
Tutorial
The Feasible Region and Its Vertices
A 2-variable linear program (LP) has the form
subject to a list of linear constraints (where each is , , or ), and usually .
Each linear inequality cuts the plane into two half-planes. The feasible region is the intersection of all these half-planes — a convex polygon, possibly bounded, unbounded, or empty.
A vertex (or corner point) of the feasible region is a point where two boundary lines meet and every other constraint is satisfied. The boundary lines come from replacing each or with .
To find every vertex:
- List all boundary lines (including and ).
- Solve each pair of boundary lines for their intersection.
- Discard any intersection that violates some other constraint.
- What survives is the set of vertices.
For instance, with , , , the three boundary lines , , intersect pairwise at , , . All three satisfy every constraint, so the feasible region is the triangle with these vertices.