Module 37: Gradients, directional derivatives, and tangent planes
On this page
- A. Prerequisites and observable goals
- B. The central idea: the derivative is a linear map of displacements
- C. Directional rates and geometric normals
- D. Why the gradient gives steepest increase and a level normal
- E. A point-and-rate workflow
- F. Worked examples
- Computing bridge: A gradient is a direction of change, not an update policy
- G. Independent practice
- H. Complete solutions: Module 37
- I. Retention and readiness
A. Prerequisites and observable goals#
Partial derivatives, total differentiability, vectors, and planes.
Normalize a direction, compute a directional rate, interpret the gradient, and build a tangent plane or local approximation from the correct point and derivatives.
B. The central idea: the derivative is a linear map of displacements#
For a differentiable scalar function, the first-order change is . The gradient packages the coefficients into a vector, . A direction chooses an input displacement; a dot product extracts the corresponding rate. The gradient belongs to the input space, while the tangent plane belongs to the graph in one higher dimension.
C. Directional rates and geometric normals#
For a unit vector , define
If is differentiable, then . Unit length makes this a rate per unit distance. With a nonunit vector , the same composition derivative is a rate per unit parameter and scales by .
At a point with nonzero gradient, the greatest directional rate is , in direction ; the least is its negative. Directions tangent to a smooth level set have dot product zero with the gradient. A zero gradient gives zero first-order rate in every direction but does not determine whether the point is an extremum.
For a differentiable graph , the tangent plane at is
For a regular implicit level surface with , a tangent plane is . These use different gradient dimensions: two components for a graph’s scalar function, three for an implicit function of three inputs. [O3Grad]
D. Why the gradient gives steepest increase and a level normal#
The Cauchy–Schwarz inequality gives for unit . Equality occurs when the direction aligns with the nonzero gradient. This conclusion uses the Euclidean length convention and compatible coordinate scales; rescaling the input axes changes what counts as a unit direction.
If a differentiable path stays on a level set, then . The chain rule gives , proving perpendicularity to the tangent. This is a theorem under differentiability and regularity conditions, not a conclusion from a visually perpendicular arrow alone.
E. A point-and-rate workflow#
Identify the input point and evaluate the gradient there. If a direction is specified by two points, subtract them in the requested order and normalize. Take the dot product, keeping units. For a tangent plane, compute the function’s height as well as the partial slopes; do not confuse that height with the plane’s intercept. For an approximation, insert small increments into the linear model and mark the result approximate. A large displacement may leave the local model inaccurate.
F. Worked examples#
A directional derivative. For at , . In the direction , use , giving . Without normalization the dot product would be , a rate for a parameter step five times as long.
The tangent-line lesson extends to a plane. At , the height is , so the graph’s tangent plane is . The height is not the vertical-axis intercept, just as the earlier point height did not make the tangent line .
A height-map application. If a game terrain is , a normal to its tangent plane is . Normalizing it gives a unit normal for geometric calculations. This follows from the plane equation; it is not the two-component gradient padded with an arbitrary third value.
Computing bridge: A gradient is a direction of change, not an update policy#
For , tells the local directional rate through a dot product. Choosing adds an algorithm and a step size that are not contained in the gradient’s definition. A step can overshoot or behave badly on a poorly scaled problem. A06 derives a simple stability condition for gradient steps, and T03 distinguishes differentiating an objective from successfully training a model.
G. Independent practice#
F foundation C standard course work T transfer S optional stretch L runnable lab or project. Attempt the complete set before opening its solutions.
Find the gradient of at .
For at , find the directional derivative toward .
At the point in M37.02, give the direction and rate of fastest increase and of fastest decrease.
Find the tangent plane to at the graph point above . Use it to estimate .
Find the tangent plane to at .
Use linearization of at to estimate .
For the level curve at , find a tangent line and a unit tangent direction.
For at the origin, every directional derivative is zero. Prove the point is nevertheless neither a local maximum nor a local minimum. Explain why first-order data do not decide it.
Optional small hints
For M37.02, the vector toward the target point is . For M37.04, the two increments have opposite signs. For M37.08, compare values along the two coordinate axes.
H. Complete solutions: Module 37#
Compare the first step where your work differs. A corrected answer is not yet an independent success.
M37.01Show solution
Evaluate both partial components at the input point
The partials are and . At the gradient is . It is a vector of rates in input directions, not the scalar function value .
Back to M37.01M37.02Show solution
Normalize the displacement toward the target
The direction vector is , so . The gradient at is . Therefore the rate is . Moving toward the target initially decreases the function, even though both coordinates increase along that motion.
Back to M37.02M37.03Show solution
The gradient determines the extreme unit-direction rates
The gradient norm is . Fastest increase is in unit direction at rate . Fastest decrease is in the opposite direction at rate . This concerns infinitesimal change, not necessarily the best direction for a large finite move.
Back to M37.03M37.04Show solution
Use the height and both slopes
Here , gives , and gives . Thus the tangent plane is . The increments are , so . The exact quadratic error is , confirming an exact value of and a small underestimate.
Back to M37.04M37.05Show solution
Use a three-component implicit gradient
For , . The point satisfies and the gradient is nonzero. The tangent plane is , equivalently . Substitution of the point verifies the offset.
Back to M37.05M37.06Show solution
Linearize a distance function away from its singular origin
At the height is and gradient is . Thus . The function is differentiable near this nonzero point. The approximation uses changes in both coordinates; rounding the base distance does not replace their directional effects.
Back to M37.06M37.07Show solution
A level-set tangent is perpendicular to its gradient
For , the gradient at is . The tangent line is , or . A perpendicular direction is , so one unit tangent is . Its dot product with the gradient is zero.
Back to M37.07M37.08Show solution
Higher-order behavior can change sign after all linear terms vanish
The function is differentiable and its gradient at zero is , so all unit-direction first derivatives vanish. Yet and for every nonzero small . Every neighborhood therefore contains values above and below . The point is a saddle, not an extremum. First-order change is zero; the quadratic terms govern the nearby behavior.
Back to M37.08I. Retention and readiness#
Retrieve M08.02 and M36.08. Explain why the gradient formula for directional derivatives requires differentiability, and why a tangent plane requires a point height as well as partial slopes. Advance when you can normalize a direction and audit its orientation independently.