How it’s calculated
A two-variable linear program asks for the largest or smallest value of an objective z = ax + by over the feasible region: the points (x, y) that satisfy every constraint. Each constraint is a half-plane (≤ or ≥) or a line (=), so the region is a polygon, possibly with open sides. The corner point principle says that if an optimum exists, it occurs at a corner (vertex) of the region.
If no intersection point satisfies all the constraints, the problem is infeasible. An open region is not a problem on its own: a minimization over a region that stretches up and to the right usually still has a best corner. The problem is unbounded only if there is a direction you can travel forever without breaking a constraint and in which z keeps improving. The calculator tests exactly that: it checks z's own direction and the direction of every constraint line (the only candidates for the best escape route) and reports the direction it finds. When two corners tie, every point on the edge between them is optimal too. If every constraint line is parallel (possible only when x and y may be negative), the region has no corners at all; the calculator then compares the parallel lines directly and, when an optimum exists, it is reached along a whole line.
Example: maximize z = 40x + 30y subject to x + y ≤ 12, 2x + y ≤ 16, x ≥ 0 and y ≥ 0. The corners are (0, 0), (0, 12), (4, 8) and (8, 0), where z is 0, 360, 400 and 320. The maximum is z = 400 at (4, 8). The point (4, 8) comes from solving x + y = 12 and 2x + y = 16 together: subtracting gives x = 4, so y = 8.
Frequently asked questions
How do I type a constraint like 3x + 2y ≥ 18?
Type the two coefficients, the sign and the right-hand side: 3 2 >= 18. For y ≤ 5 type 0 1 <= 5, and for x − y = 2 type 1 -1 = 2.
What does “infeasible” mean?
The constraints contradict each other, for example x + y ≤ 4 together with x + y ≥ 10. No point satisfies them all, so there is nothing to maximize or minimize.
Why does an unbounded region still give an answer?
Being unbounded only means the region goes on forever in some direction. If z gets worse in every such direction (as when you minimize cost and the region extends up and to the right), the best value is still at a corner.
Why does the optimum always occur at a corner?
z = ax + by changes at a constant rate along any straight line. Along an edge of the region it either rises, falls or stays the same, so the best value on that edge is at one of its ends, which are corners.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Applied Finite Mathematics (Sekhon and Bloom), §3.1 Maximization Applications (corner point principle) — LibreTexts Mathematics
- Applied Finite Mathematics (Sekhon and Bloom), §3.2 Minimization Applications (unbounded feasible regions) — LibreTexts Mathematics
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator