In Lagrange Multipliers you maximized a function along a curve by lining up two gradients. The consumer's problem from The Best Affordable Bundle is exactly that: maximize $U(x, y)$ along the budget line. The method gives the same bundle as substitution, plus one more number with a meaning of its own.
🔑 Key idea
Form $\mathcal{L} = U(x, y) - \lambda(p_1x + p_2y - m)$ and set its three partial derivatives to zero: $$MU_x = \lambda p_1, \qquad MU_y = \lambda p_2, \qquad p_1x + p_2y = m.$$ The multiplier $\lambda = \dfrac{MU_x}{p_1} = \dfrac{MU_y}{p_2}$ is the marginal utility of income: the extra utility from one more dollar.
💡 Why it works
At the best bundle the indifference curve and the budget line are tangent, so their normal vectors point the same way: $\nabla U = (MU_x, MU_y)$ is parallel to $(p_1, p_2)$, the gradient of the budget. "Parallel" means one is a multiple of the other: $\nabla U = \lambda(p_1, p_2)$. Dividing the first two conditions gives $MU_x/MU_y = p_1/p_2$, the tangency rule. And $\lambda$ is utility per dollar on either good. If income rises by \$1, spending it on either good adds about $\lambda$ to utility, so $dU^*/dm = \lambda$ (this is the envelope theorem).
At the optimum (20, 10), $\nabla U$ is perpendicular to the indifference curve and $(p_1, p_2) = (2, 4)$ is perpendicular to the budget line; tangency makes them parallel.
✏️ Worked example: Solving with λ
Maximize $U = xy$ subject to $2x + 4y = 80$.
$\mathcal{L} = xy - \lambda(2x + 4y - 80)$.
$\partial\mathcal{L}/\partial x = y - 2\lambda = 0$, so $y = 2\lambda$. $\partial\mathcal{L}/\partial y = x - 4\lambda = 0$, so $x = 4\lambda$.
$x = 10$, $y = 60$. Another \$1 raises utility by about $1/30$.
Answer: $\lambda = 1/30$.
⚠️ Common mistake
Solving the first two conditions and stopping. $MU_x = \lambda p_1$ and $MU_y = \lambda p_2$ are two equations in three unknowns $(x, y, \lambda)$: they only tell you the ratio of $x$ to $y$. The third condition, $\partial\mathcal{L}/\partial\lambda = 0$, is the budget itself, and it pins down the scale. Check: your bundle must cost exactly $m$.
The size of $\lambda$ depends on how utility is scaled (double $U$ and $\lambda$ doubles), so compare $\lambda$s only for the same utility function. The same method works with more goods: one condition per good plus the budget. Nothing later in this course needs it; the substitution method always works too.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.