4.10.21 · D1Advanced Topics (Elite Level)

Foundations — Linear programming — simplex method (intro)

1,917 words9 min readBack to topic

This page assumes you have seen none of the notation in the parent note. We build every letter, arrow, and squiggle from the ground up, in an order where each one leans only on the ones before it. Nothing is used before it is drawn.


0. The vocabulary of "many" — subscripts and

Before any equation, we need a way to name several unknowns at once.

Picture two dials on a machine. Turning dial 1 sets ; turning dial 2 sets . The subscript is the sticker on the dial.

Why the topic needs it. A real problem ("how many chairs and tables to build?") has many quantities to decide. Subscripts let us talk about all of them with one letter and a number.


1. Points and the plane — where a solution "lives"

Figure — Linear programming — simplex method (intro)

Look at the figure: the horizontal line is the -axis, the vertical line is the -axis. The dot at means "3 steps right, 2 steps up". Every possible choice of "how many chairs, how many tables" is one dot somewhere on this map.

Why the topic needs it. A decision (make 3 chairs, 2 tables) is exactly one point. Searching for the best decision means searching this map.

In the figure that region is shaded: only the top-right quarter is allowed.


2. Straight-line fences — linear inequalities

Now we fence off the map.

Figure — Linear programming — simplex method (intro)

In the figure the line is drawn in magenta; the kept side () is shaded. A point like gives ✓ (inside). A point like gives , which is more than 4, so it is outside.

Why "linear"? Every constraint here is a straight line, never a curve. "Linear" literally means line-shaped. Straight fences are what make the whole method work — a curved fence would ruin the corner trick.


3. Stacking fences — the feasible region

Figure — Linear programming — simplex method (intro)

Look at the shape in the figure: two slanted fences plus the two axes cut out a many-sided flat shape. That shape is called a convex polytope (in 2D, a polygon).

Why the topic needs it. Every valid decision is a point in this region. The whole search happens inside this shape, and — the punchline — the best answer will sit at one of its corners. See Convex Sets and Polytopes for why convex shapes have this friendly property.


4. The tilted floor — the objective function

We have a fenced field. Now we tilt the floor.

Figure — Linear programming — simplex method (intro)

The figure shows the feasible region with dashed lines of equal height (points where is the same value). These are level sets. As you slide the dashed line in the "uphill" direction (arrow), the last point of the region it touches is a corner — here with . See Gradient and Level Sets for the geometry of that uphill arrow.


5. The shorthand: vectors, , and

Writing every time is tiring. Mathematicians pack lists into vectors.

Why the topic needs it. With one letter each, the entire problem becomes "maximize subject to , " — the standard form the parent note uses.


6. Turning fences into equations — slack variables

The simplex machine wants equalities, not . Here is the trick.

Why the topic needs it. Equations can be solved by the tidy row-reducing machinery of Gaussian Elimination. Inequalities cannot be "solved" the same way — so we convert them and let each corner correspond to setting some variables to .


Prerequisite map

Subscripts x1 x2

Points in the plane

Non-negativity first quadrant

Straight line and half-plane

Linear inequality

Feasible region

Convex polytope and vertices

Vectors and dot product

Standard form c x and A x le b

Objective as tilted floor

Slack variables and equations

Simplex method


Equipment checklist

I can say what and mean and why the subscript is not a power
They are labels for the first and second decision variables; is "variable two", not " squared".
I can plot a point and name the two axes
3 right on the -axis, 2 up on the -axis.
I can explain what does to the map
It restricts us to the first quadrant (top-right quarter).
I can turn into a shaded half-plane
Draw the line ; keep the side where the sum is 4 or less.
I can describe the feasible region
The overlap of all half-planes and the first quadrant — a convex polytope.
I can say what "convex" and "vertex" mean
Convex = no dents (any chord stays inside); a vertex is a corner where fences cross.
I can read and expand it
It is the dot product , the objective .
I can unpack into inequalities
Each row of with the matching entry of gives one fence.
I can explain why we add slack variables
To turn into so we can solve with row reduction; slack measures unused resource.
I can state the core idea in one sentence
A linear (ramp) objective over a straight-edged convex region attains its maximum at a corner.

Connections

  • Yeh note Hinglish mein →
  • Convex Sets and Polytopes — why the feasible region has flat sides and corners.
  • Gaussian Elimination — the row-reduction engine behind pivoting.
  • Gradient and Level Sets — the uphill arrow and equal-height lines of §4.
  • Duality in Linear Programming — the partner problem, once you're fluent here.
  • Optimization (Lagrange Multipliers) — the curved-constraint cousin.
  • Integer Programming — what changes when variables must be whole numbers.