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 with two constraints

The three-variable extension \nabla f=\lambda\nabla g+\mu\nabla h, used when two constraint surfaces intersect in a curve.

When two constraints g(x,y,z)=k_1 and h(x,y,z)=k_2 are both imposed, each generically carves out a surface, and two generic surfaces meet along a curve — the one-dimensional constraint set the single-multiplier method was built for. The condition becomes \nabla f=\lambda\nabla g+\mu\nabla h, giving five equations (three component equations plus the two constraints) in the five unknowns x,y,z,\lambda,\mu. The non-parallel gradient hypothesis on \nabla g and \nabla h matters: if the two constraint surfaces are tangent at a point, the argument for why \nabla f must lie in their span breaks down.

Examples

  • Extremizing f(x,y,z)=x+2y+3z subject to x^2+y^2+z^2=1 and x-y=0 gives candidates at (0.408,0.408,0.816) and its negation, the great-circle intersection of a sphere and a plane through the origin.

Read the full section →
Graph settings

Calculator