Home › Linear Functions › Lesson 7

The Derivative as the Best Linear Approximation

Lesson 7 of 12

Key idea of this section

f(a + h) = f(a) + Df(a)h + o(‖h‖)      as h → 0
Df(a) is linear, represented by the Jacobian matrix [∂fᵢ/∂xⱼ(a)]
Chain rule:  D(g∘f)(a) = Dg(f(a)) ∘ Df(a)

The Fréchet derivative

The school lesson computes the slope of a line. Calculus computes the slope of a curve by approximating the curve by a line. In several variables the correct generalisation of "slope" is not a number but a linear map. Let U ⊆ ℝⁿ be open and f : U → ℝᵐ. We say f is differentiable at a ∈ U if there is a linear map L : ℝⁿ → ℝᵐ such that

limh→0  ‖f(a + h) − f(a) − Lh‖ / ‖h‖ = 0.

The map L is then unique and is called the derivative Df(a). The affine map h ↦ f(a) + Df(a)h is the best affine approximation to f near a: it is the only affine map whose error vanishes faster than ‖h‖.

Proof of uniqueness. If L and L′ both work, then ‖(L − L′)h‖/‖h‖ → 0 as h → 0, by the triangle inequality. Put h = tv for a fixed unit vector v and t → 0⁺; by linearity ‖(L − L′)(tv)‖/‖tv‖ = ‖(L − L′)v‖, which is constant in t and therefore 0. So Lv = L′v for every unit vector v, hence L = L′. ∎

Taking h = teⱼ shows that if f is differentiable then all partial derivatives exist and the matrix of Df(a) is the Jacobian matrix Jf(a) with entries ∂fᵢ/∂xⱼ(a). The converse fails: f(x, y) = xy/(x² + y²), f(0, 0) = 0, has both partial derivatives equal to 0 at the origin, yet it is not even continuous there, since f(t, t) = 1/2 for all t ≠ 0 (Problem 34). A useful sufficient condition is that all partial derivatives exist near a and are continuous at a.

Theorem 7.1 (Chain rule)

If f is differentiable at a and g is differentiable at f(a), then g∘f is differentiable at a and D(g∘f)(a) = Dg(f(a))∘Df(a). In matrices, Jg∘f(a) = Jg(f(a))·Jf(a).

The proof is an estimate: write f(a + h) = f(a) + Df(a)h + r(h) and g(f(a) + k) = g(f(a)) + Dg(f(a))k + s(k), with r(h) = o(‖h‖) and s(k) = o(‖k‖); substitute k = Df(a)h + r(h), note that ‖k‖ ≤ C‖h‖ for small h, and collect the error terms. The conceptual content is the slogan "the linearisation of a composition is the composition of the linearisations". For affine functions on ℝ this is the school fact that the slope of f∘g is the product of the slopes.

Worked example. Let f(x, y) = (x²y, x + y³) and a = (1, 2). Then

Jf(x, y) = [ 2xy   x²  ]       Jf(1, 2) = [ 4   1 ]
            [ 1     3y² ]                   [ 1  12 ]

Also f(1, 2) = (2, 9). To approximate f(1.1, 1.9), take h = (0.1, −0.1): Jf(1, 2)h = (0.4 − 0.1, 0.1 − 1.2) = (0.3, −1.1), so f(1.1, 1.9) ≈ (2.3, 7.9). The exact value is (1.21·1.9, 1.1 + 6.859) = (2.299, 7.959). The errors 0.001 and 0.059 are of second order in h, as the theory predicts.

The inverse and implicit function theorems

A linear map is invertible if and only if its determinant is nonzero. The inverse function theorem says that this linear criterion controls the nonlinear map locally: if f is C¹ near a and det Jf(a) ≠ 0, then f restricts to a C¹ bijection from a neighbourhood of a onto a neighbourhood of f(a), and D(f⁻¹)(f(a)) = Df(a)⁻¹. In the example above det Jf(1, 2) = 48 − 1 = 47 ≠ 0, so f is locally invertible near (1, 2). The implicit function theorem is the analogous statement for solving F(x, y) = 0 for y in terms of x, under the hypothesis that the partial Jacobian ∂F/∂y is invertible; it is the nonlinear version of solving a linear system by rank–nullity.

Newton's method

To solve F(x) = 0, replace F by its linearisation at the current guess and solve the linear problem exactly:

xₖ₊₁ = xₖ − JF(xₖ)⁻¹ F(xₖ).

In one variable this is xₖ₊₁ = xₖ − F(xₖ)/F′(xₖ), the x-intercept of the tangent line. If F is C² near a root x* with JF(x*) invertible, Newton's method converges quadratically from any starting point close enough to x*: ‖xₖ₊₁ − x*‖ ≤ C‖xₖ − x*‖², so the number of correct digits roughly doubles at each step (Problem 51). For F(x) = x² − 2 the iteration is xₖ₊₁ = (xₖ + 2/xₖ)/2, the Babylonian method; from x₀ = 1 it gives 1.5, 1.41666…, 1.41421568…, compared with √2 = 1.41421356…. Kantorovich's theorem (1948) gives verifiable conditions at the starting point that guarantee convergence.

Exercise

  • (a)
    Compute the Jacobian determinant of the polar-coordinate map (r, θ) ↦ (r cos θ, r sin θ).
  • (b)
    Find the linearisation of f(x, y) = x eʸ at (2, 0) and use it to estimate f(2.1, 0.05).
  • (c)
    Perform one Newton step for x³ − 2 = 0 from x₀ = 1.
Show solution

Answers: (a) The Jacobian has rows (cos θ, −r sin θ) and (sin θ, r cos θ), with determinant r cos² θ + r sin² θ = r. (b) f(2, 0) = 2, fₓ = eʸ = 1 and fy = x eʸ = 2 at (2, 0), so L(x, y) = 2 + (x − 2) + 2y; L(2.1, 0.05) = 2 + 0.1 + 0.1 = 2.2, compared with the exact 2.1·exp(0.05) ≈ 2.2077. (c) x₁ = 1 − (1 − 2)/(3·1²) = 1 + 1/3 = 4/3.

V.3.1