Multivariable Calculus, Interactive EditionXYZ Homework Edition

⇩ Download ▾

Chapter 4: The Gradient and Optimization

The last chapter ended with two numbers at each point of a surface — the slice slopes fxf_x and fyf_y. This chapter packs them into a single vector, f=(fx,fy)\nabla f = (f_x, f_y), and discovers that the packaging is the point. The gradient is not a bookkeeping device: it is a compass. At every point of the map it is perpendicular to the level curve through that point, it aims in the direction of steepest climb, and its magnitude is the climb rate. We verify all three claims the honest way — on a contour map carpeted with gradient arrows, where a theorem about perpendicularity becomes something you can check arrow by arrow.

With the compass in hand, we go hunting for the flat spots. Where f=0\nabla f = \mathbf{0} the terrain has a critical point, and a contour map betrays its character before any algebra: nested ovals close around a peak or a pit, while the level curve through a saddle crosses itself in an X. Reading those signatures — and then confirming each read with the second derivative test — turns optimization from formula-hunting into map-reading. One thing the map alone cannot do is tell a peak from a pit, and that ambiguity is honest mathematics with an honest resolution.

Finally we constrain the hunt. Most real optimization happens on a leash — maximize this, subject to that — and the leash changes the geometry: the best point on a constraint curve is almost never a critical point of ff itself. It is the point where the constraint curve kisses a level curve of ff tangentially, which is the same as saying the two gradients line up: f=λg\nabla f = \lambda \nabla g. That one equation, Lagrange's, closes the chapter — derived not from algebraic manipulation but from watching where a ribbon of function values, ridden along the constraint, stalls.

An original work of XYZ Homework, built around interactive XYZ 3D figures. Aligned to OpenStax Calculus Volume 3 (Strang & Herman), © OpenStax (Rice University), licensed CC BY-NC-SA 4.0; no OpenStax content is reproduced, and this work is not affiliated with or endorsed by OpenStax or Rice University. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.