Linear Programming
Linear Programming (LP) is the optimization of a linear objective function subject to linear equality and inequality constraints. Key result: an LP either is infeasible, is unbounded, or attains its optimum at a vertex (extreme point) of its feasible polyhedron — and this optimum is found efficiently by the simplex method or interior-point methods. Applies to: resource allocation, scheduling, transportation, network flows, game theory, and as a relaxation for integer problems. Who/when: formalized by George Dantzig (simplex method, 1947); foundations by Kantorovich (1939) and von Neumann (duality, 1947).A linear program seeks to maximize or minimize a linear function over a set of decision variables constrained by finitely many linear inequalities and equalities, which together carve out a convex polyhedron. LP matters because it is the simplest nontrivial class of constrained optimization that is both expressive enough to model thousands of real decisions and tractable enough to solve at enormous scale (millions of variables). The surprising fact is duality: every LP has a "shadow" partner LP whose optimal value exactly equals the original's, turning prices and constraints into a perfectly symmetric pair. This makes LP the cornerstone of operations research, the basis for integer-programming relaxations, and a recurring tool across economics, engineering, and machine learning.
The Core Insight
The feasible region of an LP is a convex polyhedron, and a linear objective is constant along directions and increases linearly across the region. Therefore, if an optimum exists, you can always slide to a corner (vertex) without decreasing the objective. The whole theory reduces to: (1) the geometry of polyhedra, and (2) strong duality, which says the best you can achieve equals the tightest bound the constraints can certify against you.
Formal Statement
Linear Program — Standard Forms
A linear program in standard (canonical) inequality form is
An equivalent standard equality form (used by the simplex method) is
Vertex / Extreme Point / Basic Feasible Solution
A point is a vertex (extreme point) if it cannot be written as with both in . Equivalently, in equality form with of rank , a basic feasible solution (BFS) chooses linearly independent columns of (the basis ), sets the other (nonbasic) variables to , and solves
Fundamental Theorem of Linear Programming
For an LP in standard form with feasible region :
- If the objective is bounded on , an optimal solution exists and at least one optimal solution is a vertex of .
- If has at least one vertex (e.g., when ), then the optimum (if finite) is attained at a vertex.
Consequently, optimization over an infinite set reduces to searching the finite set of vertices.
Strong Duality
The primal and its dual
Why It Holds / Derivation
Weak Duality, then the Optimality Gap
Step 1 (Weak duality). Let be primal-feasible () and dual-feasible (). ThenFarkas' Lemma
Exactly one of the following holds for , :
Complementary Slackness
At optimality, and satisfy: from Step 1 the two inequalities in [5] must be equalities. Equality of the second forces
George B. Dantzig | 1914–2005
Dantzig invented the simplex method in 1947 while working for the U.S. Air Force on planning ("programming") logistics — the word "programming" here means scheduling, not coding. He famously, as a graduate student, mistook two open problems written on a blackboard for homework and solved them. Dantzig formalized LP as a discipline, recognized the role of duality (in dialogue with von Neumann), and made large-scale planning computationally feasible. His simplex method remains, decades later, one of the most-used algorithms in the world.
Building Intuition
Picture the feasible region as a cut diamond floating in space, and the objective as a flat sheet you push in the direction . You slide the sheet as far as it can go while still touching the diamond — it will rest against a face, and the last point of contact is a corner. That is why optima live at vertices. The dual is the same picture viewed from outside: each constraint is a wall, and the dual asks for the cheapest combination of wall-pressures that pins down the objective from above. Strong duality says "the corner you reach from inside" and "the cheapest certificate from outside" meet at exactly the same number.
Feasible polyhedron with objective contours; optimum at a vertex
<svg viewBox="0 0 460 340" xmlns="http://www.w3.org/2000/svg">
<rect width="460" height="340" fill="#0a0e17"/>
<!-- axes -->
<line x1="50" y1="300" x2="430" y2="300" stroke="#94a3b8" stroke-width="1.5"/>
<line x1="50" y1="300" x2="50" y2="30" stroke="#94a3b8" stroke-width="1.5"/>
<text x="420" y="318" fill="#e2e8f0" font-size="13">x₁</text>
<text x="28" y="40" fill="#e2e8f0" font-size="13">x₂</text>
<!-- feasible polygon -->
<polygon points="50,300 50,150 130,90 280,140 320,300" fill="#1e293b" stroke="#94a3b8" stroke-width="1.5" opacity="0.85"/>
<text x="150" y="230" fill="#e2e8f0" font-size="13">feasible P</text>
<!-- constraint labels -->
<text x="60" y="120" fill="#94a3b8" font-size="11">a₁·x ≤ b₁</text>
<text x="290" y="200" fill="#94a3b8" font-size="11">a₂·x ≤ b₂</text>
<!-- objective contours (key curve color) -->
<line x1="60" y1="300" x2="200" y2="40" stroke="#d4a853" stroke-width="1.3" stroke-dasharray="5,4"/>
<line x1="130" y1="300" x2="270" y2="40" stroke="#d4a853" stroke-width="1.3" stroke-dasharray="5,4"/>
<line x1="200" y1="300" x2="340" y2="40" stroke="#d4a853" stroke-width="2"/>
<text x="345" y="55" fill="#d4a853" font-size="12">c·x increases →</text>
<!-- optimal vertex -->
<circle cx="280" cy="140" r="6" fill="#d4a853" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="288" y="135" fill="#e2e8f0" font-size="12">optimum x*</text>
</svg>
Worked Examples
Furniture Factory — Maximize Profit
A workshop makes tables () and chairs (). Profit: \20 per chair. Constraints: wood (board-feet), labor (hours), .
LP: s.t. Step 1 — find vertices (intersections of binding constraints):- : profit .
- (wood binds, ): .
- (labor binds, ): .
- Intersection of both: solve .
Diet Problem — Minimize Cost
Meet daily needs of units protein and units vitamin from two foods. Food A: 2 protein, 1 vitamin, \2/kg.
LP: s.t. Step 1 — candidate vertices of the feasible (upper) region:- : protein ✓, vitamin ? No, → infeasible.
- : vitamin ✓, protein ✓; cost .
- : protein ✓, vitamin ✓; cost .
- Intersection of both binding: from 1st ; sub: ; cost .
Common Misconceptions
"The optimum is always unique." False. If the objective vector is parallel to a face of the polyhedron, an entire edge or face of optimal points exists (infinitely many optima). Also, degenerate vertices (more than binding constraints in ) can stall the simplex method and require anti-cycling rules (e.g., Bland's rule). Finally, LP can be unbounded (objective ) or infeasible (empty ); always check these before claiming "no solution at the corners."Geometry breaks for non-vertex search
Consider subject to . The objective is constant () along the entire top edge from to . Searching only interior points or expecting a single corner answer is wrong — every point on that segment, including the midpoint , is optimal. The Fundamental Theorem still holds (at least one optimum is a vertex), but uniqueness fails. Worse, replacing by (strict inequality) makes the supremum unattained — LP theory requires closed feasible sets.
Connections
LP sits at the crossroads of several fields. It is the foundational case of Convex Optimization — every LP is convex, so local optima are global. Its duality generalizes to Lagrangian Duality and is mirrored in the minimax theorem of Game Theory (von Neumann's zero-sum games reduce to a pair of dual LPs). Restricting variables to integers yields Integer Programming, where the LP relaxation provides crucial bounds for branch-and-bound. Network problems — shortest paths, max-flow/min-cut, assignment — are special LPs with totally unimodular matrices guaranteeing integer vertices, linking LP to Combinatorial Optimization and the Max-Flow Min-Cut Theorem. The geometry rests on Convex Polyhedra and separating-hyperplane theorems.
Real-World Applications
- Airline crew & fleet scheduling — assigning crews and aircraft to flights minimizing cost while honoring rest rules (American Airlines' decision-support systems save hundreds of millions annually).
- Petroleum refining & blending — choosing crude mixes and product yields to maximize margin under capacity and quality specs (the original 1950s industrial driver of LP).
- Transportation & logistics — the transportation problem routes goods from warehouses to stores at minimum cost; underlies supply-chain planning at Amazon, UPS, FedEx.
- Diet & agriculture — Stigler's diet problem and modern feed-formulation for livestock minimize cost subject to nutritional requirements.
- Portfolio & finance — linear risk-budget and cash-flow matching models; LP relaxations in index tracking.
- Telecom & power-grid routing — bandwidth allocation, optimal power flow approximations, and capacity planning.
- Machine learning — support-vector-machine variants ( SVM), LP-based robust regression, and optimal transport (a giant LP) for distribution comparison.
Historical Development
- 1827 — Fourier studies systems of linear inequalities (Fourier–Motzkin elimination), an early ancestor of LP feasibility.
- 1939 — Leonid Kantorovich formulates production-planning as linear optimization in the USSR; later shares the 1975 Nobel Prize in Economics.
- 1941 — Frank Hitchcock states the transportation problem in modern form.
- 1947 — George Dantzig invents the simplex method; John von Neumann articulates LP duality and links it to game theory.
- 1947–49 — Tjalling Koopmans develops activity-analysis economics on LP foundations (Nobel 1975 with Kantorovich).
- 1958 — Gomory introduces cutting planes, bridging LP to integer programming.
- 1972 — Klee and Minty construct a polytope on which simplex takes exponential time in the worst case.
- 1979 — Leonid Khachiyan's ellipsoid method proves LP is solvable in polynomial time (first such result).
- 1984 — Narendra Karmarkar's interior-point method delivers polynomial time and practical speed, revolutionizing large-scale LP.