Chapter 0

Understand Linear Programming with Diagrams and Exercises

A course for building intuition about 2-variable linear programming through diagrams, by repeatedly computing intercepts, intersections, objective values, and multiple optima by hand.

Step back and forth between diagrams and short practice problems to build up the ideas of linear programming one layer at a time. Each step — intercepts, feasibility checks, intersections, objective values, multiple optima — is something you compute by hand.

Grading and progress saving all happen inside the browser. No sign-up, no login, no install.

Approx. 3–4 hours 32 questions in total Graded in-browser Saved locally Includes a 2-variable viewer
Concept diagram showing a feasible region, its vertices, and the lines of the objective function overlaid

What makes this course different

Small steps

Short practice problems throughout each chapter

Right after reading the body text, compute intercepts, intersections, and objective values on the spot. Instead of saving everything for the end, you correct misunderstandings as soon as they appear.

Hand calculation

Diagram → hand calculation → code

By linking the diagram, the hand calculation, and the solver in that order, you can follow not just the answer but the reason the optimum comes out where it does.

Review

Mixed review and per-chapter summary

Chapter 7 works through a separate case as a mixed review and lets you check your progress across all chapters in one place.

Only four calculations show up again and again

z = c_x x + c_y y (compute the objective value)
a x + b y \le r (check whether a point satisfies a constraint)
Solve a_1 x + b_1 y = r_1 and a_2 x + b_2 y = r_2 simultaneously to find the intersection
Compare z at every vertex and pick the largest

Before getting into the general theory of the simplex method or duality, the goal is to make sure you can carry out these four steps by hand.

The running example

Throughout the course we use a 2-variable LP for planning how much of product A and product B to make.

ItemContent
Decision variablesx: number of lots of product A, y: number of lots of product B
Objective functionmaximize z = 3x + 5y
Constraint 12x + y ≤ 16 (cutting stage)
Constraint 2x + 2y ≤ 14 (finishing stage)
Non-negativityx ≥ 0, y ≥ 0

Chapter overview

Chapter 5 / 4 questions

Simulator — play with a 2D LP

Slide the coefficients and right-hand sides and watch in the simulator how the optimum switches from one vertex to another.

Tips for studying

  1. Read the body text and then solve the practice problem right below it.
  2. Do not keep intersections and objective values in your head — always write them on paper or in a note before typing them in.
  3. Do both the simulator in Chapter 5 and the mixed review in Chapter 7.
Prerequisites

High-school linear functions and 2-by-2 systems of linear equations are enough. We do not use matrices, a proof of the simplex method, or duality.

Goal of this course

When you see a 2-variable linear program, you should be able to explain which equations are constraints, which points are feasible, and why that particular vertex is optimal, using both diagrams and hand calculation.