Lagrange Multipliers

Last Updated : 20 Sep, 2025

Lagrange multipliers (or Lagrange’s method of multipliers) is a strategy in calculus for finding the maximum or minimum of a function when there are one or more constraints.

  • The primary idea behind this is to transform a constrained problem into a form so that the derivative test of an unconstrained problem can be solved.
  • It is widely applied in fields like economics, engineering, and physics, and remains a fundamental tool for solving constrained optimization problems efficiently.

Lagrange multipliers are extra variables that help turn a problem with constraints into a simple problem without constraints. This makes it easier to find the maximum or minimum value of a function while still considering the restrictions.

The Lagrange Function

The Lagrange function, also known as the Lagrangian, is a method used when we want to maximize or minimize an objective function subject to one or more constraints. It allows us to incorporate the constraints directly into the optimization process using a Lagrange multiplier.

If we have an objective function f(x, y, z, ...) and constraints g(x, y, z, ...) = 0 , the lagrangian is defined as:

L(x, y, z, …, λ) = f(x, y, z, …) + λ⋅g(x, y, z,…)

where,

  • f(x, y, z, …) is the objective function we are optimizing,
  • g(x, y, z, …) = 0 is the constraint we must satisfy,
  • λ is the Lagrange multiplier, which helps adjust the optimization to respect the constraint.

Solving With Lagrange Multipliers

To begin solving with Lagrange multipliers, we first construct the Lagrangian, which combines the objective function with the constraints using multipliers.

Construction of Lagrangian

A constrained optimization problem may be solved by defining a Lagrangian that takes into account the constraint or constraints in the objective function. When there are several constraints, additional Lagrange multipliers will be introduced, in which case the Lagrangian will take the form:

L(x, y, z, …, λ1, λ2, …) = f(x,y,z,…) + λ1⋅g1(x, y, z, …) + λ2⋅g2(x,y,z, …)

The Lagrange Multiplier Equations

Next, obtain partial derivatives of the Lagrangian in all variables, including the Lagrange multipliers, and equate them to zero. To do so will yield a system of equations, known as the Lagrange multiplier equations, which are solved simultaneously for an optimal solution.

To find the optimal solution, you solve the system of equations derived by setting the partial derivatives of the Lagrangian with respect to all variables and Lagrange multipliers equal to zero:

∂L / ∂x = 0 ; ∂L / ∂y= 0 ; ∂L / ∂λ1 = 0; ∂L / ∂λ2 = 0; ....................

These equations ensure that the solution satisfies both the objective function's optimization and the constraints.

Geometric Interpretation of Lagrange Multipliers

Geometrically, this technique of Lagrange multipliers can be seen as the requirement that the gradient of the objective function should be parallel to the gradient of the constraint function(s). That is, at an optimum point, the steepest-ascent or descent direction of the objective function will point in a direction wherein the constraint function doesn't vary. This guarantees avoidance of violations of the constraints while optimizing an objective function.

Example:

Consider a simple case of maximizing a function 𝑓(𝑥, 𝑦) subject to a constraint g(x, y) = 0. Let’s say the objective function is 𝑓(𝑥, 𝑦) = 𝑥2 + 𝑦2, which represents the equation of a circle, and the constraint is g(x,y) = x + y − 1 = 0, which represents a straight line.

The gradient of f(x, y) is ∇f = (2x, 2y),

The gradient of g(x, y) is ∇g = (1, 1).

At the optimal point, the gradients of f and g must be parallel, meaning:

∇f = λ∇g

This implies that the steepest change in f(x, y) happens along the direction of the constraint, ensuring that the optimization follows the constraint x+y=1.

Lagrange Multipliers Application

The Lagrange multipliers have a lot of applications in most disciplines involved.

  1. Economics: The Lagrangian multipliers are applied to optimize functions of utility or profit, with restrictions on the resources available or the expenses to expend.
  2. Physics: Serves the purpose of solving fundamental problems, such as the minimization of energy in a system while respecting the conservation laws.
  3. Engineering: The department is used primarily in design optimization, where engineers are supposed to optimize a design performance subject to physical or material constraints.

Solved Examples on Lagrange Multipliers

Example 1: Find the maximum and minimum values of f(x, y, z) = 3x2+ y subject to the constraint,

4x - 3y = 9
and x2 + z2 = 9

This example has been deliberately taken to teach you what to do in case of more than one constraint functions. In such cases assume as many arbitrary constants as the number of constraint functions and write the equation in the form:

∇f(x, y, z) = c1∇g(x, y, z) + c2∇h(x, y, z) + c3∇p(x, y, z) ... ...

where ci for i=1, 2, 3... are just real numbers and g, h, p are constraint functions. Now if you get more than one triplet, figure out which one represents a maximum and which one represents the minimum by satisfying it in the function to be optimized and compare the values.In this question the answer would be:

Maximum for (-2/√13, 3/√13, -2 - 7/√13) and
Minimum for (2/√13, -3/√13, -2 + 7/√13)

Example 2: Find the point on the plane 4x + 5y + z = 11 that is nearest to the point (2, 0, 1)

Solution:

Let the point on the plane be (x, y, z). The distance function to minimize is D(x, y, z) = (x − 2)2 +y2 + (z − 1)2. The constraint function is g(x, y, z) = 4x + 5y + z − 11 = 0. Using the method of Lagrange multipliers, we solve for x, y, z, and the multiplier λ. The point that minimizes the distance is found to be (8/3, 1/3, 1).

Example 3: Find the dimensions of the closed rectangular box with maximum volume that can be inscribed in a unit sphere.

Solution:

Let the dimensions of the box be x, y, and z. The volume of the box is V=8xyz, and the constraint is x2 +y2 +z2 = 1. Applying the Lagrange multiplier method, the critical points are calculated, leading to the dimensions that maximize the volume.

Practice Problems on Lagrange Multiplier

Problem 1: Maximize the function f(x, y) = x2 + y2 subject to the constraint x2 −y2 = 1.

Problem 2: Find the points on the surface x2 +y2 +z2 = 9 that are closest to the point (1, 1, 1).

Problem 3: Minimize the function f(x, y, z) = x + 2y + 3z subject to the constraint x2 + y2 + z2 = 1.

Comment