Skip to content

The total derivative as the best linear approximation

7 min read

Short answer

A function ff is differentiable at a\mathbf{a} when, near a\mathbf{a}, it looks like a linear function plus an error much smaller than the step: f(a+h)=f(a)+Lh+o(∥h∥)f(\mathbf{a}+\mathbf{h})=f(\mathbf{a})+L\mathbf{h}+o(\|\mathbf{h}\|). The matrix of LL is the derivative: the gradient for a scalar function, the Jacobian for a vector-valued one.

Diagram(1,1)
One-variable picture: near the point, the curve y = x² hugs its tangent line y = 2x − 1. In several variables the tangent line becomes a tangent plane or linear map.

From the tangent line to a linear map

In one variable, differentiability means the curve is indistinguishable from its tangent line under a microscope: f(a+h)=f(a)+f′(a)h+o(h)f(a+h)=f(a)+f'(a)h+o(h). The slope is the unique number making the leftover error shrink faster than hh.

For several variables the same idea holds with a linear map in place of "slope times hh". For f:Rn→Rf:\mathbb{R}^n\to\mathbb{R} the best linear approximation is h↦∇f(a)⋅h\mathbf{h}\mapsto\nabla f(\mathbf{a})\cdot\mathbf{h}, and the tangent plane is its graph.

Why partial derivatives are not enough

Partial derivatives only look along the coordinate axes. A function can have both partials at a point and still fail to be well approximated by any plane, because it can misbehave along a diagonal. For example f(x,y)=xyx2+y2f(x,y)=\dfrac{xy}{x^2+y^2} with f(0,0)=0f(0,0)=0 has both partials equal to 00 at the origin, yet along y=xy=x it equals 12\tfrac12 all the way in, so it is not even continuous there.

The reliable test is: if the partial derivatives exist and are continuous near the point, then ff is differentiable there, and the linear approximation is given by the gradient.

What you use it for

  • Linearization: f(x)≈f(a)+∇f(a)⋅(x−a)f(\mathbf{x})\approx f(\mathbf{a})+\nabla f(\mathbf{a})\cdot(\mathbf{x}-\mathbf{a}) for estimates and error propagation.
  • Chain rule: the derivative of a composition is the composition of linear maps, which is matrix multiplication of Jacobians.
  • Directional derivatives: once LL exists, the rate in any direction u\mathbf{u} is ∇f⋅u\nabla f\cdot\mathbf{u} with no extra work.

Worked example

Linearize f(x,y)=x2yf(x,y)=x^2y at (1,2)(1,2) and use it to estimate f(1.1, 2.05)f(1.1,\,2.05).

f(1,2)=2f(1,2)=2 and ∇f=(2xy,  x2)=(4, 1)\nabla f=(2xy,\;x^2)=(4,\,1) at (1,2)(1,2).

f(1.1,2.05)≈2+4(0.1)+1(0.05)=2.45.f(1.1,2.05)\approx2+4(0.1)+1(0.05)=2.45.

The exact value is 1.21⋅2.05=2.48051.21\cdot2.05=2.4805. The error, about 0.030.03, is second order in the step size, as expected.

Try it yourself

Linearize g(x,y)=x2+y2g(x,y)=\sqrt{x^2+y^2} at (3,4)(3,4) and estimate g(3.1, 3.9)g(3.1,\,3.9).

Show the answer

g(3,4)=5g(3,4)=5 and ∇g=(xg,yg)=(35,45)\nabla g=\left(\tfrac{x}{g},\tfrac{y}{g}\right)=\left(\tfrac35,\tfrac45\right). So g(3.1,3.9)≈5+0.6(0.1)+0.8(−0.1)=4.98g(3.1,3.9)\approx5+0.6(0.1)+0.8(-0.1)=4.98. The exact value is 24.82≈4.982\sqrt{24.82}\approx4.982.

Keep going with practice

Vidi's multivariable lessons use linearization for estimates before introducing the chain rule.