Maxima, minima, and Lagrange multipliers
A single-variable function has only two kinds of turning point — a hump or a dip — but the moment a second variable enters, a third shape appears: the saddle point, where the surface rises in one direction and falls in another, like the seat of a horse's saddle. This capstone topic of MA10001's several-variables unit gives you two tools built on that idea. First, an unconstrained test: find where both partial derivatives vanish, then use a discriminant built from second derivatives to tell max from min from saddle. Second, a constrained tool: when a variable must obey an equation like , Lagrange's method turns the geometric fact that the extremum occurs where the level curves of and touch tangentially into a solvable algebraic system. Together they answer "where is the best point" whether or not there are rules attached.
Unconstrained extrema of sit where and are classified by the discriminant , while constrained extrema of subject to occur where the gradients align, .
The core idea
Unconstrained critical points. If has a local max or min at an interior point where is differentiable, both partial derivatives must vanish there:
where: are the first partial derivatives of . Points satisfying this are critical points, but the condition is only necessary — a critical point can be a max, a min, or (new to several variables) a saddle.
Classifying with the discriminant. At a critical point , define
where: are second partial derivatives evaluated at the critical point. If and , it is a local minimum; if and , a local maximum; if , a saddle point; if , the test is inconclusive. This test is really a compact restatement of the second-order Taylor expansion of near : the quadratic terms (for a small step away from the critical point) keep a fixed sign in every direction exactly when , which is what makes the point a clean max or min; when the quadratic form changes sign with direction, producing the mixed up-and-down curvature of a saddle. A quick illustration: for , solving and gives critical points and . Since , , , at we get , a saddle point, while at we get with , a local minimum of value .
Constrained extrema. To extremize subject to a single equality constraint , introduce a multiplier and solve
where: and are the gradients, and is the Lagrange multiplier — an unknown scalar solved for alongside . This is equations in unknowns for variables plus the constraint, and it handles only equality constraints; inequality-constrained (KKT) problems are beyond this course.
The goal is to show, using only the geometric fact that a curve's tangent direction lies perpendicular to the curve's gradient, that at a point where restricted to the constraint surface attains an extremum, the two gradients and must be parallel, which is exactly the Lagrange condition used to set up and solve every constrained optimization problem in this course.
Step 1. Parametrize the constraint curve as , chosen so that for every — the curve stays on the constraint surface. Differentiating this identity with respect to using the chain rule gives : the gradient of is perpendicular to the curve's tangent vector at every point of the surface.
Step 2. Along the same curve, is a single-variable function of . If is where restricted to the constraint attains a local extremum, then by ordinary single-variable calculus its derivative there vanishes: .
Step 3. Compare the two results. Both and are perpendicular to the same tangent vector at the extremum point. In three dimensions the set of vectors perpendicular to a given nonzero tangent direction, restricted to the constraint surface, is spanned by the normal direction to that surface — so and must both point along that one shared normal line, meaning they are parallel (or , an excluded degenerate case).
Step 4. Parallel vectors differ only by a scalar factor, so for some number — precisely the Lagrange multiplier equation. Combined with the constraint itself, this gives the full system solved in every worked problem below: the multiplier is not extra physics, it is simply the proportionality constant forced by the tangency of the two gradients.
Worked example
Use Lagrange multipliers to find the point on the plane closest to the origin, and hence the minimum distance.
Step 1. Minimizing distance is equivalent to (and algebraically easier via) minimizing the squared distance , subject to .
Step 2. Form the Lagrange equations component by component: , , .
Step 3. Solve for in terms of : , , .
Step 4. Substitute into the constraint : , which collects to , so .
Step 5. Back-substitute to get the closest point: , , .
Step 6. Compute the distance. is the minimum squared distance, so the minimum distance itself is
Competitive stretch
Check the answer with the point-to-plane distance shortcut, for a plane and point . Here , so , matching Step 6 exactly and confirming that Lagrange's method reproduces the standard geometry formula.
Common traps
- Forgetting the companion check on . alone only says "extremum," not which kind — the sign of (equivalently , which shares the same sign when ) decides max versus min.
- Reading as "no extremum" instead of "inconclusive." The discriminant test is silent at ; a direct check or higher-order terms is needed.
- Dropping the final square root. Minimizing gives the same location as minimizing , but the minimized value is the squared distance — forgetting to take the square root at the end is a common slip.
- Mixing up which gradient is scaled by . Each component equation must be set up consistently, and the constraint equation itself is always the extra equation needed to pin down .
Ask the tutor: if classifying a critical point with the discriminant, or solving a Lagrange-multiplier system, isn't clicking, ask the AI tutor to walk through a fresh example with you step by step.
Why does a two-variable function get a new kind of critical point that one-variable functions never have?
In one variable, a curve near a critical point can only bend one way, giving a max or a min. In two variables, the surface can curve upward along one direction and downward along a perpendicular direction at the same point — picture at the origin. That mixed curvature is the saddle point, and the discriminant exists precisely to detect this possibility, which has no single-variable analogue.
What does the Lagrange multiplier lambda actually mean, beyond being a solving trick?
Geometrically it is just the proportionality constant between two parallel gradient vectors at the tangency point, as the derivation shows. But it also has a useful interpretation: it measures roughly how much the optimal value of would change per unit change in the constraint's right-hand side. In this course you mainly need lambda to solve the system, but recognizing it is not an arbitrary symbol helps when interpreting results.
How do I know whether to use the discriminant test or Lagrange multipliers on a given problem?
Look at whether the variables are free or tied together by an equation. If you are told to extremize with no other conditions, find critical points and classify them with . If the problem says "subject to" or gives an equation like a plane, sphere, or budget constraint that must satisfy, that is a signal to set up together with the constraint itself.