Foundations to FrontierPart VI: Calculus IIIBezhig

Module 37: Gradients, directional derivatives, and tangent planes

8 exercises, each with a complete solution. 1 figure.

On this page
  1. A. Prerequisites and observable goals
  2. B. The central idea: the derivative is a linear map of displacements
  3. C. Directional rates and geometric normals
  4. D. Why the gradient gives steepest increase and a level normal
  5. E. A point-and-rate workflow
  6. F. Worked examples
  7. Computing bridge: A gradient is a direction of change, not an update policy
  8. G. Independent practice
  9. H. Complete solutions: Module 37
  10. I. Retention and readiness

A. Prerequisites and observable goals#

Before

Partial derivatives, total differentiability, vectors, and planes.

After

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 Δf≈fxΔx+fyΔy\Delta f\approx f_x\Delta x+f_y\Delta y. The gradient packages the coefficients into a vector, ∇f=⟨fx,fy⟩\grad f=\langle f_x,f_y\rangle. 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 u\vv u, define

Duf(a)=lim⁡h→0f(a+hu)−f(a)h.D_{\vv u}f(\vv a)=\lim_{h\to0}\frac{f(\vv a+h\vv u)-f(\vv a)}h.

If ff is differentiable, then Duf=∇f⋅uD_{\vv u}f=\grad f\cdot\vv u. Unit length makes this a rate per unit distance. With a nonunit vector v\vv v, the same composition derivative is a rate per unit parameter and scales by ∥v∥\|\vv v\|.

At a point with nonzero gradient, the greatest directional rate is ∥∇f∥\|\grad f\|, in direction ∇f/∥∇f∥\grad f/\|\grad f\|; 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 z=f(x,y)z=f(x,y), the tangent plane at (a,b,f(a,b))(a,b,f(a,b)) is

z=f(a,b)+fx(a,b)(x−a)+fy(a,b)(y−b).z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).

For a regular implicit level surface F(x,y,z)=cF(x,y,z)=c with ∇F(P)≠0\grad F(P)\ne0, a tangent plane is ∇F(P)⋅(r−P)=0\grad F(P)\cdot(\vv r-P)=0. 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 ∇f⋅u≤∥∇f∥∥u∥=∥∇f∥\grad f\cdot\vv u\le\|\grad f\|\|\vv u\|=\|\grad f\| for unit u\vv u. 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 r(t)\vv r(t) stays on a level set, then f(r(t))=cf(\vv r(t))=c. The chain rule gives ∇f⋅r′=0\grad f\cdot\vv r'=0, 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 f=x2+2y2f=x^2+2y^2 at (1,1)(1,1), ∇f=⟨2,4⟩\grad f=\langle2,4\rangle. In the direction ⟨3,4⟩\langle3,4\rangle, use u=⟨3/5,4/5⟩\vv u=\langle3/5,4/5\rangle, giving Duf=22/5D_{\vv u}f=22/5. Without normalization the dot product would be 2222, a rate for a parameter step five times as long.

Exact level curves of f=x2+2y2f=x^2+2y^2 with gradient at (1,1)(1,1). The arrow points in the direction (2,4)(2,4) and is scaled for display. The dashed line is tangent to the level f=3f=3, not the graph’s three-dimensional tangent plane.

The tangent-line lesson extends to a plane. At (1,1)(1,1), the height is 33, so the graph’s tangent plane is z=3+2(x−1)+4(y−1)=2x+4y−3z=3+2(x-1)+4(y-1)=2x+4y-3. The height 33 is not the vertical-axis intercept, just as the earlier point height −1-1 did not make the tangent line y=3x−1y=3x-1.

A height-map application. If a game terrain is z=f(x,y)z=f(x,y), a normal to its tangent plane is ⟨−fx,−fy,1⟩\langle-f_x,-f_y,1\rangle. 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 f(x,y)=x2+4y2f(x,y)=x^2+4y^2, ∇f=(2x,8y)\nabla f=(2x,8y) tells the local directional rate through a dot product. Choosing wk+1=wk−α∇f(wk)w_{k+1}=w_k-\alpha\nabla f(w_k) 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.

M37.01FSolution

Find the gradient of f(x,y)=x2y+y3f(x,y)=x^2y+y^3 at (2,1)(2,1).

M37.02CSolution

For f(x,y)=x2+3y2f(x,y)=x^2+3y^2 at (1,−1)(1,-1), find the directional derivative toward (4,3)(4,3).

M37.03CSolution

At the point in M37.02, give the direction and rate of fastest increase and of fastest decrease.

M37.04TSolution

Find the tangent plane to z=x2+xy+y2z=x^2+xy+y^2 at the graph point above (1,2)(1,2). Use it to estimate f(1.02,1.99)f(1.02,1.99).

M37.05CSolution

Find the tangent plane to x2+2y2+z2=6x^2+2y^2+z^2=6 at (1,1,3)(1,1,\sqrt3).

M37.06TSolution

Use linearization of f(x,y)=x2+y2f(x,y)=\sqrt{x^2+y^2} at (3,4)(3,4) to estimate f(3.03,3.98)f(3.03,3.98).

M37.07TSolution

For the level curve x2+4y2=8x^2+4y^2=8 at (2,1)(2,1), find a tangent line and a unit tangent direction.

M37.08SSolution

For f(x,y)=x2−y2f(x,y)=x^2-y^2 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 (3,4)(3,4). 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 fx=2xyf_x=2xy and fy=x2+3y2f_y=x^2+3y^2. At (2,1)(2,1) the gradient is ⟨4,7⟩\boxed{\langle4,7\rangle}. It is a vector of rates in input directions, not the scalar function value f(2,1)=5f(2,1)=5.

Back to M37.01
M37.02Show solution

Normalize the displacement toward the target

The direction vector is (4−1,3−(−1))=(3,4)(4-1,3-(-1))=(3,4), so u=(3/5,4/5)\vv u=(3/5,4/5). The gradient at (1,−1)(1,-1) is (2,−6)(2,-6). Therefore the rate is (2)(3/5)+(−6)(4/5)=−18/5(2)(3/5)+(-6)(4/5)=\boxed{-18/5}. Moving toward the target initially decreases the function, even though both coordinates increase along that motion.

Back to M37.02
M37.03Show solution

The gradient determines the extreme unit-direction rates

The gradient norm is 4+36=210\sqrt{4+36}=2\sqrt{10}. Fastest increase is in unit direction (1,−3)/10\boxed{(1,-3)/\sqrt{10}} at rate 210\boxed{2\sqrt{10}}. Fastest decrease is in the opposite direction (−1,3)/10(-1,3)/\sqrt{10} at rate −210-2\sqrt{10}. This concerns infinitesimal change, not necessarily the best direction for a large finite move.

Back to M37.03
M37.04Show solution

Use the height and both slopes

Here f(1,2)=7f(1,2)=7, fx=2x+yf_x=2x+y gives 44, and fy=x+2yf_y=x+2y gives 55. Thus the tangent plane is z=7+4(x−1)+5(y−2)\boxed{z=7+4(x-1)+5(y-2)}. The increments are 0.02,−0.010.02,-0.01, so f(1.02,1.99)≈7+0.08−0.05=7.03f(1.02,1.99)\approx7+0.08-0.05=\boxed{7.03}. The exact quadratic error is (0.02)2+(0.02)(−0.01)+(−0.01)2=0.0003(0.02)^2+(0.02)(-0.01)+(-0.01)^2=0.0003, confirming an exact value of 7.03037.0303 and a small underestimate.

Back to M37.04
M37.05Show solution

Use a three-component implicit gradient

For F=x2+2y2+z2F=x^2+2y^2+z^2, ∇F=⟨2x,4y,2z⟩\grad F=\langle2x,4y,2z\rangle. The point satisfies 1+2+3=61+2+3=6 and the gradient is nonzero. The tangent plane is 2(x−1)+4(y−1)+23(z−3)=02(x-1)+4(y-1)+2\sqrt3(z-\sqrt3)=0, equivalently x+2y+3z=6\boxed{x+2y+\sqrt3z=6}. Substitution of the point verifies the offset.

Back to M37.05
M37.06Show solution

Linearize a distance function away from its singular origin

At (3,4)(3,4) the height is 55 and gradient is (3/5,4/5)(3/5,4/5). Thus f(3.03,3.98)≈5+(3/5)(0.03)+(4/5)(−0.02)=5.002f(3.03,3.98)\approx5+(3/5)(0.03)+(4/5)(-0.02)=\boxed{5.002}. 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.06
M37.07Show solution

A level-set tangent is perpendicular to its gradient

For F=x2+4y2F=x^2+4y^2, the gradient at (2,1)(2,1) is (4,8)(4,8). The tangent line is 4(x−2)+8(y−1)=04(x-2)+8(y-1)=0, or x+2y=4\boxed{x+2y=4}. A perpendicular direction is (2,−1)(2,-1), so one unit tangent is (2,−1)/5\boxed{(2,-1)/\sqrt5}. Its dot product with the gradient is zero.

Back to M37.07
M37.08Show solution

Higher-order behavior can change sign after all linear terms vanish

The function is differentiable and its gradient at zero is (0,0)(0,0), so all unit-direction first derivatives vanish. Yet f(h,0)=h2>0f(h,0)=h^2>0 and f(0,h)=−h2<0f(0,h)=-h^2<0 for every nonzero small hh. Every neighborhood therefore contains values above and below f(0,0)=0f(0,0)=0. The point is a saddle, not an extremum. First-order change is zero; the quadratic terms govern the nearby behavior.

Back to M37.08

I. 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.