Of all the models in operations research, one is so well-behaved that we can solve versions with millions of variables to guaranteed optimality: the linear program. Its good manners come entirely from a single word — linear — and this page is about earning that word. Once you can recognise a linear program, cast it into a tidy standard form, and see its feasible region as a shape carved out of space, everything that follows — the geometry, the simplex method, duality — clicks into place.
We will carry one small factory with us for the rest of the course, so it is worth meeting it now: a workshop that makes tables and chairs.
A program (an old word for "optimization problem") is linear when it has three properties together:
Linearity buys two priceless properties. Proportionality: doubling an activity doubles its contribution and its resource use — no economies of scale, no start-up costs. And additivity: activities do not interfere; total profit is just the sum of each activity's profit. These are modelling assumptions, and when they hold, the geometry becomes flat and the problem becomes tractable.
The workshop makes tables (
Everything is linear: profit is proportional to output, hours add up, and half a table is (mathematically) allowed. This is a textbook product-mix linear program — and its optimum, which we will find geometrically on the next page, turns out to be 10 tables and 20 chairs for £1000 profit.
Real problems arrive in every shape — some constraints
Note the equalities. Any inequality can be turned into an equality by introducing a new non-negative
variable that "soaks up" the gap. A slack variable absorbs the unused amount of a
| Original | Add | Becomes | Meaning of the new variable |
|---|---|---|---|
| slack | unused carpentry hours | ||
| slack | unused finishing hours | ||
| surplus | amount above the floor |
So the workshop in standard form is
(A minimisation becomes a maximisation by negating the objective; a free variable is written as the difference of two non-negative variables. With these moves, every LP fits the mould.)
Geometry now enters. Each inequality constraint slices space into two: the points that satisfy it and the points that do not. The satisfying side is a half-space (in two dimensions, a half-plane). The feasible region — the set of all points obeying every constraint at once — is the intersection of all these half-spaces, a flat-sided shape called a convex polyhedron (bounded, a polytope). For the workshop, four inequalities (two resources plus the two non-negativity limits) carve out this quadrilateral:
Every candidate production plan the workshop could actually run is a point in that shaded region; everything outside breaks a rule. The whole task of linear programming is to find the single point in this region that pushes the profit as high as it will go — and, remarkably, we will see that we only ever need to look at the corners.
The name is a historical accident that predates computers as we know them. In the 1940s a "programme" meant a plan or schedule — a programme of activities, in the military-logistics sense George Dantzig worked in. "Linear programming" therefore meant "planning with linear relationships," not "writing linear code." By the time software took over the word, the name had stuck. So an LP is a plan we optimise, and the coincidence that we now solve it by programming a computer is just that — a coincidence.
Linearity is fragile. A single product of variables (