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).
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
A linear program in standard (canonical) inequality form is
Derivation hint: is the cost/profit vector, the constraint matrix, the resource vector; each row is a halfspace. An equivalent standard equality form (used by the simplex method) is
Derivation hint: convert to by adding a slack variable ; maximize minimize .
Symbols: = decision variables; = objective coefficients; = constraint matrix; = right-hand sides; = slack variables. The feasible region is , a convex polyhedron.
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
Derivation hint: partition , ; ; set and invert ; feasibility requires .
For an LP in standard form with feasible region : 1. If the objective is bounded on , an optimal solution exists and at least one optimal solution is a vertex of . 2. 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.
The primal and its dual
satisfy: if either has a finite optimum, so does the other and their optimal values are equal, . Derivation hint: dual variables price each primal constraint; requiring the priced combination to dominate produces an upper bound on ; strong duality says the best bound is tight.
Why It Holds / Derivation
Step 1 (Weak duality). Let be primal-feasible () and dual-feasible (). Then
Derivation hint: first inequality uses and ; second uses and .
Step 2 (Bound). Equation [5] shows every primal value every dual value; hence . The difference is the duality gap.
Step 3 (Strong duality via Farkas / separation). If the primal optimum is finite, the supporting hyperplane at the optimal vertex furnishes a that is dual-feasible and achieves , closing the gap to zero. The existence of follows from Farkas' Lemma, a theorem of the alternative for linear systems.
∎Exactly one of the following holds for , :
Derivation hint: geometrically, either lies in the convex cone generated by columns of , or a separating hyperplane strictly separates from that cone.
At optimality, and satisfy: from Step 1 the two inequalities in [5] must be equalities. Equality of the second forces
Derivation hint: a sum of nonnegative terms equals zero iff each term is zero; each product pairs a primal slack with its dual variable (and vice versa).
Interpretation: if a constraint is slack (), its shadow price ; if a variable is used (), its dual constraint is tight. This couples primal and dual solutions exactly.
∎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.
```svg
```
Worked Examples
A workshop makes tables () and chairs (). Profit: $30 per table, $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 .
From these: multiply 2nd by 2 → ; subtract 1st → , then . Profit .
Step 2 — compare: ; the maximum is at .
Dual check (shadow prices): solving the dual gives per unit; ... recompute correctly: dual binding gives ; ✓ (matches primal).
Meet daily needs of units protein and units vitamin from two foods. Food A: 2 protein, 1 vitamin, $3/kg. Food B: 1 protein, 3 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 .
Step 2 — compare feasible vertices : minimum is .
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."
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
Historical Development
Subtleties & Limits
Is there a strongly polynomial algorithm for LP? Current polynomial methods (ellipsoid, interior-point) run in time depending on the bit-length of the data, not purely on the dimensions . Whether an algorithm exists whose arithmetic-operation count is bounded by a polynomial in and alone — independent of the size of the numbers — is a famous open question (related to Smale's 9th problem). Connected to this is the diameter of polytopes: the Hirsch conjecture (that the graph diameter of a -dimensional polytope with facets is at most ) was disproved by Santos in 2012, yet the true polynomial-diameter question (the polynomial Hirsch conjecture) remains open — and a positive answer could yield a polynomial-pivot simplex variant. Whether simplex with some pivot rule runs in polynomial time is likewise unresolved.
See Also
Simplex Method · Duality Theory · Farkas' Lemma · Convex Polyhedra · Integer Programming · Network Flow Theory · Game Theory · Karmarkar's Algorithm · Total Unimodularity