18.5. LAGRANGE MULTIPLIERS 341

has nonzero determinant, then there exist scalars, λ 1, · · · ,λ m such thatfx1 (x0)

...fxn (x0)

= λ 1

g1x1 (x0)

...g1xn (x0)

+ · · ·+λ m

gmx1 (x0)

...gmxn (x0)

 (18.3)

holds.

To help remember how to use 18.3, do the following. First write the Lagrangian,

L = f (x)−m

∑i=1

λ igi (x)

and then proceed to take derivatives with respect to each of the components of x and alsoderivatives with respect to each λ i and set all of these equations equal to 0. The formula18.3 is what results from taking the derivatives of L with respect to the components of x.When you take the derivatives with respect to the Lagrange multipliers, and set what resultsequal to 0, you just pick up the constraint equations. This yields n+m equations for then+m unknowns x1, · · · ,xn,λ 1, · · · ,λ m. Then you proceed to look for solutions to theseequations. Of course these might be impossible to find using methods of algebra, but youjust do your best and hope it will work out.

Example 18.5.7 Minimize xyz subject to the constraints x2 + y2 + z2 = 4 and x−2y = 0.

Form the Lagrangian,

L = xyz−λ(x2 + y2 + z2−4

)−µ (x−2y)

and proceed to take derivatives with respect to every possible variable, leading to the fol-lowing system of equations.

yz−2λx−µ = 0xz−2λy+2µ = 0

xy−2λ z = 0x2 + y2 + z2 = 4

x−2y = 0

Now you have to find the solutions to this system of equations. In general, this could bevery hard or even impossible. If λ = 0, then from the third equation, either x or y mustequal 0. Therefore, from the first two equations, µ = 0 also. If µ = 0 and λ ̸= 0, then fromthe first two equations, xyz = 2λx2 and xyz = 2λy2 and so either x = y or x = −y, whichrequires that both x and y equal zero thanks to the last equation. But then from the fourthequation, z =±2 and now this contradicts the third equation. Thus µ and λ are either bothequal to zero or neither one is and the expression, xyz equals zero in this case. However, I

know this is not the best value for a minimizer because I can take x = 2√

35 ,y =

√35 , and

z = −1. This satisfies the constraints and the product of these numbers equals a negative