The Lagrange multiplier: interactive figures

Companion to the notes page. Story credit: youtube.com/watch?v=54EP7DSVWPE.

1. The best point on a trail

summit orange: ∇F, steepest uphill purple: direction you walk distance along the trail your height highest on trail
What the trail is doing to your heightclimbing

Left: contour map (every point on one ellipse has the same height) with the trail passing beside the summit. Right: your height as you walk.

3. The map picture: the trail must touch a contour

Same trail, three moments. The orange contour is the one through the hiker. Only at the peak does the trail touch it without crossing.

5. A first concrete example: nearest point on a line

∇F: straight away from origin ∇G: perpendicular to the line
Angle between the arrows0°
Squared distance here0
Best on this line0

6. The fence by the river, and what λ really means

40 m
13 m
river (needs no fence) best: river side twice the others even split side along the river area
Area of this shape0
Best area for this fence0
One more meter adds0
Multiplier λ at the best shape0

The last two cards agree: λ is what one more meter of fence is worth. The gain is a hair above λ because λ is the instantaneous rate and a full meter is a finite step on a curve that still bends upward.

8. Maximum entropy: a box of gas, or a die

3.5
uniform: no constraint
Multiplier λ (price of the average)0
Entropy0

9. θ and η: two addresses for the same distribution

0.4
4.0
θ: multiplier / natural coordinate η: expected value orange line: slope = variance the same distribution
Variance of the roll (slope)0