How Linear Programming and Mathematical Optimization Work | Objectives, Constraints, Feasible Regions, Duality and Better Decisions

A system has six hours of specialist time, eight hours of general time and two useful jobs competing for both. “Do more of the valuable job” sounds sensible until that job consumes the bottleneck that makes everything else possible.

Mathematical optimization turns a choice problem into decision variables, an objective and constraints, then searches the feasible choices for the one that best satisfies the stated objective. Linear programming is the special case in which the objective and constraints are linear. The mathematics can be exact while the real decision remains poor if the objective is wrong, the constraints omit reality or the data no longer describe the system.

This article owns the optimisation model itself. Models and Simulations owns general representation and validation. Strategic Decision-Making owns the wider act of organisational choice. Logistics, scheduling and project articles own their domain-specific operations. Here we focus on the mathematical grammar that lets many of those domains express scarcity, trade-offs and best feasible choices.

All worked quantities below are fictional teaching examples. They are not staffing instructions, financial recommendations or eduKate operational data.

Reading route: start with the four-part optimization model, solve a complete two-variable linear programme, then examine duality, integer decisions, nonlinear and constraint programming, and the route back to reality.

1. Every optimisation problem begins with a decision, not a solver

An optimisation model normally contains four core pieces:

The solver does not know what the variables mean. It only receives mathematics. Meaning comes from the modelling choices made before the solve.

2. Decision variables define what the system is allowed to choose

Suppose a fictional library is deciding how many units of two service packages to prepare for a learning event. Let x represent Package A and y represent Package B.

Those variables could be continuous if fractional amounts make sense, integer if only whole packages exist, or binary if the real question is whether to activate each package at all. Variable type is not a technical afterthought. It changes the set of feasible decisions.

3. The objective tells the model what “better” means

Assume Package A contributes three benefit points per unit and Package B contributes two. A linear objective might be:

Maximise z = 3x + 2y.

The coefficients are doing normative work. They say one additional unit of A is worth three points and one unit of B is worth two, throughout the modelled range. If those numbers are poorly justified, the optimiser will optimise a poor value system with impressive efficiency.

4. Constraints define the feasible world

Suppose A uses one hour of a specialist resource and two hours of a general resource. B uses two specialist hours and one general hour. The event has six specialist hours and eight general hours available.

The capacity constraints are:

x + 2y ≤ 6   specialist hours
2x + y ≤ 8   general hours
x ≥ 0
y ≥ 0

Every point satisfying all four inequalities is feasible. Everything else is unavailable under the model, regardless of how attractive its objective value would be.

5. A complete two-variable linear programme

We now solve the constructed problem:

MAXIMISE  3x + 2y
SUBJECT TO
x + 2y ≤ 6
2x + y ≤ 8
x,y ≥ 0

With two variables, the feasible region can be inspected geometrically. Candidate corner points are (0,0), (4,0), (0,3) and the intersection of the two binding resource lines.

Solving x + 2y = 6 and 2x + y = 8 gives y = 4/3 and x = 10/3. The objective at that point is 3(10/3) + 2(4/3) = 10 + 8/3 = 38/3, approximately 12.67.

Corner-point check for the fictional LP
PointObjective 3x+2y
(0,0)0
(4,0)12
(0,3)6
(10/3, 4/3)38/3 ≈ 12.67

The continuous linear programme therefore prefers the intersection. If whole packages are required, that solution is not implementable. The model class must then change.

6. Why an optimum often occurs at a corner

For a bounded linear programme with a polyhedral feasible region, a linear objective reaches an optimum at an extreme point whenever an optimum exists. This is one reason corner-point reasoning works in small examples and why simplex-type methods can navigate between basic feasible solutions.

Do not confuse this geometric property with a universal rule that real decisions should be extreme. It is a property of a particular mathematical structure.

7. Binding constraints identify what is currently scarce

At x=10/3 and y=4/3, both resource constraints hold with equality. All six specialist hours and all eight general hours are used. Both constraints are binding.

A non-binding constraint has slack. If the model allowed ten general hours but the optimum used only eight, the general resource would have two hours of slack at that solution.

This is a precise model statement, not proof that the real organisation has no other bottleneck. A missing constraint cannot bind because the model does not know it exists.

8. Slack is not waste by definition

Unused capacity can be resilience, safety margin, flexibility or simply irrelevant to the current objective. Optimisation language can tempt managers to treat every slack resource as inefficiency.

Before removing slack, ask why it exists. A spare hour in a timetable may absorb disruption. Safety stock may protect service continuity. A system optimised to eliminate all slack can become fragile.

9. Feasible does not mean desirable

Every feasible point satisfies the constraints. Many feasible points may still be poor choices. The objective ranks them.

Likewise, optimal does not mean morally permissible or operationally sensible. If a rights, safety or quality condition matters, it must enter as a constraint, an objective term or an external admissibility rule before the optimiser is allowed to compare options.

10. Infeasibility is often valuable information

An infeasible model has no choice satisfying every stated constraint. That can signal a modelling mistake, but it can also reveal a genuine impossibility: the required service level cannot be achieved with the stated resources and rules.

Do not “repair” infeasibility by quietly deleting the most inconvenient requirement. Diagnose which constraints conflict and decide which conditions are truly flexible.

11. Unboundedness means the objective can improve without limit inside the model

If a maximisation model is unbounded, the objective can increase indefinitely while remaining feasible. In real applications this often indicates a missing capacity, demand, budget or physical constraint.

Sometimes the real system genuinely has no relevant bound over the range of interest, but unlimited output is usually a reason to inspect the model before celebrating.

12. Degeneracy and multiple optima reveal structure, not failure

Several feasible solutions can share the same optimal objective value. That is an opportunity: the decision-maker may choose among them using secondary criteria such as simplicity, resilience, fairness or implementation ease.

A unique mathematical optimum is not always desirable. A flat region of near-equal solutions can provide useful operational flexibility.

13. Duality asks what scarce resources are worth at the margin

Every linear programme has a related dual problem. In a resource-allocation interpretation, dual variables can often be read as marginal values associated with relaxing constraints, within a range where the local sensitivity interpretation remains valid.

In our fictional model, adding one unit of a binding resource may improve the objective. The associated shadow price describes the local rate of improvement predicted by the LP, not a universal market price for the resource.

14. Solve the shadow prices in the worked example

Let a be the dual value for the specialist constraint and b for the general constraint. Because both primal variables are positive at the optimum, the corresponding dual inequalities bind in this simple case:

a + 2b = 3
2a + b = 2

Solving gives a = 1/3 and b = 4/3. The model therefore assigns a larger local marginal objective value to an extra general-resource hour than to an extra specialist-resource hour at this exact optimum.

This result may look surprising because the labels “specialist” and “general” tempt us to assume the specialist resource is more valuable. The optimisation value comes from scarcity and substitution in the model, not prestige in the name.

15. Shadow prices have validity ranges

A shadow price is usually local. If capacity changes enough, a different constraint may become binding and the marginal value can change.

Do not multiply one shadow price by an enormous expansion and assume the linear estimate remains valid. Re-solve the model after material changes.

16. Reduced cost explains why a currently unused activity stays out

In larger linear programmes, some decision variables sit at zero in the optimum. Reduced cost measures how much the objective coefficient would need to improve, under the relevant convention, before introducing that variable becomes attractive at the current basis.

The concept is useful because “not selected” is not the same as “worthless”. An activity can be valuable but still lose against scarcer resources and stronger alternatives.

17. Sensitivity analysis turns one optimum into a map

A single optimal solution answers one model at one parameter setting. Decision-makers need to know what happens if benefit coefficients, capacities or requirements change.

Vary the uncertain inputs and observe whether the solution structure, binding constraints or objective ranking changes. The general methodology belongs to Sensitivity Analysis and Robustness Checks.

18. Robust optimisation protects against specified uncertainty sets

If parameters are uncertain, robust optimisation can require a solution to remain feasible or perform acceptably across a specified uncertainty set. This is different from pretending the worst imaginable world is equally relevant.

The uncertainty set is itself a modelling choice. Too narrow and the solution remains fragile. Too broad and the model can become excessively conservative.

19. Stochastic optimisation uses probability distributions over uncertain quantities

When defensible probability models exist, stochastic optimisation can represent future demand, prices, failures or arrivals as random variables. Decisions may be separated into stages so later actions adapt after uncertainty is partially revealed.

This joins optimisation to decision theory: choose now, observe later, then take recourse actions contingent on what happens.

20. Integer programming changes the geometry of the problem

If x and y in the worked example must be whole numbers, the continuous optimum is not feasible. Testing nearby integer points gives:

Selected feasible whole-package solutions
xyObjective
4012
3111
2210
036

The integer optimum among these feasible candidates is (4,0) with value 12. The continuous relaxation’s 12.67 is an upper bound for this maximisation problem, but it is not an implementable package plan.

21. Binary variables can represent yes-or-no structure

A binary variable can encode whether a site opens, a project starts, a route is used or an assignment is made. Once binary decisions enter, models can express fixed costs, logical dependencies and mutually exclusive choices.

This is one reason mixed-integer programming is so widely used in scheduling, facility location and planning.

22. Branch-and-bound avoids checking every integer combination directly

Integer programmes can have enormous discrete search spaces. Branch-and-bound methods solve relaxations to create bounds, divide the search space and prune regions that cannot beat the best known feasible solution.

Modern solvers add cutting planes, heuristics and sophisticated presolve. The key conceptual point is that the solver proves or narrows optimality using mathematical bounds rather than blindly enumerating every possibility.

23. Google OR-Tools shows how several optimisation families coexist

Current Google OR-Tools documentation presents solvers for linear and mixed-integer programming, constraint programming, routing, flows and assignment. Its structure is useful pedagogically: optimisation is not one algorithm but a family of problem representations and solution methods.

The mixed-integer optimisation documentation distinguishes continuous LP structure from integer and Boolean decisions, while MathOpt provides a solver-independent modelling interface for several mathematical optimisation forms.

24. Nonlinear optimisation appears when relationships curve

Not every objective or constraint is linear. Congestion can rise nonlinearly with utilisation. Physical relationships may contain products, powers or ratios. Risk penalties may depend on variance. Learning returns may saturate.

MIT OpenCourseWare’s Nonlinear Optimization course, taught in Spring 2025, covers unconstrained and constrained methods including gradient, Newton, projection, interior-point and Lagrange-multiplier approaches.

A nonlinear model can represent richer behaviour but may introduce local optima, non-convex feasible regions and harder verification.

25. Convexity is one of optimisation’s great structural gifts

In a convex optimisation problem, local and global structure align in powerful ways. Broadly, convex objectives and feasible sets allow methods with strong guarantees that are unavailable in arbitrary non-convex problems.

This is why modellers often ask whether a problem can be transformed into a convex form. The transformation must preserve the decision meaning, not merely make the mathematics convenient.

26. Constraint programming is often better for logical structure

Some problems are dominated by logical, scheduling or combinatorial rules: one class cannot occupy two rooms at once; one task must precede another; an employee cannot work two shifts simultaneously; a route must visit required stops.

Constraint-programming and SAT-based methods can be more natural than forcing every rule into a conventional linear model. Solver choice should follow structure rather than fashion.

27. Network flow is a specialised optimisation structure

When goods, vehicles, information or capacity move through a network, specialised shortest-path, maximum-flow and minimum-cost-flow algorithms can exploit graph structure. These can be much more efficient than treating every problem as a generic mixed-integer programme.

The separate Network Science and Graph Analysis article owns structural network interpretation. Optimisation on networks focuses on choosing routes, flows or allocations subject to graph constraints.

28. Scheduling optimisation is not the same as calendar filling

A schedule must satisfy precedence, capacity, duration, resource and timing rules while serving an objective such as makespan, lateness, throughput or fairness. Different objectives can produce very different schedules from the same tasks.

This is why the optimisation objective must be stated before describing a schedule as “best”.

29. Multi-objective optimisation produces trade-off frontiers

Suppose an institution wants low cost and high resilience. There may be no single solution that is best on both. A Pareto frontier contains solutions for which improving one objective requires worsening another.

The optimiser can reveal the trade-off frontier. It cannot decide society’s preferred point on that frontier without additional value judgement.

30. Lexicographic objectives protect priorities

Sometimes objectives have a strict hierarchy. First minimise safety violations; among equally safe solutions minimise cost; among equally costly solutions minimise travel.

Lexicographic optimisation preserves this priority structure rather than allowing a large improvement in a lower-priority metric to compensate for a small loss in a higher-priority one.

31. Penalty functions can hide inadmissible trade-offs

Adding a penalty to the objective is convenient, but a finite penalty means the model is willing to violate the penalised condition if enough benefit appears elsewhere.

If a condition is truly non-negotiable, encode it as a hard constraint or admissibility rule instead of hoping a penalty coefficient will remain large enough in every scenario.

32. Data uncertainty can move the optimum

Optimisation often sharpens the consequences of data errors because the solver actively searches for the best region of the model. If one coefficient is slightly wrong, the optimum can jump to a different corner.

This makes data provenance and validation especially important. Link back to Data Quality and Metadata and Data Lineage whenever optimisation depends on operational records.

33. Optimisers can exploit modelling loopholes

A human planner may avoid absurd solutions because common sense supplies hidden constraints. An optimiser has no such restraint. If the model rewards a loophole, the solver may exploit it perfectly.

An apparently brilliant solution can therefore be a diagnostic: what unrealistic assumption or missing boundary allowed the objective to rise so sharply?

34. Near-optimal solutions may be operationally superior

If the mathematical optimum scores 100 and a much simpler solution scores 99.8, the simpler option may be better in the world because it is easier to explain, implement, monitor and recover.

Report the optimality gap and the reasons for choosing a near-optimal solution rather than pretending the operational choice is mathematically optimal.

35. Solver status is part of the result

A solver may return optimal, feasible but not proven optimal, infeasible, unbounded, interrupted or numerically uncertain. These states are not interchangeable.

“The software returned a solution” is not enough. Preserve the solver, version, tolerance, status, run configuration and relevant logs when the decision is consequential.

36. Numerical tolerances mean equality is rarely metaphysical equality

Floating-point solvers use tolerances. A constraint intended as x ≤ 10 may be satisfied within a small numerical tolerance rather than symbolic exactness.

For ordinary planning this may be negligible. For safety-critical or discrete interfaces, rounding and tolerance behaviour must be checked against the real requirement.

37. Verification asks whether the optimisation model was implemented correctly

Recalculate simple cases by hand. Check units. Test known feasible and infeasible points. Confirm integer restrictions. Compare solver results across methods when practical.

A model can be conceptually sensible and computationally wrong. Verification addresses implementation.

38. Validation asks whether the optimisation problem is the real problem

After solving, ask whether the objective corresponds to the real goal, whether constraints capture the operating environment and whether the recommended action works when exposed to actual behaviour.

The optimiser solves the problem you wrote. Validation asks whether that was the problem you meant.

39. Post-deployment monitoring closes the loop

Demand changes. Processing times drift. Staff learn. Policies alter incentives. A solution optimal last month can become poor even if the solver is still functioning perfectly.

Define refresh triggers, compare predicted with realised constraints and record whether the model’s binding resources remain binding in the world.

40. An optimisation audit should work backward from the recommendation

RECOMMENDED ACTION
→ SOLVER STATUS
→ OBJECTIVE VALUE
→ DECISION VARIABLES
→ ACTIVE CONSTRAINTS
→ MODEL VERSION
→ PARAMETER VALUES
→ DATA SOURCES
→ OBJECTIVE AND POLICY ASSUMPTIONS
→ REAL-WORLD DECISION

If the route cannot be reconstructed, the solution may be numerically impressive but weak as accountable evidence.

41. A practical optimisation checklist

  1. What decision is being made?
  2. What are the variables and their units?
  3. Which variables are continuous, integer or binary?
  4. What exactly is being maximised or minimised?
  5. Which requirements are hard constraints?
  6. Which preferences are tradeable objectives?
  7. What data populate the coefficients?
  8. Which constraints are binding?
  9. Where is there slack and why?
  10. Is the model feasible and bounded?
  11. How sensitive is the solution to uncertain coefficients?
  12. What does the dual reveal about marginal scarcity?
  13. Do shadow prices remain valid over the proposed change?
  14. Would another model family fit the structure better?
  15. What is the solver status and optimality gap?
  16. Can a simpler near-optimal solution be safer?
  17. How will the recommendation be validated in the world?
  18. What change should trigger re-optimisation?

42. The deeper lesson: optimisation is disciplined scarcity

Optimization is often described as finding the best solution. The deeper idea is more useful: identify what can be chosen, what cannot be violated, what is scarce and what “better” means, then expose the consequences of those assumptions.

The optimiser is not a substitute for judgement. It is a machine that makes judgement legible enough to test.

Sources and further reading

This article is an explanatory synthesis with original worked examples. Source documentation was checked for this edition on 5 September 2026.

Continue through eduKate: read Models and Simulations for model credibility, Sensitivity Analysis and Robustness Checks for parameter fragility, Strategic Decision-Making for the organisational choice layer, and Monte Carlo and Simulation-Based Inference for simulation-based numerical reasoning. Return to the Research Collections Directory for the wider route.

Explore the connected learning guides

Choose the question that brought you here. Open one useful guide, try a small task, and stop when you have what you need.

Take one question further

The same learning habit can travel across subjects, while each subject keeps its own methods. These routes help you notice a difficulty, understand one part of it, and return to something you can do.

A word is familiar, but using it is difficult.

Move from recognising a word to retrieving it in a new context. Understand vocabulary plateaus.

Try it without the guide: Choose one word you already know. Close the guide and use it in a new sentence. Explain why it fits; try another context tomorrow.

A piece of writing has ideas, but the reader loses the thread.

Make the order of events and the links between sentences clear. Explore composition writing.

Try it without the guide: Choose one short paragraph. Read the relevant explanation, close it, and revise the paragraph. Ask someone to tell you what happened and why.

The Mathematics seems familiar, but marks still disappear.

Find the first point where the working stops being reliable. Find Secondary 4 A-Math mark leakage.

Try it without the guide: For a Secondary 4 A-Math question you have attempted, locate the first uncertain line. Repair that step, then try a comparable question without the worked answer.

A Science fact is remembered, but the explanation is incomplete.

Connect the evidence to a scientific idea and the resulting change. Follow the Primary Science learning route.

Try it without the guide: Choose a familiar Primary Science example. Explain the evidence, the idea and the result without notes. Then change one condition and explain your prediction.

Two accounts of the world seem to disagree.

Check the question, source, date and evidence before combining claims. Explore the World Knowledge research library.

Try it without the guide: Take one claim. Find the source best placed to support it, note its date, and state what remains uncertain. Return to your original question.

There is plenty of help, but independence is hard to see.

Check what the learner can understand and do after support is removed. Understand how education works.

Try it without the guide: Choose one small task the child has practised. Agree on a calm, brief attempt without prompts. Use what happens to choose one next step, then stop.

For the structure behind these connections, read the eduKateSingapore runtime manifest and the eduKate ecosystem boot contract. The reader map describes public navigation; those manifests preserve the wider ownership and return rules.

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading