Lagrange Multipliers Method & Examples

Instructor: Gerald Lemay

Gerald has taught engineering, math and science and has a doctorate in electrical engineering.

Finding extreme values like minimum distance and maximum area with calculus is fun. This lesson explores the Lagrange multiplier method which extends the calculus approach even further.

Lagrange Multiplier Method

Your friend grows and sells blue hibiscus plants. He knows the cost relationship of two plant cultivation methods. How many plants should he grow using each method to meet an order request and minimize cost?

Hibiscus plant.
Hibiscus plant.

This question is similar to minimum and maximum problems in calculus, but we have more information that can be expressed as equations. The Lagrange multiplier method uses these equations and a proportionality constant to solve these types of minimum and maximum problems.

The Method

Returning to the hibiscus, let's see how we use the Lagrange multiplier method to minimize cost. Let's say the ordered amount is 300 plants. We grow x plants using one method and y plants with the other. The constraint equation is g = x + y = 300. An equation with two equal signs is a convenient way to write three forms of the same equation. We can have g = x + y, g = 300 and x + y = 300.

The suggested cost relationship is C = x^2 + 2y^2. This is called the objective equation. A good name: the objective is to find the x and y which minimize C. There are many factors impacting the objective equation. All of the factors like price of seeds, delivery charges, amount of fertilizer, … are lumped into the C = x^2 + 2y^2 equation.

So far, we have two equations: a constraint equation g and an objective equation C:

2 equations.

We take partial derivatives with respect to x and y of each equation. The partial derivative is the usual derivative but one letter is the variable while everything else is constant. The partial derivative of g with respect to x, written as gx, is the derivative of x + y with x treated as the variable: y as a constant. Thus, gx = 1 + 0 = 1. Likewise, we calculate gy, Cx and Cy.

Let's write the four partial derivatives: gx = 1, gy = 1, Cx = 2x and Cy = 4y. Do you see how Cy = 4y? We differentiate x^2 + 2y^2 with y as a variable and x as a constant. The derivative of the constant x^2 is zero. The derivative of 2y^2 is 2(2)y = 4y.

So far, we have two equations, g and C, and the partial derivatives of g and C with respect to x and y. The partial derivatives are gradients which describe how a quantity changes with x or with y. To equate the gradients of g and C, we write:

parallel gradients.

The variable λ in the equations is the 'multiplier' in the 'Lagrange multiplier method'. It is a proportionality constant used to equate the gradients. Substituting for the partial derivatives in the Cx = λ gx equation we get 2x = λ which means x = λ/2.

Substituting for the partial derivatives in the Cy = λ gy equation we get 4y = λ which means y = λ/4. From the constraint equation x + y = 300 we have λ/2 + λ/4 = 300. Solving we get λ = 400.

Thus, x = λ/2 = 400/2 = 200 and y = λ/4 = 400/4 = 100. To minimize the objective function, your friend grows 200 hibiscus with the first method and 100 with the other.

If we plot the objective function in this example, we get a curved surface. In the plot you see x and y axes. We see the objective function on the z axis. This curved surface has a minimum at x = 0, y = 0. However, we want the x and y for a minimum constrained by x + y = 300. The red line is the constraint equation lying on the surface of the objective function. The blue dot is the minimum for this line. It is located at x = 200 and y = 100.

The solution.
Solution on the cost curve.

The Lagrange multiplier method will find an extreme value if it exists. This extreme value could be a maximum or a minimum. Usually we check by substitution or a plot.

Your friend is happy but has another question.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account