The Geometry of Optimization
Linear programming transforms real-world decision problems into geometric ones. Each constraint defines a half-space, and their intersection forms a convex polytope — the feasible region. The objective function defines a family of parallel hyperplanes; the optimal solution lies where the last hyperplane touches the polytope. This simulation lets you see this geometry unfold in two dimensions as you adjust constraints and objective coefficients.
Corner Points and the Simplex Method
Dantzig's fundamental insight was that optimality always occurs at a vertex. The simplex method exploits this by walking along edges of the polytope, improving the objective at each step. In this 2D visualization, you can see which corner point achieves the maximum and how the optimal vertex shifts as you change the objective direction or constraint boundaries.
Sensitivity and Shadow Prices
Real optimization is rarely a one-shot calculation. Decision-makers need to know: how much does the optimum change if I relax a constraint? The shadow price answers this — it is the marginal value of one additional unit of resource. Tight constraints with high shadow prices are bottlenecks worth investing in. Watch how the optimal value responds as you adjust each constraint limit.
From Textbook to Industry
LP solves problems of staggering scale: airlines schedule crews over millions of variables, oil refineries blend feeds to minimize cost, and logistics networks route shipments across continents. Modern interior-point methods solve problems with millions of variables in seconds. This 2D simulator captures the core geometric intuition behind all of it — the interplay of constraints, objectives, and vertices that defines optimal decisions.