Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Lagrange multipliers

A method for constrained extrema using \nabla f=\lambda\nabla g — the tangency of the objective's and constraint's gradients.

The method of Lagrange multipliers finds constrained extrema from the geometric fact that at a constrained extremum, the objective's gradient and the constraint's gradient point along the same line: \nabla f=\lambda\nabla g. In practice this expands to two scalar equations, f_x=\lambda g_x and f_y=\lambda g_y, joined by the constraint g=k itself — three equations in x,y,\lambda. Solving the system produces candidates for the extremum, not guaranteed extrema; comparing f's value across every solution (invoking the multivariable extreme value theorem when the constraint set is closed and bounded) is still the last step.

Examples

  • Maximizing f(x,y)=xy subject to x^2+y^2=8: solving \nabla f=\lambda\nabla g gives candidates (2,2), (-2,-2), (2,-2), (-2,2), with maximum f=4 at (2,2) and (-2,-2).

Read the full section →
Graph settings

Calculator