Math

Linear Programming

Linear programming optimizes a linear objective subject to linear inequalities. The feasible region is a polygon, and an optimum occurs at a vertex.

7 minLevel 3/3The interactive stage stays ad-free.
Objective3x + 2yVertices4Optimum(2.0, 3.0)Max value12.0

The cyan polygon is the feasible region. Amber dashed lines are constraint boundaries. The rose line is an objective level line; pushing it in the improving direction until it leaves the polygon lands on the optimum vertex. The optimum always occurs at a vertex or along an edge.

What you are seeing

1

Each inequality defines a half-plane. Their intersection is the feasible region.

2

The objective c₁x + c₂y is a family of parallel level lines. Moving the line outward increases the objective.

3

The maximum occurs at a vertex or along an edge. The simplex method walks from vertex to vertex.

Why it matters

Linear programming powers logistics, production planning, portfolio optimization, and resource allocation.

Complexity & details

The simplex method is fast in practice but exponential in the worst case. Interior-point methods are polynomial time.

Frequently asked questions

Why does the optimum occur at a vertex?+

A linear function over a convex polygon reaches its maximum on the boundary, and moving along an edge can only improve until a vertex is reached.

What if the feasible region is unbounded?+

The objective may be unbounded, or an optimum may still exist at a finite vertex. The solver must check both cases.