Survey of Mathematics

5.3 The total derivative, the Jacobian matrix and tangent planes

A field is differentiable at a point when, near it, the field equals a constant plus a linear map plus an error that is small compared with the step. That linear map is the total derivative; its matrix is the Jacobian, which for a scalar field is the gradient. It implies continuity, it contains every directional derivative, and it gives tangent planes and linear approximations.

Taught in 375/376Apostol, not taughtBeyond the courseApostol Vol. 2, 8.11 to 8.13 and 8.15 to 8.19Spagnolie, Lectures 21 to 23 and Lecture 19 (first version)Abbott, Understanding Analysis, ch. 5 (the one-variable idea)Jacobi, De determinantibus functionalibus (1841)

In one variable (1.4) a function is differentiable at aa when it looks like a line near aa: f(a+h)=f(a)+f′(a) h+hE(h)f(a + h) = f(a) + f'(a)\,h + hE(h) with E(h)→0E(h) \to 0. The number f′(a)f'(a) is the slope, and multiplying by it is a linear map from R\mathbb R to R\mathbb R (2.3). In many variables the right object is a linear map from Rn\mathbb R^n to Rm\mathbb R^m, and its matrix is the Jacobian. The chapter before showed that having a derivative in each direction is not enough (it did not even give continuity). Demanding a good linear approximation is, and it gives everything we wanted: continuity, a gradient that works in every direction, tangent planes, and the chain rule of 5.4. Chapter 3.8 used the gradient and the Jacobian without definitions; this chapter supplies them.

Before you start

1.4: the derivative as the slope of the best line. 2.5: a linear map is a matrix whose columns are the images of the unit vectors. 5.2: directional derivatives, partial derivatives and the gradient, and the example where they exist without continuity.

Quick checkIn f(a+h)=f(a)+mh+E(h)f(a + h) = f(a) + mh + E(h), what does 'differentiable at aa with derivative mm' say about E(h)E(h)?
Quick checkA linear map T:R3→R2T: \mathbb R^3 \to \mathbb R^2 has a matrix of what shape, and what are its columns?
Quick checkFor f(x,y)=xy2x2+y4f(x, y) = \dfrac{xy^2}{x^2 + y^4} (with f(0,y)=0f(0, y) = 0), all directional derivatives exist at the origin. What went wrong in 5.2?

The picture: zoom until it is flat

Drag the dot to a point of the surface and look at the green patch: the tangent plane, the graph of the best linear approximation. Slide the step length down. The vertical purple segment (true value minus plane value) shrinks much faster than the step itself, and the number “error divided by step” in the box under the picture falls towards 00. Do this for cos⁡(x+y)\cos(x + y) and the saddle too. For a vector field the same idea says that a tiny disc around aa is sent by FF to something that looks like an ellipse, the image of the disc under a matrix:

The purple curve is the true image of the tiny circle (after subtracting F(a)F(a) and dividing by the radius). The dashed green ellipse is what the Jacobian matrix JJ does to the unit circle. Make the radius ρ\rho small, and they are the same curve. Try the “swirl” field and move the dot around: the matrix changes from point to point, but at each point the circle becomes an ellipse.

The idea, in words

The one-variable equation says: near aa, ff is a constant f(a)f(a), plus a linear function of the step hh, plus an error. In many variables, the step v=x−av = x - a is a vector, the linear function is a linear map Ta(v)T_a(v), and the error must be small compared with the length of the step. You cannot divide by a vector, so the one-variable condition "E(h)/h→0E(h)/h \to 0" is rewritten as “error =∥v∥ E(a,v)= \lVert v \rVert\,E(a, v) with E→0E \to 0”. This is Apostol’s 8.11, Spagnolie’s Lecture 21, and Young’s and Fréchet’s idea.

Why· Why a linear map, and why 'all directions at once'

If you walk from aa in the direction yy, the error condition says f(a+hy)−f(a)=Ta(hy)+o(h)=h Ta(y)+o(h)f(a + hy) - f(a) = T_a(hy) + o(h) = h\,T_a(y) + o(h). So Ta(y)T_a(y) must be the directional derivative f′(a;y)f'(a; y). The total derivative is the map that remembers all the directional derivatives at once and insists that they depend linearly on yy and that the approximation is good uniformly in the direction. The sneaky function of 5.2 failed exactly these two demands: its directional derivative q2/pq^2/p is not linear in yy, and its approximation is good along each line but not along the parabola.

Where this came from· Jacobi's functional determinants, and Young and Fréchet

Carl Jacobi’s 1841 paper “De determinantibus functionalibus” in Crelle’s journal studied the determinant of the square array of partial derivatives of nn functions of nn variables: the determinant that now carries his name. He showed that nn functions of nn variables are mutually dependent exactly when this determinant vanishes identically. The same determinant is the number that says how a small region is stretched, the area scaling in the picture above. The idea of a derivative of a function of several variables as a linear map approximating it, uniformly in the direction, came later: Apostol’s text credits W. H. Young (1908) and Maurice Fréchet (1911), the latter “in a more general context”, meaning that Fréchet’s definition works on any normed space. That generality is why 521 states it that way.

The definition

Definition T

Differentiable field

Let F:S→RmF: S \to \mathbb R^m with S⊆RnS \subseteq \mathbb R^n, and let aa be an interior point of SS, so a ball B(a,r)B(a, r) lies in SS. We say FF is differentiable at aa if there is a linear map Ta:Rn→RmT_a: \mathbb R^n \to \mathbb R^m and a function E(a,v)E(a, v) (with values in Rm\mathbb R^m, defined for ∥v∥<r\lVert v \rVert < r, with E(a,0)=0E(a, 0) = 0) such that

F(a+v)=F(a)+Ta(v)+∥v∥ E(a,v)(∥v∥<r),E(a,v)→0 as v→0.F(a + v) = F(a) + T_a(v) + \lVert v \rVert\,E(a, v) \quad (\lVert v \rVert < r), \qquad E(a, v) \to 0 \text{ as } v \to 0.

An equivalent form, with no EE: lim⁡v→0∥F(a+v)−F(a)−Ta(v)∥∥v∥=0\displaystyle\lim_{v \to 0}\frac{\lVert F(a + v) - F(a) - T_a(v) \rVert}{\lVert v \rVert} = 0. (Define E(a,v)E(a, v) as the quotient inside, for v≠0v \ne 0.) For m=1m = 1 this is Apostol’s definition of a differentiable scalar field.

In one lineFF is differentiable at the interior point aa if F(a+v)=F(a)+Ta(v)+∥v∥E(a,v)F(a + v) = F(a) + T_a(v) + \lVert v \rVert E(a, v) for small vv, where TaT_a is a linear map and E(a,v)→0E(a, v) \to 0 as v→0v \to 0.

Why it existsIt says that near aa the field is a constant plus a linear map plus an error that is small compared with the step, which is the one-variable zoom picture in nn dimensions and the definition that supports the chain rule.

Definition T

Total derivative

When FF is differentiable at aa, the linear map TaT_a is called the total derivative of FF at aa, written F′(a)F'(a) (Apostol) or DF(a)DF(a) (Spagnolie), so F′(a)(v)=Ta(v)F'(a)(v) = T_a(v). Note (Apostol’s warning): the total derivative is a linear map, not a number; the value Ta(v)T_a(v) is a vector for each vv. It is unique, by the theorem below. In one variable (n=m=1n = m = 1) every linear map is multiplication by a number, Ta(h)=f′(a)hT_a(h) = f'(a)h, and the definition is the form of 1.4.

In one lineThe linear map TaT_a in the definition of a differentiable field; it is unique, and it is written F′(a)F'(a) or DF(a)DF(a).

Why it existsIt is the object that plays the role of the number f′(a)f'(a): the best linear approximation of FF at aa, with the error beyond first order.

Worked example new (this is the product rule)
Show from the definition that f(x,y)=xyf(x, y) = xy is differentiable at every a=(a1,a2)a = (a_1, a_2) with total derivative Ta(v)=a2v1+a1v2T_a(v) = a_2v_1 + a_1v_2.

Solution.

  1. Expand f(a+v)f(a + v). f(a+v)=(a1+v1)(a2+v2)=a1a2+a2v1+a1v2+v1v2f(a + v) = (a_1 + v_1)(a_2 + v_2) = a_1a_2 + a_2v_1 + a_1v_2 + v_1v_2. Multiply out; aa is fixed, vv is the small step.
  2. Read off the pieces. f(a)=a1a2f(a) = a_1a_2; Ta(v)=a2v1+a1v2T_a(v) = a_2v_1 + a_1v_2 is linear in vv (a row times a column); the leftover is v1v2v_1v_2. Constant plus linear plus error.
  3. Bound the error. ∣v1v2∣≤12(v12+v22)=12∥v∥2|v_1v_2| \le \frac12(v_1^2 + v_2^2) = \frac12\lVert v \rVert^2. (v1−v2)2≥0(v_1 - v_2)^2 \ge 0, that is, 2v1v2≤v12+v222v_1v_2 \le v_1^2 + v_2^2, and the same with v2→−v2v_2 \to -v_2.
  4. Divide by the length. ∣v1v2∣∥v∥≤12∥v∥→0\dfrac{|v_1v_2|}{\lVert v \rVert} \le \dfrac12\lVert v \rVert \to 0. So E(a,v)=v1v2∥v∥E(a, v) = \dfrac{v_1v_2}{\lVert v \rVert} tends to 00 as v→0v \to 0.

Answer. xyxy is differentiable everywhere, with Ta(v)=(a2,a1)⋅vT_a(v) = (a_2, a_1)\cdot v. The error v1v2v_1v_2 is of second order, and it is the cross term that the product rule of 1.4 treated with the add-and-subtract trick.

Worked example new (compare 3.8, Problems)
Find the total derivative of a linear field F(x)=Ax+bF(x) = Ax + b, where AA is m×nm \times n.

Solution.

  1. Expand. F(a+v)=A(a+v)+b=(Aa+b)+Av=F(a)+AvF(a + v) = A(a + v) + b = (Aa + b) + Av = F(a) + Av. AA is linear.
  2. Read off. The error term is 00 exactly, so E≡0E \equiv 0, and Ta(v)=AvT_a(v) = Av for every aa. There is nothing nonlinear left to estimate.

Answer. F′(a)=AF'(a) = A at every point: a linear map is its own best linear approximation, and its derivative does not depend on where you are.

What the total derivative contains

Theorem T Apostol Thm 8.5 and 8.12; Spagnolie Lecture 21

Directional derivative as a dot product with the gradient

Suppose f:S→Rf: S \to \mathbb R is differentiable at aa with total derivative TaT_a. Then for every y∈Rny \in \mathbb R^n the derivative f′(a;y)f'(a; y) exists and

Ta(y)=f′(a;y)=∑k=1nykDkf(a)=∇f(a)⋅y.T_a(y) = f'(a; y) = \sum_{k=1}^n y_kD_kf(a) = \nabla f(a)\cdot y.

In particular all the partial derivatives exist, TaT_a is the only linear map that works, and it is the linear function y↦∇f(a)⋅yy \mapsto \nabla f(a)\cdot y.

In one lineIf a scalar field ff is differentiable at aa, then f′(a;y)f'(a; y) exists for every yy and equals Ta(y)=∇f(a)⋅yT_a(y) = \nabla f(a)\cdot y; in particular TaT_a is unique.

Why it is trueIt proves the formula borrowed in 5.2, shows the total derivative is determined by the field, and shows it is the gradient read as a linear function.

ProofApostol 8.5; Spagnolie Lecture 21
The idea: Take the step v = hy along a line. By linearity, T_a(hy) = h T_a(y), so dividing by h leaves T_a(y) plus a term that goes to 0. The sum formula then follows from writing y in the unit vectors.
Let y≠Oy \ne O and h≠0h \ne 0 small. Put v=hyv = hy in the definition.
The case y=Oy = O: both sides are 00.
f(a+hy)−f(a)=h Ta(y)+∣h∣ ∥y∥ E(a,hy)f(a + hy) - f(a) = h\,T_a(y) + |h|\,\lVert y \rVert\,E(a, hy).
Definition of a differentiable field with v=hyv = hy; linearity gives Ta(hy)=hTa(y)T_a(hy) = hT_a(y); ∥hy∥=∣h∣ ∥y∥\lVert hy \rVert = |h|\,\lVert y \rVert.
f(a+hy)−f(a)h=Ta(y)±∥y∥ E(a,hy)\dfrac{f(a + hy) - f(a)}{h} = T_a(y) \pm \lVert y \rVert\,E(a, hy).
Divide by hh. Here ∣h∣/h=±1|h|/h = \pm1.
As h→0h \to 0 the right side tends to Ta(y)T_a(y). So f′(a;y)f'(a; y) exists and equals Ta(y)T_a(y).
hy→Ohy \to O as h→0h \to 0, so E(a,hy)→0E(a, hy) \to 0. The sign ±\pm and the factor ∥y∥\lVert y \rVert are bounded.This is where 'small compared with ‖v‖' is used: the error survives division by h and still vanishes.
Ta(y)=∑kykTa(ek)=∑kykf′(a;ek)=∑kykDkf(a)=∇f(a)⋅yT_a(y) = \sum_k y_kT_a(e_k) = \sum_k y_kf'(a; e_k) = \sum_k y_kD_kf(a) = \nabla f(a)\cdot y.
Write y=∑kykeky = \sum_k y_ke_k and use that TaT_a is linear.
So any two total derivatives agree on every yy: TaT_a is unique. ■\blacksquare
Ta(y)T_a(y) equals a quantity, f′(a;y)f'(a; y), that does not depend on TaT_a.
Proof workshopGive the reason for each line: the total derivative contains all directional derivativesApostol 8.5

Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.

  1. f(a+hy)−f(a)=Ta(hy)+∥hy∥ E(a,hy)f(a + hy) - f(a) = T_a(hy) + \lVert hy \rVert\,E(a, hy).
  2. Ta(hy)=h Ta(y)T_a(hy) = h\,T_a(y) and ∥hy∥=∣h∣ ∥y∥\lVert hy \rVert = |h|\,\lVert y \rVert.
  3. f(a+hy)−f(a)h=Ta(y)±∥y∥ E(a,hy)\dfrac{f(a + hy) - f(a)}{h} = T_a(y) \pm \lVert y \rVert\,E(a, hy).
  4. As h→0h \to 0, E(a,hy)→0E(a, hy) \to 0, so the quotient tends to Ta(y)T_a(y).
  5. Hence f′(a;y)=Ta(y)=∑kykDkf(a)=∇f(a)⋅yf'(a; y) = T_a(y) = \sum_k y_k D_k f(a) = \nabla f(a) \cdot y.
Theorem T Apostol 8.18; Spagnolie Lecture 23

A vector field is differentiable exactly when its components are

Let F:S→RmF: S \to \mathbb R^m. Then FF is differentiable at aa if and only if each component FiF_i is. In that case F′(a)(y)=F′(a;y)=(F1′(a;y),…,Fm′(a;y))F'(a)(y) = F'(a; y) = \big(F_1'(a; y), \dots, F_m'(a; y)\big) (for a vector field, F′(a;y)F'(a; y) means lim⁡h→0F(a+hy)−F(a)h\lim_{h \to 0}\frac{F(a + hy) - F(a)}{h}, which exists exactly when each component’s limit does) and, in the standard bases, the matrix of F′(a)F'(a) is the m×nm \times n matrix whose ii-th row is ∇Fi(a)\nabla F_i(a).

In one lineF=(F1,…,Fm)F = (F_1, \dots, F_m) is differentiable at aa if and only if every FiF_i is, and then F′(a)(y)=(∇F1(a)⋅y,…,∇Fm(a)⋅y)F'(a)(y) = (\nabla F_1(a)\cdot y, \dots, \nabla F_m(a)\cdot y), whose matrix is the Jacobian.

Why it is trueIt reduces the vector case to the scalar case already done, and tells you how to compute F′(a)F'(a): take the gradient of each component and stack them as rows.

ProofApostol 8.18
The idea: A vector is small exactly when all its components are small (the norm comparison of 5.1), so the error E tends to 0 if and only if each component of E does; and a map into R^m is linear exactly when each component is.
Fi(a+v)=Fi(a)+Ta,i(v)+∥v∥Ei(a,v)F_i(a + v) = F_i(a) + T_{a,i}(v) + \lVert v \rVert E_i(a, v), where Ta,iT_{a,i} is the ii-th component of TaT_a and EiE_i that of EE.
Take components of the defining equation: the ii-th component of ∥v∥E(a,v)\lVert v \rVert E(a, v) is ∥v∥Ei(a,v)\lVert v \rVert E_i(a, v).
If FF is differentiable, each Ta,iT_{a,i} is linear, and E→0E \to 0 forces Ei→0E_i \to 0 since ∣Ei∣≤∥E∥|E_i| \le \lVert E \rVert. So each FiF_i is differentiable.
TaT_a is linear exactly when each component Ta,iT_{a,i} is a linear function.
Conversely, if each FiF_i is differentiable with total derivative Ta,iT_{a,i}, put Ta=(Ta,1,…,Ta,m)T_a = (T_{a,1}, \dots, T_{a,m}), linear, and E=(E1,…,Em)→OE = (E_1, \dots, E_m) \to O.
∥E∥≤∑i∣Ei∣\lVert E \rVert \le \sum_i |E_i|, as in the proof of the component theorem of 5.1.
So Ta(y)=(∇Fi(a)⋅y)iT_a(y) = (\nabla F_i(a)\cdot y)_i, the matrix-times-vector with rows ∇Fi(a)\nabla F_i(a). ■\blacksquare
Theorem above for each scalar field FiF_i: Ta,i(y)=∇Fi(a)⋅yT_{a,i}(y) = \nabla F_i(a)\cdot y, which is row ii of a matrix times yy.
Definition T

Jacobian matrix

For F:S→RmF: S \to \mathbb R^m with all partial derivatives of all components existing at aa, the Jacobian matrix of FF at aa is

JF(a)=DF(a)=[D1F1(a)D2F1(a)⋯DnF1(a)⋮⋮⋮D1Fm(a)D2Fm(a)⋯DnFm(a)]=∂(F1,…,Fm)∂(x1,…,xn)(a).J_F(a) = DF(a) = \begin{bmatrix} D_1F_1(a) & D_2F_1(a) & \cdots & D_nF_1(a)\\ \vdots & \vdots & & \vdots\\ D_1F_m(a) & D_2F_m(a) & \cdots & D_nF_m(a)\end{bmatrix} = \frac{\partial(F_1, \dots, F_m)}{\partial(x_1, \dots, x_n)}(a).

Row ii is ∇Fi(a)\nabla F_i(a). Column jj is F′(a;ej)F'(a; e_j), the image of the jj-th unit vector, as in 2.5. When FF is differentiable, JF(a)J_F(a) is the matrix of F′(a)F'(a), so F′(a)(y)=JF(a) yF'(a)(y) = J_F(a)\,y. For a scalar field (m=1m = 1) it is the single row ∇f(a)T\nabla f(a)^{\mathsf T}: the gradient is a column and the Jacobian is a row, the distinction flagged in 3.8. When m=nm = n its determinant (2.7) is the Jacobian determinant, the factor by which FF scales small areas or volumes.

In one lineThe m×nm \times n matrix JF(a)J_F(a) of partial derivatives whose entry in row ii and column jj is DjFi(a)D_jF_i(a): the matrix of the total derivative.

Why it existsIt turns the abstract linear map F′(a)F'(a) into a table of numbers you can compute and multiply, which is what the chain rule and backpropagation do.

Worked example Lecture 23
Find the Jacobian matrix of F(x,y,z)=(xysin⁡z, x2)F(x, y, z) = (xy\sin z,\ x^2) and evaluate F′(a;y)F'(a; y) at a=(2,0,π/2)a = (2, 0, \pi/2).

Solution.

  1. Components and gradients. F1=xysin⁡zF_1 = xy\sin z has ∇F1=(ysin⁡z, xsin⁡z, xycos⁡z)\nabla F_1 = (y\sin z,\ x\sin z,\ xy\cos z). F2=x2F_2 = x^2 has ∇F2=(2x,0,0)\nabla F_2 = (2x, 0, 0). Each row of the Jacobian is the gradient of one component.
  2. Stack as rows. DF=[ysin⁡zxsin⁡zxycos⁡z2x00]DF = \begin{bmatrix} y\sin z & x\sin z & xy\cos z\\ 2x & 0 & 0\end{bmatrix}, a 2×32 \times 3 matrix. Two outputs, three inputs: m×n=2×3m \times n = 2 \times 3.
  3. Plug in aa. At (2,0,π2)(2, 0, \frac\pi2): sin⁡z=1\sin z = 1, cos⁡z=0\cos z = 0, so DF(a)=[020400]DF(a) = \begin{bmatrix}0 & 2 & 0\\ 4 & 0 & 0\end{bmatrix}. The derivative at a fixed point is a matrix of numbers, with no x,y,zx, y, z left in it.
  4. Apply to a direction. F′(a;y)=DF(a) y=(2y2, 4y1)F'(a; y) = DF(a)\,y = (2y_2,\ 4y_1). Matrix times vector.

Answer. DF(a)=[020400]DF(a) = \begin{bmatrix}0 & 2 & 0\\ 4 & 0 & 0\end{bmatrix} and F′(a;y)=(2y2,4y1)F'(a; y) = (2y_2, 4y_1). (This FF has continuous partials, so by the theorem later in this chapter it is differentiable.)

Your answerFor F(x,y)=(x2y, x+y)F(x, y) = (x^2y,\ x + y), what is the entry in row 1, column 1 of the Jacobian matrix at (1,2)(1, 2)?
Worked example Practice Final 2013, problem 4
Compute the Jacobian matrix of f(x,y,z)=(log⁡(x+y), cos⁡(2xy), ex2y)f(x, y, z) = \big(\log(x + y),\ \cos(2xy),\ e^{x^2y}\big).

Solution.

  1. Row 1. ∇log⁡(x+y)=(1x+y, 1x+y, 0)\nabla\log(x + y) = \Big(\dfrac1{x + y},\ \dfrac1{x + y},\ 0\Big). zz does not appear.
  2. Row 2. ∇cos⁡(2xy)=(−2ysin⁡(2xy), −2xsin⁡(2xy), 0)\nabla\cos(2xy) = \big(-2y\sin(2xy),\ -2x\sin(2xy),\ 0\big). Chain rule: derivative of cos⁡u\cos u is −sin⁡u-\sin u times ∂u∂x=2y\frac{\partial u}{\partial x} = 2y.
  3. Row 3. ∇ex2y=(2xy ex2y, x2ex2y, 0)\nabla e^{x^2y} = \big(2xy\,e^{x^2y},\ x^2e^{x^2y},\ 0\big). Chain rule: eue^u times ∂u∂x=2xy\frac{\partial u}{\partial x} = 2xy and ∂u∂y=x2\frac{\partial u}{\partial y} = x^2.

Answer. Df=[1x+y1x+y0−2ysin⁡2xy−2xsin⁡2xy02xyex2yx2ex2y0]Df = \begin{bmatrix}\frac1{x+y} & \frac1{x+y} & 0\\ -2y\sin 2xy & -2x\sin 2xy & 0\\ 2xye^{x^2y} & x^2e^{x^2y} & 0\end{bmatrix}. The zero column says that ff does not change at all in the zz direction.

Differentiable implies continuous

Theorem T Apostol Thm 8.6 and 8.19; Spagnolie Lecture 21

Differentiable fields are continuous

If F:S→RmF: S \to \mathbb R^m is differentiable at the interior point aa, then FF is continuous at aa.

In one lineIf FF is differentiable at aa, then FF is continuous at aa.

Why it is trueIt is the property directional derivatives lacked in 5.2; with it the idea of 'derivative' behaves as in one variable.

ProofApostol 8.6, 8.19
The idea: The change F(a+v) − F(a) equals T_a(v) plus an error. Both are bounded by a constant times ‖v‖ (Cauchy–Schwarz for the linear part), so both vanish as v goes to 0.
F(a+v)−F(a)=Ta(v)+∥v∥E(a,v)F(a + v) - F(a) = T_a(v) + \lVert v \rVert E(a, v).
Definition of a differentiable field.
So ∥F(a+v)−F(a)∥≤K∥v∥+∥v∥ ∥E(a,v)∥\lVert F(a + v) - F(a) \rVert \le K\lVert v \rVert + \lVert v \rVert\,\lVert E(a, v) \rVert.
By the proof of part (c) of 'Building continuous fields' in 5.1, a linear map TT satisfies ∥T(v)∥≤K∥v∥\lVert T(v) \rVert \le K\lVert v \rVert for a constant KK. For a scalar field, K=∥∇f(a)∥K = \lVert\nabla f(a)\rVert by Cauchy–Schwarz: ∣Ta(v)∣=∣∇f(a)⋅v∣≤∥∇f(a)∥ ∥v∥|T_a(v)| = |\nabla f(a)\cdot v| \le \lVert\nabla f(a)\rVert\,\lVert v \rVert.
The right side is ∥v∥ (K+∥E∥)\lVert v \rVert\,(K + \lVert E \rVert), which tends to 00 as ∥v∥→0\lVert v \rVert \to 0.
KK is a fixed number and ∥E(a,v)∥→0\lVert E(a, v) \rVert \to 0.
So F(a+v)→F(a)F(a + v) \to F(a): FF is continuous at aa. ■\blacksquare
Definition of continuity at aa.
Quick checkWhich of these is a correct implication for a scalar field at an interior point aa?

When does the total derivative exist?

Checking the definition is rarely necessary, because of the following test, which Apostol proves in 8.13 and the lecture left to the book.

Definition A

Continuously differentiable field

A scalar field ff is continuously differentiable at aa if the partial derivatives D1f,…,DnfD_1f, \dots, D_nf exist in some ball B(a)B(a) and are continuous at aa. A vector field is if each component is. It is continuously differentiable on a set if it is at every point of it (the class often called C1C^1). Every field built from polynomials, exp⁡\exp, sin⁡\sin, log⁡\log and so on by sums, products, quotients and composition is continuously differentiable where it is defined, because its partials are again such expressions.

In one lineA scalar field is continuously differentiable at aa if its partial derivatives exist in some ball around aa and are continuous at aa.

Why it existsIt is the condition that is easy to check by looking at the formula, and it is strong enough to give differentiability.

Theorem A Apostol Thm 8.7 (8.13)

Continuous partial derivatives imply differentiable

Suppose the partial derivatives D1f,…,DnfD_1f, \dots, D_nf exist in a ball B(a)B(a) and are continuous at aa. Then ff is differentiable at aa and f(a+v)=f(a)+∇f(a)⋅v+∥v∥E(a,v)f(a + v) = f(a) + \nabla f(a)\cdot v + \lVert v \rVert E(a, v) with E(a,v)→0E(a, v) \to 0 as v→0v \to 0.

In one lineIf ff is continuously differentiable at aa, then ff is differentiable at aa, with Ta(v)=∇f(a)⋅vT_a(v) = \nabla f(a)\cdot v.

Why it is trueIt is the practical test: look at the partial derivatives, and if they are continuous, you have a total derivative and every consequence of it.

ProofApostol 8.13
The idea: Move from a to a + v one coordinate at a time. Each move changes only one variable, so the one-variable mean value theorem applies, and produces a partial derivative at a point near a. Continuity of the partials at a makes those partial derivatives close to their values at a.
Define the points p0=ap_0 = a, pk=a+λ(u1e1+⋯+ukek)p_k = a + \lambda(u_1e_1 + \dots + u_ke_k), so pn=a+vp_n = a + v.
Let λ=∥v∥>0\lambda = \lVert v \rVert > 0 and u=v/λu = v/\lambda, a unit vector; take vv so small that B(a,λ)B(a, \lambda) lies in the ball B(a)B(a).
f(a+v)−f(a)=∑k=1n[f(pk)−f(pk−1)]f(a + v) - f(a) = \sum_{k=1}^n\big[f(p_k) - f(p_{k-1})\big].
Telescoping sum: the intermediate values cancel in pairs.
f(pk)−f(pk−1)=λuk Dkf(ck)f(p_k) - f(p_{k-1}) = \lambda u_k\,D_kf(c_k) for some ckc_k on the segment from pk−1p_{k-1} to pkp_k.
pkp_k and pk−1p_{k-1} differ only in coordinate kk, by λuk\lambda u_k. The function t↦f(pk−1+tek)t \mapsto f(p_{k-1} + te_k) is differentiable for tt between 00 and λuk\lambda u_k, with derivative DkfD_kf there (the partials exist in the ball); so the one-variable mean value theorem of 1.4 applies.If uk=0u_k = 0 the difference is 00 and any point works.
So f(a+v)−f(a)−∇f(a)⋅v=λ∑kuk[Dkf(ck)−Dkf(a)]=∥v∥E(a,v)f(a + v) - f(a) - \nabla f(a)\cdot v = \lambda\sum_k u_k\big[D_kf(c_k) - D_kf(a)\big] = \lVert v \rVert E(a, v), where E(a,v)=∑kuk[Dkf(ck)−Dkf(a)]E(a, v) = \sum_k u_k\big[D_kf(c_k) - D_kf(a)\big].
∇f(a)⋅v=λ∑kukDkf(a)\nabla f(a)\cdot v = \lambda\sum_k u_kD_kf(a).
Hence ∣E(a,v)∣≤∑k∣Dkf(ck)−Dkf(a)∣→0|E(a, v)| \le \sum_k|D_kf(c_k) - D_kf(a)| \to 0 as v→0v \to 0. ■\blacksquare
Every ckc_k lies within λ=∥v∥\lambda = \lVert v \rVert of aa (all the points of the path are), so ck→ac_k \to a as v→0v \to 0; each DkfD_kf is continuous at aa; and ∣uk∣≤1|u_k| \le 1.
Proof workshopRebuild the proof that continuous partials give differentiabilityApostol 8.13

Tap the lines in the order a proof would write them. Each line can only use what is already above it.

    Watch out· The sufficient condition is not necessary

    The converse is false: differentiable does not require continuous partials (example below), and Spagnolie’s Lecture 21 version, ”ff is differentiable if f′f' is continuous”, is a sufficient condition, not an equivalence (the instructor’s own slip, flagged in the digest). Continuous partials imply differentiable implies continuous, and none of the arrows reverses.

    The implication table of homework 12

    Worked example MATH 375 HW 12 (Apostol 8.14 #11); the printed keys have errors
    For a scalar field ff at an interior point aa, consider (a) ff continuous at aa; (b) ff differentiable at aa; (c) f′(a;y)f'(a; y) exists for every yy; (d) all first-order partials exist in a neighbourhood of aa and are continuous at aa; (e) ∇f(a)=O\nabla f(a) = O; (f) f(x)=∥x−a∥f(x) = \lVert x - a \rVert for all xx. Fill in the table of which statement always implies which.

    Solution.

    1. Collect the implications that are theorems. (b) implies (a) and (c): differentiable implies continuous, and implies all directional derivatives exist. (d) implies (b): continuous partials imply differentiable; so (d) implies (a), (b), (c). Theorems of this chapter, plus transitivity.

    2. Find a witness field for each kind of failure. Work at a=Oa = O in R2\mathbb R^2.

      • F1(x,y)=xF_1(x, y) = x: differentiable with continuous partials, and ∇F1=(1,0)≠O\nabla F_1 = (1, 0) \ne O. It satisfies (a), (b), (c), (d), and fails (e) and (f).
      • F2=∣xy∣F_2 = \sqrt{|xy|}: continuous, both partials are 00 at OO (so (e) holds), but F2′(O;(1,1))=lim⁡∣h∣hF_2'(O; (1, 1)) = \lim \frac{|h|}{h} does not exist. So (c) fails, hence (b) and (d) fail.
      • F3=xyx2+y2F_3 = \frac{xy}{x^2 + y^2} with F3(O)=0F_3(O) = 0: both partials are 00 (so (e) holds), but F3F_3 is not continuous at OO (it is 12\frac12 on y=xy = x). So (a) fails, and with it (b), (c), (d).
      • F4=xy2x2+y4F_4 = \frac{xy^2}{x^2 + y^4} with F4(0,y)=0F_4(0, y) = 0 (from 5.2): all directional derivatives exist (so (c) holds), the gradient is OO (so (e) holds), but it is not continuous, so (a), (b), (d) fail.
      • F5(x)=∥x∥F_5(x) = \lVert x \rVert (this is (f)): continuous, but F5′(O;y)=lim⁡∣h∣ ∥y∥hF_5'(O; y) = \lim \frac{|h|\,\lVert y \rVert}{h} does not exist for y≠Oy \ne O. So (c), (b), (d) fail, and the partials do not exist, so (e) fails.
      • F6=(x2+y2)sin⁡1x2+y2F_6 = (x^2 + y^2)\sin\frac1{x^2 + y^2} with F6(O)=0F_6(O) = 0: differentiable at OO with T=0T = 0 (shown below), so (a), (b), (c), (e) hold, but its partial derivatives are not continuous at OO, so (d) fails.
      Each non-implication needs one example; six fields give all of them.
    3. Read the table off. Row = hypothesis, column = conclusion; a tick means “always implies”.

      (a)(b)(c)(d)(e)(f)
      (a) continuous✓
      (b) differentiable✓✓✓
      (c) all f′(a;y)f'(a; y) exist✓
      (d) continuous partials✓✓✓✓
      (e) ∇f(a)=O\nabla f(a) = O✓
      (f) f=∥x−a∥f = \lVert x - a \rVert✓✓
      Why the blanks are blank: (a) does not imply (b), (c), (d) by F2F_2 or F5F_5, nor (e), (f) by F1F_1. (b) does not imply (d) by F6F_6, nor (e), (f) by F1F_1. (c) does not imply (a) by F4F_4 (so not (b), (d)), nor (e), (f) by F1F_1. (d) does not imply (e), (f) by F1F_1. (e) implies nothing else, by F3F_3. (f) does not imply (b), (c), (d), (e) by F5F_5.

    Answer. The table above. The differentiability of F6F_6: ∣F6(v)∣≤∥v∥2|F_6(v)| \le \lVert v \rVert^2, so F6(v)=0+0⋅v+∥v∥EF_6(v) = 0 + 0\cdot v + \lVert v \rVert E with E=∥v∥sin⁡1∥v∥2→0E = \lVert v \rVert\sin\frac1{\lVert v \rVert^2} \to 0; yet ∂F6∂x=2xsin⁡1x2+y2−2xx2+y2cos⁡1x2+y2\frac{\partial F_6}{\partial x} = 2x\sin\frac1{x^2 + y^2} - \frac{2x}{x^2 + y^2}\cos\frac1{x^2 + y^2}, which on the xx-axis at xn=1/2πnx_n = 1/\sqrt{2\pi n} equals −2xn→−∞-\frac{2}{x_n} \to -\infty. The definition matters for (f). Apostol’s definition of f′(a;y)f'(a; y) (8.6) takes h→0h \to 0 from both sides, and that is the definition of 5.2. With it, f(a+hy)−f(a)h=∣h∣ ∥y∥h\frac{f(a + hy) - f(a)}{h} = \frac{|h|\,\lVert y \rVert}{h} is +∥y∥+\lVert y \rVert for h>0h > 0 and −∥y∥-\lVert y \rVert for h<0h < 0, so the limit does not exist. A one-sided derivative would exist and equal ∥y∥\lVert y \rVert, and (f) would then imply (c). The printed keys differ from this table: both versions mark (b) implies (d), which is false (witness F6F_6); both mark row (e) with ticks beyond (e) itself, false (witness F3F_3); and both tick (c) in row (f), which holds only for a one-sided derivative, not for the two-sided limit f′(a;y)f'(a; y) used here (witness F5F_5). Apostol’s printed answer, “(b) implies (a) and (c); (d) implies (a), (b), (c); (f) implies (a)”, agrees with the table.

    Quick checkWhich field is differentiable at the origin but has partial derivatives that are not continuous there?

    The linearization and its error

    Definition T

    Linearization

    If FF is differentiable at aa, its linearization (linear approximation) at aa is L(x)=F(a)+F′(a)(x−a)L(x) = F(a) + F'(a)(x - a). For a scalar field, L(x)=f(a)+∇f(a)⋅(x−a)L(x) = f(a) + \nabla f(a)\cdot(x - a). The definition says F(x)−L(x)=∥x−a∥ E(a,x−a)F(x) - L(x) = \lVert x - a \rVert\,E(a, x - a), which is small compared with ∥x−a∥\lVert x - a \rVert.

    In one lineThe affine function L(x)=F(a)+F′(a)(x−a)L(x) = F(a) + F'(a)(x - a) that approximates a differentiable field FF near aa.

    Why it existsIt replaces a complicated field by a constant plus a matrix times the displacement, which is easy to compute with, and it is exactly the function whose graph is the tangent plane.

    Worked example Lecture 21
    Linearize F(x,y,z)=x2y ez2F(x, y, z) = x^2y\,e^{z^2} about a=(1,2,0)a = (1, 2, 0) and test it at (1.1,1.9,0.1)(1.1, 1.9, 0.1).

    Solution.

    1. Value and partials at aa. F(a)=12⋅2⋅e0=2F(a) = 1^2\cdot 2\cdot e^0 = 2. Fx=2xy ez2=4F_x = 2xy\,e^{z^2} = 4, Fy=x2ez2=1F_y = x^2e^{z^2} = 1, Fz=x2y ez2⋅2z=0F_z = x^2y\,e^{z^2}\cdot 2z = 0. The lecture’s slip: the printed evaluation point (1,1,0)(1, 1, 0) does not give these values; a=(1,2,0)a = (1, 2, 0) does.
    2. Form the linearization. L(x)=2+4(x−1)+1⋅(y−2)+0⋅zL(x) = 2 + 4(x - 1) + 1\cdot(y - 2) + 0\cdot z. F(a)+∇F(a)⋅(x−a)F(a) + \nabla F(a)\cdot(x - a).
    3. Test at (1.1,1.9,0.1)(1.1, 1.9, 0.1). L=2+0.4−0.1=2.3L = 2 + 0.4 - 0.1 = 2.3; the true value is 1.21×1.9×e0.01=2.32211.21\times1.9\times e^{0.01} = 2.3221. Error 0.02210.0221.
    4. Error relative to the step. ∥v∥=0.01+0.01+0.01=0.1732\lVert v \rVert = \sqrt{0.01 + 0.01 + 0.01} = 0.1732, so error/∥v∥=0.128/\lVert v \rVert = 0.128. At one tenth of the step, v=(0.01,−0.01,0.01)v = (0.01, -0.01, 0.01), the point is (1.01,1.99,0.01)(1.01, 1.99, 0.01): the true value is 2.030202.03020, the plane says 2.032.03, the error is 2.0×10−42.0\times10^{-4} and ∥v∥=0.01732\lVert v \rVert = 0.01732, so the ratio is 0.01170.0117. Shrinking vv by a factor of 1010 shrinks the error by about 100100 and the ratio by about 1010: the ratio is proportional to ∥v∥\lVert v \rVert for a smooth field, which is the second-order behaviour 5.6 explains.

    Answer. L(x)=2+4(x−1)+(y−2)L(x) = 2 + 4(x - 1) + (y - 2); L(1.1,1.9,0.1)=2.3L(1.1, 1.9, 0.1) = 2.3 against the true 2.32212.3221.

    Your answerUse the linearization L(x)=2+4(x−1)+(y−2)L(x) = 2 + 4(x - 1) + (y - 2) of the example to estimate F(0.9,2.1,0.05)F(0.9, 2.1, 0.05).
    Worked example MATH 375 Final Review, 8.18
    Linearize the vector field F(x,y,z)=(xyz, x+y+z)F(x, y, z) = (xyz,\ x + y + z) about a=(1,2,2)a = (1, 2, 2).

    Solution.

    1. Value. F(a)=(1⋅2⋅2, 1+2+2)=(4,5)F(a) = (1\cdot2\cdot2,\ 1 + 2 + 2) = (4, 5).
    2. Jacobian. DF=[yzxzxy111]DF = \begin{bmatrix}yz & xz & xy\\ 1 & 1 & 1\end{bmatrix}, so DF(a)=[422111]DF(a) = \begin{bmatrix}4 & 2 & 2\\ 1 & 1 & 1\end{bmatrix}. Gradients of the two components as rows.
    3. Linearization. F(x)≈F(a)+DF(a)(x−a)=(4+4(x−1)+2(y−2)+2(z−2), 5+(x−1)+(y−2)+(z−2))F(x) \approx F(a) + DF(a)(x - a) = \big(4 + 4(x - 1) + 2(y - 2) + 2(z - 2),\ 5 + (x - 1) + (y - 2) + (z - 2)\big). Matrix times the displacement vector (x−1,y−2,z−2)(x - 1, y - 2, z - 2).
    4. Check numerically. At (1.1,2.1,1.9)(1.1, 2.1, 1.9) the true value is (4.389,5.1)(4.389, 5.1) and the linearization gives (4.4,5.1)(4.4, 5.1). Agreement to the first order; the first component is off by 0.0110.011 because xyzxyz has second-order terms.

    Answer. As in step 3. The linearization of a vector field is a pair of tangent planes, one for each component.

    Python labWatch the error shrink faster than the step, or fail to
    import numpy as np
    rng = np.random.default_rng(1)
    
    def smooth(x, y):  return x**2 * y
    def cone(x, y):    return np.hypot(x, y)
    def sneaky(x, y):  return np.where(x == 0, 0.0, x * y**2 / (x**2 + y**4 + 1e-300))
    def wiggle(x, y):
        s = x**2 + y**2
        return np.where(s == 0, 0.0, s * np.sin(1 / np.where(s == 0, 1, s)))
    
    cases = [("x^2 y at (1,2), gradient (4,1)", smooth, (1.0, 2.0), (4.0, 1.0)),
             ("cone at 0, 'gradient' (0,0)", cone, (0.0, 0.0), (0.0, 0.0)),
             ("sneaky at 0, gradient (0,0)", sneaky, (0.0, 0.0), (0.0, 0.0)),
             ("(x^2+y^2) sin(1/(x^2+y^2)) at 0, gradient (0,0)", wiggle, (0.0, 0.0), (0.0, 0.0))]
    
    th = rng.uniform(0, 2 * np.pi, 4000)
    print("worst error/|v| over 4000 random directions and the two parabolas x = +-y^2")
    print(f"{'':52s}" + "".join(f"  |v|={r:7.0e}" for r in (1e-1, 1e-2, 1e-3, 1e-4)))
    for name, f, a, g in cases:
        row = []
        for r in (1e-1, 1e-2, 1e-3, 1e-4):
            vx, vy = r * np.cos(th), r * np.sin(th)
            # also points on the parabolas x = +-y^2 at distance about r
            vx = np.concatenate([vx, [r**2, -r**2]]); vy = np.concatenate([vy, [r, r]])
            err = np.abs(f(a[0] + vx, a[1] + vy) - f(*a) - (g[0] * vx + g[1] * vy)) / np.hypot(vx, vy)
            row.append(err.max())
        print(f"{name:52s}" + "".join(f"  {e:11.2e}" for e in row))

    Try this. Run it. For x²y the ratio error/|v| falls by 10 each time |v| falls by 10: the error is of second order. For the cone and the sneaky function it does not fall: no linear map approximates them. Notice for the cone that the ratio is exactly 1 for every |v|: whatever 'gradient' you guess, the corner defeats it. For (x²+y²) sin(1/(x²+y²)) the ratio falls even though the partials misbehave. Try changing the guessed gradient for the smooth case to (4.1, 1): the ratio then stops falling and levels off near 0.1, because a wrong linear map leaves a first-order error.

    The derivative along a curve

    Theorem T Apostol Thm 8.8 (8.15); Spagnolie Lecture 22

    Rate of change along a curve

    Let r:(α,β)→Rnr: (\alpha, \beta) \to \mathbb R^n be differentiable at tt (each coordinate has a derivative, r′(t)r'(t) is the vector of those derivatives) and let ff be a scalar field differentiable at a=r(t)a = r(t). Then g=f∘rg = f \circ r is differentiable at tt and

    g′(t)=∇f(r(t))⋅r′(t).g'(t) = \nabla f(r(t))\cdot r'(t).

    In one lineIf rr is differentiable at tt and ff is differentiable at r(t)r(t), then g(t)=f(r(t))g(t) = f(r(t)) has g′(t)=∇f(r(t))⋅r′(t)g'(t) = \nabla f(r(t))\cdot r'(t).

    Why it is trueIt is the chain rule for a path, and the tool that proves the gradient is perpendicular to level sets; it is the special case m=1m = 1, ninput=1n_{\text{input}} = 1 of the chain rule of 5.4.

    ProofSpagnolie Lecture 22; Apostol 8.15
    The idea: Put v = r(t+h) − r(t) into the first-order formula for f at a, divide by h, and let h go to 0. The linear part gives the dot product with r′; the error part is a bounded ratio times a quantity that goes to 0.
    g(t+h)−g(t)=∇f(a)⋅v(h)+∥v(h)∥ E(a,v(h))g(t + h) - g(t) = \nabla f(a)\cdot v(h) + \lVert v(h) \rVert\,E(a, v(h)).
    Differentiability of ff at a=r(t)a = r(t), with the step v(h)=r(t+h)−r(t)v(h) = r(t + h) - r(t).
    g(t+h)−g(t)h=∇f(a)⋅v(h)h+∥v(h)∥h E(a,v(h))\dfrac{g(t + h) - g(t)}{h} = \nabla f(a)\cdot\dfrac{v(h)}{h} + \dfrac{\lVert v(h) \rVert}{h}\,E(a, v(h)).
    Divide by hh.
    The first term tends to ∇f(a)⋅r′(t)\nabla f(a)\cdot r'(t).
    rr is differentiable at tt, so v(h)h→r′(t)\frac{v(h)}{h} \to r'(t) (componentwise, then the dot product is a limit by the limit laws of 5.1).
    The second term has absolute value at most (bounded) × ∥E(a,v(h))∥→0\times\ \lVert E(a, v(h)) \rVert \to 0.
    ∥v(h)∥∣h∣=∥v(h)h∥→∥r′(t)∥\frac{\lVert v(h) \rVert}{|h|} = \big\lVert\frac{v(h)}{h}\big\rVert \to \lVert r'(t) \rVert is bounded, and v(h)→Ov(h) \to O (since rr is continuous at tt), so E(a,v(h))→0E(a, v(h)) \to 0.If v(h)=Ov(h) = O the term is 00 because E(a,O)=0E(a, O) = 0 by convention.
    So g′(t)=∇f(r(t))⋅r′(t)g'(t) = \nabla f(r(t))\cdot r'(t). ■\blacksquare
    Sum of the two limits.
    Worked example Lecture 22
    Let r(t)=(t,1/t)r(t) = (t, 1/t) for t>0t > 0 and f(x,y)=x2+y2f(x, y) = x^2 + y^2. Find g′(t)g'(t) for g=f∘rg = f \circ r, and interpret it.

    Solution.

    1. Gradient and velocity. ∇f=(2x,2y)\nabla f = (2x, 2y), which at r(t)r(t) is (2t,2t)(2t, \frac2t). r′(t)=(1,−1t2)r'(t) = (1, -\frac1{t^2}). Differentiate each coordinate.
    2. Dot. g′(t)=2t⋅1+2t⋅(−1t2)=2t−2t3g'(t) = 2t\cdot1 + \frac2t\cdot\big(-\frac1{t^2}\big) = 2t - \frac2{t^3}. The path rule.
    3. Check directly. g(t)=t2+t−2g(t) = t^2 + t^{-2}, so g′(t)=2t−2t−3g'(t) = 2t - 2t^{-3}. Same answer, as it must be.
    4. Interpret. g′(t)=0g'(t) = 0 at t=1t = 1, the point (1,1)(1, 1) of the hyperbola closest to the origin; g′(t)→−∞g'(t) \to -\infty as t→0+t \to 0^+ and +∞+\infty as t→∞t \to \infty. gg is the squared distance from the origin to the moving point: it falls, reaches its minimum 22 at (1,1)(1, 1), then rises.

    Answer. g′(t)=2t−2t3g'(t) = 2t - \dfrac2{t^3}, zero exactly when the path touches a level circle of ff tangentially (at (1,1)(1, 1)).

    Your answerFor r(t)=(t,1/t)r(t) = (t, 1/t) and f=x2+y2f = x^2 + y^2, what is ddtf(r(t))\dfrac{d}{dt}f(r(t)) at t=2t = 2?
    Worked example MATH 375 HW 13 (Apostol 8.17 #1 and #2a)
    With u=f(x,y)u = f(x, y), x=X(t)x = X(t), y=Y(t)y = Y(t) and F(t)=f(X(t),Y(t))F(t) = f(X(t), Y(t)), express F′F' and F′′F''; then evaluate for f=x2+y2f = x^2 + y^2, X=tX = t, Y=t2Y = t^2.

    Solution.

    1. First derivative. By the path theorem with r=(X,Y)r = (X, Y): F′(t)=fxX′+fyY′F'(t) = f_xX' + f_yY', the partials evaluated at (X(t),Y(t))(X(t), Y(t)). Gradient dotted with velocity.
    2. Second derivative: product rule. F′′=(ddtfx)X′+fxX′′+(ddtfy)Y′+fyY′′F'' = \big(\tfrac{d}{dt}f_x\big)X' + f_xX'' + \big(\tfrac{d}{dt}f_y\big)Y' + f_yY''. Each product fx⋅X′f_x\cdot X' is a product of two functions of tt.
    3. The partials are themselves composite. Apply the path theorem again, to the scalar fields fxf_x and fyf_y: ddtfx=fxxX′+fxyY′\tfrac{d}{dt}f_x = f_{xx}X' + f_{xy}Y' and ddtfy=fyxX′+fyyY′\tfrac{d}{dt}f_y = f_{yx}X' + f_{yy}Y' (with the order of differentiation as in 5.2). This is the step the homework warned about: fx(X(t),Y(t))f_x(X(t), Y(t)) also depends on tt.
    4. Collect. If fxy=fyxf_{xy} = f_{yx} (true when they are continuous): F′′=fxxX′2+2fxyX′Y′+fyyY′2+fxX′′+fyY′′F'' = f_{xx}X'^2 + 2f_{xy}X'Y' + f_{yy}Y'^2 + f_xX'' + f_yY''.
    5. The example. fx=2xf_x = 2x, fy=2yf_y = 2y, fxx=fyy=2f_{xx} = f_{yy} = 2, fxy=0f_{xy} = 0; X′=1X' = 1, X′′=0X'' = 0, Y′=2tY' = 2t, Y′′=2Y'' = 2. So F′=2t⋅1+2t2⋅2t=2t+4t3F' = 2t\cdot1 + 2t^2\cdot2t = 2t + 4t^3 and F′′=2⋅1+2⋅(2t)2+0+2t2⋅2=2+12t2F'' = 2\cdot1 + 2\cdot(2t)^2 + 0 + 2t^2\cdot2 = 2 + 12t^2. Check: F=t2+t4F = t^2 + t^4 directly.

    Answer. F′=fxX′+fyY′F' = f_xX' + f_yY'; F′′=fxxX′2+2fxyX′Y′+fyyY′2+fxX′′+fyY′′F'' = f_{xx}X'^2 + 2f_{xy}X'Y' + f_{yy}Y'^2 + f_xX'' + f_yY''; for the example F′=2t+4t3F' = 2t + 4t^3 and F′′=2+12t2F'' = 2 + 12t^2, as in Apostol’s answers.

    Worked example MATH 375 Fall 2025 final, problem 5
    A buoy at position (X(t),Y(t))(X(t), Y(t)) measures a temperature f(x,y,t)f(x, y, t) that also changes in time. Find ddtf(X(t),Y(t),t)\dfrac d{dt}f(X(t), Y(t), t); evaluate for f=xtf = xt and (X,Y)=(t,0)(X, Y) = (t, 0).

    Solution.

    1. The curve in (x,y,t)(x, y, t) space. r(t)=(X(t),Y(t),t)r(t) = (X(t), Y(t), t), with velocity r′(t)=(X′,Y′,1)r'(t) = (X', Y', 1). Time is also a coordinate; its velocity is 11.
    2. Apply the path theorem. g′(t)=fxX′+fyY′+ftg'(t) = f_xX' + f_yY' + f_t, all evaluated at (X(t),Y(t),t)(X(t), Y(t), t). Gradient in three variables dotted with (X′,Y′,1)(X', Y', 1).
    3. Meaning. fxX′+fyY′f_xX' + f_yY' is the change due to the buoy’s motion; ftf_t is the change that the temperature has at a fixed place even if the buoy sits still. Stand outside for a while and see the temperature change without moving.
    4. The example. f=xtf = xt: fx=tf_x = t, fy=0f_y = 0, ft=xf_t = x. With X=tX = t, Y=0Y = 0: g′=t⋅1+0+t=2tg' = t\cdot1 + 0 + t = 2t. Check: g(t)=t⋅t=t2g(t) = t\cdot t = t^2, g′=2tg' = 2t.

    Answer. g′=fxX′+fyY′+ftg' = f_xX' + f_yY' + f_t. The forgotten term on the exam was ftf_t.

    Level sets, normals and tangent planes

    Theorem T Apostol 8.16; Spagnolie Lecture 22

    The gradient is perpendicular to level sets

    Let ff be differentiable on an open set SS and let rr be a differentiable curve with f(r(t))=cf(r(t)) = c for all tt near t0t_0. Put a=r(t0)a = r(t_0). Then ∇f(a)⋅r′(t0)=0\nabla f(a)\cdot r'(t_0) = 0.

    In one lineIf ff is differentiable at aa and rr is a curve in the level set f=cf = c through aa, then ∇f(a)⋅r′(t0)=0\nabla f(a)\cdot r'(t_0) = 0: the gradient is perpendicular to the tangent vector of every such curve.

    Why it is trueIt is the geometric content of 'steepest ascent': since ff does not change along a level curve, the direction in which it changes most must be at right angles to it.

    ProofApostol 8.16; Lecture 22
    The idea: The function g(t) = f(r(t)) is constant, so its derivative is 0; the path theorem says that derivative is the dot product.
    g(t)=f(r(t))g(t) = f(r(t)) is constant near t0t_0, so g′(t0)=0g'(t_0) = 0.
    By hypothesis f(r(t))=cf(r(t)) = c.
    Also g′(t0)=∇f(r(t0))⋅r′(t0)g'(t_0) = \nabla f(r(t_0))\cdot r'(t_0).
    Rate of change along a curve.
    So ∇f(a)⋅r′(t0)=0\nabla f(a)\cdot r'(t_0) = 0. ■\blacksquare
    Equate the two.
    Definition T

    Tangent plane

    Let aa lie on the level surface L(c)={f=c}L(c) = \{f = c\} of a differentiable scalar field on R3\mathbb R^3 with ∇f(a)≠O\nabla f(a) \ne O. By the theorem, the tangent vectors at aa of all curves lying in L(c)L(c) are perpendicular to ∇f(a)\nabla f(a), so they all lie in the plane through aa with normal vector ∇f(a)\nabla f(a). (That they fill the whole plane, that is, that every direction in the plane is the velocity of some curve on the surface, is the content of the implicit function theorem, which comes later; Apostol assumes it in 8.16.) This plane is the tangent plane of the surface at aa:

    ∇f(a)⋅(x−a)=0,that is,D1f(a)(x−a1)+D2f(a)(y−a2)+D3f(a)(z−a3)=0.\nabla f(a)\cdot(x - a) = 0, \quad\text{that is,}\quad D_1f(a)(x - a_1) + D_2f(a)(y - a_2) + D_3f(a)(z - a_3) = 0.

    For a level curve of a field on R2\mathbb R^2 the same formula gives the tangent line. For the graph z=f(x,y)z = f(x, y), view it as the level set F=0F = 0 of F(x,y,z)=f(x,y)−zF(x, y, z) = f(x, y) - z, with ∇F=(fx,fy,−1)\nabla F = (f_x, f_y, -1): the tangent plane is z=f(a1,a2)+∇f(a1,a2)⋅((x,y)−(a1,a2))z = f(a_1, a_2) + \nabla f(a_1, a_2)\cdot\big((x, y) - (a_1, a_2)\big), the graph of the linearization.

    In one lineFor a level surface f(x,y,z)=cf(x, y, z) = c and a point aa on it with ∇f(a)≠O\nabla f(a) \ne O, the tangent plane is {x:∇f(a)⋅(x−a)=0}\{x : \nabla f(a)\cdot(x - a) = 0\}; in the plane the tangent line to a level curve is defined the same way.

    Why it existsIt is the plane that contains the tangent vector of every curve on the surface through aa; for a graph it is the plane of the linearization.

    Quick checkFor f(x,y)=xyf(x, y) = xy, the level curve through (1,1)(1, 1) is xy=1xy = 1. In which direction does it run at (1,1)(1, 1)?
    Worked example Lecture 22
    Find the tangent plane to x2+y2+(z/2)2=94x^2 + y^2 + (z/2)^2 = \frac94 at a=(1,1,1)a = (1, 1, 1).

    Solution.

    1. Check that aa is on the surface. 1+1+14=941 + 1 + \frac14 = \frac94. f(x,y,z)=x2+y2+(z/2)2f(x, y, z) = x^2 + y^2 + (z/2)^2 and c=94c = \frac94.
    2. Gradient. ∇f=(2x,2y,z/2)\nabla f = (2x, 2y, z/2), so ∇f(a)=(2,2,12)\nabla f(a) = (2, 2, \frac12). The normal vector.
    3. Plane. 2(x−1)+2(y−1)+12(z−1)=02(x - 1) + 2(y - 1) + \frac12(z - 1) = 0, that is 2x+2y+12z=922x + 2y + \frac12z = \frac92. 2+2+12=922 + 2 + \frac12 = \frac92.

    Answer. 2x+2y+12z=922x + 2y + \frac12z = \frac92. (It is linear in x,y,zx, y, z; if yours has squares, you made a slip, as Spagnolie said. And it does not pass through the origin, so it is not a subspace.)

    Worked example Practice Final 2013, problem 5
    Write an equation of the plane tangent to the surface x3y+z2=3x^3y + z^2 = 3 at a=(−1,1,2)a = (-1, 1, 2).

    Solution.

    1. Check. (−1)3⋅1+4=3(-1)^3\cdot1 + 4 = 3. aa lies on the surface.
    2. Gradient. ∇(x3y+z2)=(3x2y, x3, 2z)\nabla(x^3y + z^2) = (3x^2y,\ x^3,\ 2z), which at aa is (3,−1,4)(3, -1, 4).
    3. Plane. 3(x+1)−(y−1)+4(z−2)=03(x + 1) - (y - 1) + 4(z - 2) = 0, that is 3x−y+4z=43x - y + 4z = 4. −3−1+8=4-3 - 1 + 8 = 4 is the check that aa satisfies the equation.

    Answer. 3x−y+4z=43x - y + 4z = 4.

    Worked example MATH 375 HW 13 (Apostol 8.17 #4)
    Find a normal vector to the surface z=x2+y2+(x2+y2)3/2z = \sqrt{x^2 + y^2} + (x^2 + y^2)^{3/2} at a general point other than the origin, and the limit of the cosine of its angle with the zz-axis as the point tends to the origin.

    Solution.

    1. Make it a level set. G(x,y,z)=x2+y2+(x2+y2)3/2−z=0G(x, y, z) = \sqrt{x^2 + y^2} + (x^2 + y^2)^{3/2} - z = 0. A graph z=h(x,y)z = h(x, y) is the zero level set of h−zh - z.
    2. Gradient. With ρ=x2+y2\rho = \sqrt{x^2 + y^2}: Gx=xρ+3ρx=x(1+3ρ2)ρG_x = \dfrac{x}{\rho} + 3\rho x = \dfrac{x(1 + 3\rho^2)}{\rho}, similarly Gy=y(1+3ρ2)ρG_y = \dfrac{y(1 + 3\rho^2)}{\rho}, and Gz=−1G_z = -1. ∂ρ∂x=xρ\frac{\partial\rho}{\partial x} = \frac x\rho (5.2).
    3. Normal vector. V=∇G=1+3ρ2ρ(x,y,0)+(0,0,−1)V = \nabla G = \dfrac{1 + 3\rho^2}{\rho}(x, y, 0) + (0, 0, -1); any scalar multiple will do. Normal to the tangent plane at each point.
    4. Length. ∥(Gx,Gy)∥=(1+3ρ2)ρ⋅ρ=1+3ρ2\lVert(G_x, G_y)\rVert = \dfrac{(1 + 3\rho^2)}{\rho}\cdot\rho = 1 + 3\rho^2, so ∥V∥2=(1+3ρ2)2+1\lVert V \rVert^2 = (1 + 3\rho^2)^2 + 1. ∥(x,y)∥=ρ\lVert(x, y)\rVert = \rho.
    5. Cosine with the zz-axis. cos⁡θ=∣V⋅k∣∥V∥=1(1+3ρ2)2+1\cos\theta = \dfrac{|V\cdot\mathbf k|}{\lVert V \rVert} = \dfrac1{\sqrt{(1 + 3\rho^2)^2 + 1}} (taking the angle with the upward normal), which tends to 12\dfrac1{\sqrt2} as ρ→0\rho \to 0. Set ρ=0\rho = 0.

    Answer. V=((1+3ρ2)xρ, (1+3ρ2)yρ, −1)V = \Big(\dfrac{(1 + 3\rho^2)x}{\rho},\ \dfrac{(1 + 3\rho^2)y}{\rho},\ -1\Big) and cos⁡θ→12\cos\theta \to \dfrac1{\sqrt2}, so θ→π4\theta \to \frac\pi4: near the origin the surface is cone-like, with slope 45∘45^\circ (it behaves like z≈ρz \approx \rho).

    Worked example MATH 375 HW 13 (Apostol 8.17 #8); the printed key writes $a^2$ for $a^3$ by mistake
    Find the tangent plane to xyz=a3xyz = a^3 at (x0,y0,z0)(x_0, y_0, z_0) and show the tetrahedron it cuts from the first octant has volume 92a3\frac92a^3.

    Solution.

    1. Gradient. ∇(xyz)=(yz,xz,xy)\nabla(xyz) = (yz, xz, xy), so at the point it is (y0z0, x0z0, x0y0)(y_0z_0,\ x_0z_0,\ x_0y_0). The normal vector.
    2. Plane. y0z0(x−x0)+x0z0(y−y0)+x0y0(z−z0)=0y_0z_0(x - x_0) + x_0z_0(y - y_0) + x_0y_0(z - z_0) = 0. Expand and use x0y0z0=a3x_0y_0z_0 = a^3: y0z0x+x0z0y+x0y0z=3x0y0z0y_0z_0x + x_0z_0y + x_0y_0z = 3x_0y_0z_0. Each of the three terms contributes −x0y0z0-x_0y_0z_0 on the right.
    3. Divide by x0y0z0x_0y_0z_0. xx0+yy0+zz0=3\dfrac x{x_0} + \dfrac y{y_0} + \dfrac z{z_0} = 3. The intercept form of a plane.
    4. Intercepts. (3x0,0,0)(3x_0, 0, 0), (0,3y0,0)(0, 3y_0, 0), (0,0,3z0)(0, 0, 3z_0). Set two of x,y,zx, y, z to 00.
    5. Volume. 13⋅base⋅height=13⋅12(3x0)(3y0)⋅3z0=276x0y0z0=92a3\frac13\cdot\text{base}\cdot\text{height} = \frac13\cdot\frac12(3x_0)(3y_0)\cdot3z_0 = \frac{27}6x_0y_0z_0 = \frac92a^3. A tetrahedron with three mutually perpendicular edges of lengths p,q,sp, q, s has volume pqs6\frac{pqs}6.

    Answer. xx0+yy0+zz0=3\frac x{x_0} + \frac y{y_0} + \frac z{z_0} = 3; the volume is 92a3\frac92a^3, independent of the point.

    Worked example
    Find the tangent plane to the graph z=excos⁡yz = e^x\cos y at the point (0,0,1)(0, 0, 1).

    Solution.

    1. Check the point. e0cos⁡0=1e^0\cos 0 = 1, so (0,0,1)(0, 0, 1) is on the graph. The third coordinate must equal f(0,0)f(0, 0).
    2. Partials of f(x,y)=excos⁡yf(x, y) = e^x\cos y. fx=excos⁡yf_x = e^x\cos y and fy=−exsin⁡yf_y = -e^x\sin y, which at (0,0)(0, 0) are 11 and 00. Both partials are continuous, so ff is differentiable there and the linearization is the tangent plane.
    3. Use the graph formula. z=f(0,0)+fx(0,0) (x−0)+fy(0,0) (y−0)=1+xz = f(0, 0) + f_x(0, 0)\,(x - 0) + f_y(0, 0)\,(y - 0) = 1 + x. The tangent plane of a graph is the graph of the linearization.
    4. Cross-check as a level surface. With G(x,y,z)=excos⁡y−zG(x, y, z) = e^x\cos y - z we have ∇G(0,0,1)=(1,0,−1)\nabla G(0, 0, 1) = (1, 0, -1), and 1⋅x+0⋅y−1⋅(z−1)=01\cdot x + 0\cdot y - 1\cdot(z - 1) = 0 gives the same plane z=1+xz = 1 + x. The two descriptions of a tangent plane agree, as the definition promised.

    Answer. z=1+xz = 1 + x, that is x−z=−1x - z = -1.

    Worked example Apostol 8.17 #3(a); the printed answer is $-\frac23$
    Find the directional derivative of f(x,y,z)=3x−5y+2zf(x, y, z) = 3x - 5y + 2z at (2,2,1)(2, 2, 1) in the direction of the outward normal to the sphere x2+y2+z2=9x^2 + y^2 + z^2 = 9.

    Solution.

    1. Check the point is on the sphere. 4+4+1=94 + 4 + 1 = 9. Otherwise “the normal to the sphere at the point” would make no sense.
    2. Find the normal. The sphere is the level set g=9g = 9 of g(x,y,z)=x2+y2+z2g(x, y, z) = x^2 + y^2 + z^2, and ∇g=(2x,2y,2z)\nabla g = (2x, 2y, 2z) is (4,4,2)(4, 4, 2) at the point. The gradient is perpendicular to the level surface. It points outward because gg grows as we move away from the origin.
    3. Make it a unit vector. ∥(4,4,2)∥=36=6\lVert(4, 4, 2)\rVert = \sqrt{36} = 6, so u=(4,4,2)6=(2,2,1)3u = \dfrac{(4, 4, 2)}{6} = \dfrac{(2, 2, 1)}{3}. A directional derivative needs a unit vector. Here the outward normal is the position vector divided by the radius 33.
    4. Gradient of ff. ff is linear, so ∇f=(3,−5,2)\nabla f = (3, -5, 2) at every point. The linear field a⋅xa\cdot x has gradient aa (example in 5.2).
    5. Dot. f′(a;u)=∇f⋅u=3⋅2−5⋅2+2⋅13=−23f'(a; u) = \nabla f\cdot u = \dfrac{3\cdot2 - 5\cdot2 + 2\cdot1}{3} = \dfrac{-2}{3}. Differentiable, so f′(a;u)=∇f(a)⋅uf'(a; u) = \nabla f(a)\cdot u.

    Answer. −23-\dfrac23, which is the answer printed at the back of the book. The negative sign says ff decreases as we leave the sphere in the outward direction.

    Worked example Apostol 8.17 #10, with new numbers
    Find cc so that the spheres x2+y2+z2=4x^2 + y^2 + z^2 = 4 and (x−c)2+y2+z2=1(x - c)^2 + y^2 + z^2 = 1 meet at right angles: at every common point their tangent planes are perpendicular.

    Solution.

    1. Normals. Take the spheres as level sets. The normal of the first at (x,y,z)(x, y, z) is V1=2(x,y,z)V_1 = 2(x, y, z), and of the second V2=2(x−c,y,z)V_2 = 2(x - c, y, z). Gradients of the two defining expressions.
    2. Perpendicular planes. Two planes are perpendicular exactly when their normals are, so we need V1⋅V2=0V_1\cdot V_2 = 0: x(x−c)+y2+z2=0x(x - c) + y^2 + z^2 = 0, that is (x2+y2+z2)−cx=0(x^2 + y^2 + z^2) - cx = 0. Dot product of the normals.
    3. Use the first sphere. x2+y2+z2=4x^2 + y^2 + z^2 = 4, so the condition is 4−cx=04 - cx = 0, that is cx=4cx = 4 at every common point. The point is on the first sphere.
    4. Use the second sphere. Expanding, x2+y2+z2−2cx+c2=1x^2 + y^2 + z^2 - 2cx + c^2 = 1, so 4−2cx+c2=14 - 2cx + c^2 = 1. With cx=4cx = 4 this is 4−8+c2=14 - 8 + c^2 = 1. The point is also on the second sphere, and step 3 gives the value of cxcx.
    5. Solve. c2=5c^2 = 5, so c=±5c = \pm\sqrt5. Check with geometry: spheres meet at right angles when the distance between centres satisfies d2=r12+r22d^2 = r_1^2 + r_2^2, here c2=4+1c^2 = 4 + 1.

    Answer. c=±5c = \pm\sqrt5.

    Worked example Apostol 8.17 #9, with new surfaces
    Find a pair of linear equations for the line tangent to both surfaces x2+y2+z2=3x^2 + y^2 + z^2 = 3 and z=xyz = xy at the point (1,1,1)(1, 1, 1).

    Solution.

    1. Check the point. 1+1+1=31 + 1 + 1 = 3 and 1⋅1=11\cdot1 = 1. It lies on both surfaces.
    2. First tangent plane. ∇(x2+y2+z2)=(2,2,2)\nabla(x^2 + y^2 + z^2) = (2, 2, 2) at the point, so the plane is 2(x−1)+2(y−1)+2(z−1)=02(x - 1) + 2(y - 1) + 2(z - 1) = 0, that is x+y+z=3x + y + z = 3. Tangent plane of a level surface.
    3. Second tangent plane. Write z=xyz = xy as the level set of G=xy−zG = xy - z at 00: ∇G=(y,x,−1)=(1,1,−1)\nabla G = (y, x, -1) = (1, 1, -1), so (x−1)+(y−1)−(z−1)=0(x - 1) + (y - 1) - (z - 1) = 0, that is x+y−z=1x + y - z = 1. The graph is a level set of f(x,y)−zf(x, y) - z.
    4. The common tangent line lies in both planes. Its equations are the two plane equations together. A line tangent to both surfaces has its direction perpendicular to both normals, so it lies in both tangent planes.
    5. Check the direction. A direction (p,q,r)(p, q, r) perpendicular to both normals needs p+q+r=0p + q + r = 0 and p+q−r=0p + q - r = 0, so r=0r = 0 and q=−pq = -p: the line runs in the direction (−1,1,0)(-1, 1, 0). Moving by (−1,1,0)(-1, 1, 0) keeps both x+y+zx + y + z and x+y−zx + y - z fixed, so we stay in both planes.

    Answer. x+y+z=3x + y + z = 3 and x+y−z=1x + y - z = 1 (the line through (1,1,1)(1, 1, 1) with direction (−1,1,0)(-1, 1, 0)).

    Watch out· Partial derivatives are not enough for a tangent plane

    For f=∣xy∣f = \sqrt{|xy|} both partial derivatives are 00 at the origin, which suggests the tangent plane z=0z = 0. But cutting the graph by the plane x=yx = y gives z=∣x∣z = |x|, which has a corner (5.2, stretch problem; Apostol 8.17 #6). The surface has no tangent plane at the origin because ff is not differentiable there. The tangent plane exists exactly when the field is differentiable.

    Vector fields and the Jacobian at work

    Worked example Lecture 23 (polar coordinates); Jacobi 1841
    Find the Jacobian matrix of the polar-coordinate map P(r,θ)=(rcos⁡θ, rsin⁡θ)P(r, \theta) = (r\cos\theta,\ r\sin\theta) and its determinant.

    Solution.

    1. Components. x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta. P:R2→R2P: \mathbb R^2 \to \mathbb R^2, so the Jacobian is 2×22 \times 2.
    2. Partials. ∂x∂r=cos⁡θ\dfrac{\partial x}{\partial r} = \cos\theta, ∂x∂θ=−rsin⁡θ\dfrac{\partial x}{\partial\theta} = -r\sin\theta, ∂y∂r=sin⁡θ\dfrac{\partial y}{\partial r} = \sin\theta, ∂y∂θ=rcos⁡θ\dfrac{\partial y}{\partial\theta} = r\cos\theta.
    3. Matrix. JP=[cos⁡θ−rsin⁡θsin⁡θrcos⁡θ]J_P = \begin{bmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{bmatrix}. Row 1: gradient of xx; row 2: gradient of yy.
    4. Determinant. det⁡JP=rcos⁡2θ+rsin⁡2θ=r\det J_P = r\cos^2\theta + r\sin^2\theta = r. cos⁡2+sin⁡2=1\cos^2 + \sin^2 = 1.

    Answer. det⁡JP=r\det J_P = r. A small rectangle of sides drdr and dθd\theta is sent to a patch of area about r dr dθr\,dr\,d\theta: the factor rr in the area element of polar coordinates. For example the quarter-annulus 1≤r≤21 \le r \le 2, 0≤θ≤π20 \le \theta \le \frac\pi2 has area ∫ ⁣ ⁣∫r dr dθ=π2⋅4−12=3π4\int\!\!\int r\,dr\,d\theta = \frac\pi2\cdot\frac{4 - 1}2 = \frac{3\pi}4, which is 14π(22−12)\frac14\pi(2^2 - 1^2).

    Your answerThe Jacobian determinant of the polar-coordinate map is rr. At the point r=3r = 3, by what factor are small areas multiplied?
    Worked example MATH 375 HW 13 (Apostol 8.22 #13)
    (a) If f(x,y,z)=(x,y,z)f(x, y, z) = (x, y, z), show Df=IDf = I. (b) Find all differentiable f:R3→R3f: \mathbb R^3 \to \mathbb R^3 with Df=IDf = I. (c) Find all those with DfDf diagonal, diag⁡(p(x),q(y),r(z))\operatorname{diag}(p(x), q(y), r(z)).

    Solution.

    1. (a) (Df)ij=Djfi(Df)_{ij} = D_jf_i with f1=xf_1 = x, f2=yf_2 = y, f3=zf_3 = z: Djfi=1D_jf_i = 1 if i=ji = j and 00 otherwise. So Df=IDf = I. The identity field has the identity matrix as its derivative, as a linear map is its own derivative.
    2. (b) Row by row. Df=IDf = I means D1f1=1D_1f_1 = 1, D2f1=D3f1=0D_2f_1 = D_3f_1 = 0. The last two say f1f_1 does not depend on yy or zz (a field with D2f1=D3f1=0D_2f_1 = D_3f_1 = 0 is constant in those variables on a ball, by the mean value theorem of 5.2), so f1=g(x)f_1 = g(x); then g′=1g' = 1, g=x+c1g = x + c_1. Integrate the one-variable equation.
    3. (b) The other rows. Likewise f2=y+c2f_2 = y + c_2 and f3=z+c3f_3 = z + c_3. So f(x,y,z)=(x,y,z)+cf(x, y, z) = (x, y, z) + c for a constant vector cc. Translations are the only fields whose derivative is the identity everywhere.
    4. (c) Off-diagonal entries 00 mean f1f_1 depends only on xx, f2f_2 only on yy, f3f_3 only on zz, with f1′=pf_1' = p, f2′=qf_2' = q, f3′=rf_3' = r. So f=(P(x), Q(y), R(z))f = (P(x),\ Q(y),\ R(z)) with P′=pP' = p, Q′=qQ' = q, R′=rR' = r: antiderivatives, each up to a constant. The key stops at “f_i depends on one variable”; the last step is the fundamental theorem of calculus (1.5).

    Answer. (a) Df=IDf = I. (b) f(x)=x+cf(x) = x + c. (c) f(x,y,z)=(P(x),Q(y),R(z))f(x, y, z) = (P(x), Q(y), R(z)) where P,Q,RP, Q, R are antiderivatives of p,q,rp, q, r.

    Same idea elsewhere· Lecture 19's fluid flow was a Jacobian all along

    In the first Lecture 19, the velocity of a steady linear flow is u(x)=xAu(x) = xA for a matrix AA (a row vector times AA). As a column, u=ATxu = A^{\mathsf T}x, a linear field, so by the example above its Jacobian is the constant matrix ATA^{\mathsf T}. Splitting AA into its symmetric and antisymmetric parts E+RE + R is splitting the Jacobian of the velocity field into stretching (the symmetric part, whose eigenvectors are the axes along which a ball of fluid is stretched or squeezed) and rotation (the antisymmetric part). The picture above, with the field (2x+y,x+2y)(2x + y, x + 2y), is exactly the lecture’s example: A=[2112]A = \begin{bmatrix}2 & 1\\ 1 & 2\end{bmatrix}, eigenvalues 33 and 11, directions (1,1)(1, 1) and (1,−1)(1, -1). A circle of fluid becomes an ellipse stretched most along the diagonal.

    Where it is used

    Used inside maths· Inside maths: the chain rule, the inverse function theorem, and changes of variables

    The next chapter (5.4) proves the chain rule D(F∘G)(a)=DF(G(a)) DG(a)D(F \circ G)(a) = DF(G(a))\,DG(a): the Jacobian of a composition is the product of the Jacobians, with the same proof idea as the one-variable chain rule of 1.4 now that “derivative” means “linear map”. The inverse function theorem says a C1C^1 map F:Rn→RnF: \mathbb R^n \to \mathbb R^n with det⁡DF(a)≠0\det DF(a) \ne 0 is invertible near aa: a map that is locally a good linear map with an invertible matrix is locally invertible. The determinant is the factor in the change of variables formula for integrals (the rr of polar coordinates). Total derivatives also give the second-order Taylor formula (the Hessian, 5.6), and the second-derivative test combines this with the eigenvalues of 3.1 and 3.2.

    Used in the real world· Robotics, fluids and AI: the Jacobian as 'speed in, speed out'

    A robot arm with two links of length 1 m has joint angles θ1,θ2\theta_1, \theta_2 and hand position (x,y)=(cos⁡θ1+cos⁡(θ1+θ2), sin⁡θ1+sin⁡(θ1+θ2))(x, y) = (\cos\theta_1 + \cos(\theta_1 + \theta_2),\ \sin\theta_1 + \sin(\theta_1 + \theta_2)). Its Jacobian is

    J=[−sin⁡θ1−sin⁡(θ1+θ2)−sin⁡(θ1+θ2)cos⁡θ1+cos⁡(θ1+θ2)cos⁡(θ1+θ2)],det⁡J=sin⁡θ2.J = \begin{bmatrix}-\sin\theta_1 - \sin(\theta_1 + \theta_2) & -\sin(\theta_1 + \theta_2)\\ \cos\theta_1 + \cos(\theta_1 + \theta_2) & \cos(\theta_1 + \theta_2)\end{bmatrix},\qquad \det J = \sin\theta_2.

    At θ1=0\theta_1 = 0, θ2=π2\theta_2 = \frac\pi2 the matrix is [−1−110]\begin{bmatrix}-1 & -1\\ 1 & 0\end{bmatrix} and joint speeds (0.1,0.2)(0.1, 0.2) rad/s move the hand at J (0.1,0.2)=(−0.3,0.1)J\,(0.1, 0.2) = (-0.3, 0.1) m/s. When the arm is stretched out straight (θ2=0\theta_2 = 0), det⁡J=0\det J = 0: the hand cannot move along the arm, and no joint speeds produce such a motion. These are the singular positions that robot controllers avoid, found by solving det⁡J=0\det J = 0.

    In fluid mechanics (Lecture 19) the Jacobian of the velocity field is the velocity gradient: its trace is the rate at which volume grows, and for u=xAu = xA with A=[210120000]A = \begin{bmatrix}2&1&0\\1&2&0\\0&0&0\end{bmatrix} (eigenvalues 3,1,03, 1, 0) a unit ball of fluid becomes, after time tt, an ellipsoid with semi-axes e3t,et,1e^{3t}, e^{t}, 1; at t=0.5t = 0.5 they are 4.48,1.65,14.48, 1.65, 1 and the volume has grown by e4t=e2≈7.39e^{4t} = e^2 \approx 7.39. In machine learning, a layer h↦σ(Wh+b)h \mapsto \sigma(Wh + b) is a differentiable map whose Jacobian is diag⁡(σ′) W\operatorname{diag}(\sigma')\,W; backpropagation (3.8) multiplies these Jacobians from the loss backwards.

    Traps

    Watch out· The derivative is a map, not a number

    For F:Rn→RmF: \mathbb R^n \to \mathbb R^m the derivative at aa is a linear map (an m×nm \times n matrix of numbers). The gradient ∇f(a)\nabla f(a) is a column (n×1n \times 1), the Jacobian of the same ff is the row ∇f(a)T\nabla f(a)^{\mathsf T} (1×n1 \times n). Check shapes before multiplying.

    Watch out· Existing partial derivatives do not give the total derivative

    Having ∇f(a)\nabla f(a) is not the same as being differentiable. Differentiability needs the error to be small along every path. Continuous partials near aa is a quick sufficient test; it is not necessary, and failing it proves nothing.

    Watch out· Non-smooth level sets do not mean non-differentiable

    Fall 2025 final, true or false: “if the level sets of ff are not smooth then ff is not differentiable” is false. Take f(x)=e−1/xf(x) = e^{-1/x} for x>0x > 0 and f(x)=0f(x) = 0 for x≤0x \le 0, infinitely differentiable, whose zero level set is a half-line that stops abruptly; and f(x)f(y)f(x)f(y) has level sets with corners. The theorem that level sets are smooth surfaces needs ∇f≠O\nabla f \ne O (the implicit function theorem), and the theorem says nothing when ∇f=O\nabla f = O.

    Watch out· Divide by the length of the step, not by the step

    The error condition is ∥error∥∥v∥→0\frac{\lVert\text{error}\rVert}{\lVert v \rVert} \to 0. You cannot divide by a vector. A bound such as “error ≤C∥v∥2\le C\lVert v \rVert^2” suffices.

    Watch out· Do not forget the explicit time variable

    If the field depends on time as well as position, the derivative along the path has an extra term ftf_t (the buoy on the final). The velocity of the curve (X(t),Y(t),t)(X(t), Y(t), t) in space-time has a last entry 11.

    Watch out· A tangent plane needs a nonzero gradient

    If ∇f(a)=O\nabla f(a) = O then ∇f(a)⋅(x−a)=0\nabla f(a)\cdot(x - a) = 0 is not a plane. The level set can have a corner or a crossing there: the level set of x2−y2x^2 - y^2 through the origin is two crossing lines.

    Problems

    check

    State F′(a)F'(a) (as a matrix) for F(x,y)=(3x−y, 2y, x+5y)F(x, y) = (3x - y,\ 2y,\ x + 5y).

    Solution

    FF is linear, F(x)=AxF(x) = Ax with A=[3−10215]A = \begin{bmatrix}3 & -1\\ 0 & 2\\ 1 & 5\end{bmatrix}, so F′(a)=AF'(a) = A for every aa. It is 3×23 \times 2: three outputs, two inputs.

    check

    Find the Jacobian of F(x,y)=(x2y, x+y)F(x, y) = (x^2y,\ x + y) at (1,2)(1, 2) and the linearization there.

    Solution

    DF=[2xyx211]DF = \begin{bmatrix}2xy & x^2\\ 1 & 1\end{bmatrix}, so DF(1,2)=[4111]DF(1, 2) = \begin{bmatrix}4 & 1\\ 1 & 1\end{bmatrix} and F(1,2)=(2,3)F(1, 2) = (2, 3). L(x,y)=(2+4(x−1)+(y−2), 3+(x−1)+(y−2))L(x, y) = \big(2 + 4(x - 1) + (y - 2),\ 3 + (x - 1) + (y - 2)\big).

    check

    Find the tangent plane to the graph z=x2+y2z = x^2 + y^2 at (1,2,5)(1, 2, 5).

    Solution

    f=x2+y2f = x^2 + y^2, ∇f(1,2)=(2,4)\nabla f(1, 2) = (2, 4), so z=5+2(x−1)+4(y−2)z = 5 + 2(x - 1) + 4(y - 2), that is 2x+4y−z=52x + 4y - z = 5.

    checkMATH 375 HW 12 (Apostol 8.14 #11)

    True or false: if ff has continuous partial derivatives near aa, then ff is continuous at aa. Is the converse true?

    Solution

    True: continuous partials imply differentiable, and differentiable implies continuous. The converse is false: ∥x∥\lVert x \rVert is continuous at the origin but its partials do not exist there.

    useMATH 375 HW 13 (Apostol 8.17 #10)

    Find the constant cc such that at any intersection point of the spheres (x−c)2+y2+z2=3(x - c)^2 + y^2 + z^2 = 3 and x2+(y−1)2+z2=1x^2 + (y - 1)^2 + z^2 = 1 the tangent planes are perpendicular.

    Solution

    Normals: V1=2(x−c,y,z)V_1 = 2(x - c, y, z) and V2=2(x,y−1,z)V_2 = 2(x, y - 1, z). The planes are perpendicular exactly when V1⋅V2=0V_1\cdot V_2 = 0, that is x(x−c)+y(y−1)+z2=0x(x - c) + y(y - 1) + z^2 = 0. Expanding the second sphere, x2+y2−2y+1+z2=1x^2 + y^2 - 2y + 1 + z^2 = 1, gives x2+y2+z2=2yx^2 + y^2 + z^2 = 2y. Substituting this into the condition: 2y−cx−y=02y - cx - y = 0, so y=cxy = cx. So every intersection point must lie on the plane y=cxy = cx. Now expand the first sphere, x2−2cx+c2+y2+z2=3x^2 - 2cx + c^2 + y^2 + z^2 = 3, and substitute x2+y2+z2=2yx^2 + y^2 + z^2 = 2y: 2y−2cx+c2=32y - 2cx + c^2 = 3. With y=cxy = cx the xx-terms cancel and c2=3c^2 = 3, so c=±3c = \pm\sqrt3. (Check: two spheres meet at right angles exactly when d2=r12+r22d^2 = r_1^2 + r_2^2 for the distance dd between their centres (c,0,0)(c, 0, 0) and (0,1,0)(0, 1, 0); here c2+1=3+1c^2 + 1 = 3 + 1. Apostol’s answer is the same.)

    useApostol 8.17 #9

    Find a pair of linear equations for the line tangent to both surfaces x2+y2+2z2=4x^2 + y^2 + 2z^2 = 4 and z=ex−yz = e^{x - y} at the point (1,1,1)(1, 1, 1).

    Solution

    Both surfaces pass through (1,1,1)(1, 1, 1) (1+1+2=41 + 1 + 2 = 4 and e0=1e^0 = 1). First surface G1=x2+y2+2z2G_1 = x^2 + y^2 + 2z^2: ∇G1=(2x,2y,4z)=(2,2,4)\nabla G_1 = (2x, 2y, 4z) = (2, 2, 4), tangent plane 2(x−1)+2(y−1)+4(z−1)=02(x - 1) + 2(y - 1) + 4(z - 1) = 0, that is x+y+2z=4x + y + 2z = 4. Second surface G2=z−ex−yG_2 = z - e^{x - y}: ∇G2=(−ex−y,ex−y,1)=(−1,1,1)\nabla G_2 = (-e^{x - y}, e^{x - y}, 1) = (-1, 1, 1), tangent plane −(x−1)+(y−1)+(z−1)=0-(x - 1) + (y - 1) + (z - 1) = 0, that is −x+y+z=1-x + y + z = 1. The common tangent line lies in both planes: x+y+2z=4x + y + 2z = 4, −x+y+z=1-x + y + z = 1.

    useApostol 8.17 #7

    Show that the tangent plane to the surface z=xyz = xy at a point (x0,y0,z0)(x_0, y_0, z_0) contains the two lines y=y0, z=y0xy = y_0,\ z = y_0x and x=x0, z=x0yx = x_0,\ z = x_0y.

    Solution

    Plane: z=x0y0+y0(x−x0)+x0(y−y0)z = x_0y_0 + y_0(x - x_0) + x_0(y - y_0) (graph of the linearization, ∇(xy)=(y,x)\nabla(xy) = (y, x)). The first line has points (x,y0,y0x)(x, y_0, y_0x): substituting, the right side is x0y0+y0(x−x0)+0=y0xx_0y_0 + y_0(x - x_0) + 0 = y_0x, which equals zz. The second line has points (x0,y,x0y)(x_0, y, x_0y): the right side is x0y0+0+x0(y−y0)=x0yx_0y_0 + 0 + x_0(y - y_0) = x_0y, equal to zz. Both lines lie in the plane (and on the surface).

    useApostol 8.17 #3(b)

    Find the directional derivative of f(x,y,z)=x2−y2f(x, y, z) = x^2 - y^2 at a general point of the sphere x2+y2+z2=4x^2 + y^2 + z^2 = 4, in the direction of the outward normal at that point.

    Solution

    The outward normal is ∇(x2+y2+z2)=2(x,y,z)\nabla(x^2 + y^2 + z^2) = 2(x, y, z), of length 2x2+y2+z2=42\sqrt{x^2 + y^2 + z^2} = 4 on the sphere, so u=(x,y,z)2u = \frac{(x, y, z)}{2}. Also ∇f=(2x,−2y,0)\nabla f = (2x, -2y, 0). So f′(a;u)=2x⋅x−2y⋅y+02=x2−y2f'(a; u) = \frac{2x\cdot x - 2y\cdot y + 0}{2} = x^2 - y^2, which is Apostol’s answer.

    stretchApostol 8.17 #3(c)

    Find the directional derivative of f(x,y,z)=x2+y2−z2f(x, y, z) = x^2 + y^2 - z^2 at (3,4,5)(3, 4, 5) along the curve of intersection of the surfaces 2x2+2y2−z2=252x^2 + 2y^2 - z^2 = 25 and x2+y2=z2x^2 + y^2 = z^2.

    Solution

    Both surfaces contain (3,4,5)(3, 4, 5): 18+32−25=2518 + 32 - 25 = 25 and 9+16=259 + 16 = 25. The curve lies on both, so its tangent is perpendicular to both gradients (a curve in a level set has velocity perpendicular to the gradient). The normals are N1=(4x,4y,−2z)=(12,16,−10)N_1 = (4x, 4y, -2z) = (12, 16, -10) and N2=(2x,2y,−2z)=(6,8,−10)N_2 = (2x, 2y, -2z) = (6, 8, -10). We need T=(p,q,r)T = (p, q, r) with N1⋅T=12p+16q−10r=0N_1\cdot T = 12p + 16q - 10r = 0 and N2⋅T=6p+8q−10r=0N_2\cdot T = 6p + 8q - 10r = 0. Subtracting gives 6p+8q=06p + 8q = 0, so (p,q)=t(−4,3)(p, q) = t(-4, 3), and then r=0r = 0. So the unit tangent is ±(−4,3,0)/5\pm(-4, 3, 0)/5. Now ∇f=(2x,2y,−2z)=(6,8,−10)\nabla f = (2x, 2y, -2z) = (6, 8, -10), and ∇f⋅(−4,3,0)/5=−24+245=0\nabla f\cdot(-4, 3, 0)/5 = \frac{-24 + 24}{5} = 0. The answer is 00, as in Apostol. (The reason: f=x2+y2−z2f = x^2 + y^2 - z^2 is 00 on the second surface, so ff is constant along the curve.)

    use

    Using the Jacobian of the polar map, find the area of the region {1≤x2+y2≤4, x≥0, y≥0}\{1 \le x^2 + y^2 \le 4,\ x \ge 0,\ y \ge 0\}. How does the result relate to the area of a full disc of radius 2?

    Solution

    In polar coordinates the region is 1≤r≤21 \le r \le 2, 0≤θ≤π20 \le \theta \le \frac\pi2 and the area element is r dr dθr\,dr\,d\theta (the Jacobian determinant). Area =∫0π/2∫12r dr dθ=π2⋅4−12=3π4= \int_0^{\pi/2}\int_1^2r\,dr\,d\theta = \frac\pi2\cdot\frac{4 - 1}2 = \frac{3\pi}4. A full disc of radius 2 has area 4π4\pi; the region is the quarter (π\pi) of the disc minus the quarter of the unit disc (π4\frac\pi4): π−π4=3π4\pi - \frac\pi4 = \frac{3\pi}4. Same.

    prove

    Prove that if ff and gg are differentiable at aa with total derivatives TaT_a and SaS_a, then f+gf + g is differentiable at aa with total derivative Ta+SaT_a + S_a.

    Solution

    Plan. Add the two defining equations.

    f(a+v)=f(a)+Ta(v)+∥v∥Eff(a + v) = f(a) + T_a(v) + \lVert v \rVert E_f and g(a+v)=g(a)+Sa(v)+∥v∥Egg(a + v) = g(a) + S_a(v) + \lVert v \rVert E_g with Ef,Eg→0E_f, E_g \to 0. Adding: (f+g)(a+v)=(f+g)(a)+(Ta+Sa)(v)+∥v∥(Ef+Eg)(f + g)(a + v) = (f + g)(a) + (T_a + S_a)(v) + \lVert v \rVert(E_f + E_g). The sum of two linear maps is linear and Ef+Eg→0E_f + E_g \to 0. ■\blacksquare

    proveMATH 375 HW 12 (Apostol 8.14 #10a) via 5.2

    Prove: if ff is differentiable at every point of a ball B(a,r)B(a, r) and ∇f(x)=O\nabla f(x) = O for every xx in the ball, then ff is constant on the ball.

    Solution

    Plan. A differentiable field has f′(x;y)=∇f(x)⋅yf'(x; y) = \nabla f(x)\cdot y; here that is 00 for every yy, so the result of 5.2 applies.

    By the dot-product theorem, f′(x;y)=∇f(x)⋅y=0f'(x; y) = \nabla f(x)\cdot y = 0 for all xx in the ball and all yy. By the problem of 5.2 (mean value theorem for scalar fields applied on the segment from aa to xx, which lies in the ball), f(x)−f(a)=f′(z;x−a)=0f(x) - f(a) = f'(z; x - a) = 0. So f(x)=f(a)f(x) = f(a) for every xx in the ball. ■\blacksquare

    proveApostol 8.17 #11

    If r1,r2r_1, r_2 are the distances from a point (x,y)(x, y) of an ellipse to its foci F1,F2F_1, F_2, then r1+r2r_1 + r_2 is constant. Show that the unit tangent TT satisfies T⋅∇(r1+r2)=0T\cdot\nabla(r_1 + r_2) = 0, and deduce that the tangent makes equal angles with the lines to the two foci.

    Solution

    Plan. The ellipse is a level curve of r1+r2r_1 + r_2; the gradient of a distance is a unit vector pointing away from the focus.

    The ellipse is the level set r1+r2=constr_1 + r_2 = \text{const}, so by the theorem of this chapter the gradient is perpendicular to the tangent: T⋅∇(r1+r2)=0T\cdot\nabla(r_1 + r_2) = 0. By Apostol 8.14 #8 (5.2), ∇ri=ui\nabla r_i = u_i, the unit vector from the focus FiF_i to the point. So T⋅u1=−T⋅u2T\cdot u_1 = -T\cdot u_2, that is cos⁡α1=−cos⁡α2\cos\alpha_1 = -\cos\alpha_2 for the angles αi\alpha_i between TT and uiu_i. The angle between the tangent line and the segment from the point back to focus 1 equals the angle between the tangent line and the segment back to focus 2. This is the reflection property: light from one focus bounces off the ellipse to the other. ■\blacksquare

    proveApostol 8.17 #12

    If ∇f(x,y,z)\nabla f(x, y, z) is always parallel to r=(x,y,z)\mathbf r = (x, y, z), show that f(0,0,a)=f(0,0,−a)f(0, 0, a) = f(0, 0, -a).

    Solution

    Plan. Walk along a half-circle on the sphere of radius aa from (0,0,a)(0, 0, a) to (0,0,−a)(0, 0, -a) and show ff does not change.

    Let r(t)=(asin⁡t,0,acos⁡t)r(t) = (a\sin t, 0, a\cos t), 0≤t≤π0 \le t \le \pi. Then ∇f(r(t))=λ(t) r(t)\nabla f(r(t)) = \lambda(t)\,r(t) for some scalar λ(t)\lambda(t) (parallel to the position vector), and r′(t)=(acos⁡t,0,−asin⁡t)r'(t) = (a\cos t, 0, -a\sin t). By the path theorem ddtf(r(t))=λ(t) r(t)⋅r′(t)=λ(t)(a2sin⁡tcos⁡t−a2cos⁡tsin⁡t)=0\frac d{dt}f(r(t)) = \lambda(t)\,r(t)\cdot r'(t) = \lambda(t)\big(a^2\sin t\cos t - a^2\cos t\sin t\big) = 0. So f(r(t))f(r(t)) is constant on [0,π][0, \pi] (1.4), and f(r(0))=f(0,0,a)=f(r(π))=f(0,0,−a)f(r(0)) = f(0, 0, a) = f(r(\pi)) = f(0, 0, -a). ■\blacksquare

    proveMATH 375 HW 12 style (Apostol 8.14 #11, the non-implication (b) does not imply (d))

    Prove that f(x,y)=(x2+y2)sin⁡1x2+y2f(x, y) = (x^2 + y^2)\sin\dfrac1{x^2 + y^2} (with f(0,0)=0f(0, 0) = 0) is differentiable at the origin but its partial derivatives are not continuous there.

    Solution

    Plan. Differentiability by the size of ff; discontinuity by the explicit formula for fxf_x on the axis.

    Since ∣sin⁡∣≤1|\sin| \le 1, ∣f(v)∣≤∥v∥2|f(v)| \le \lVert v \rVert^2. So f(v)=f(0)+0⋅v+∥v∥E(v)f(v) = f(0) + 0\cdot v + \lVert v \rVert E(v) with E(v)=∥v∥sin⁡1∥v∥2E(v) = \lVert v \rVert\sin\frac1{\lVert v \rVert^2}, and ∣E∣≤∥v∥→0|E| \le \lVert v \rVert \to 0: differentiable at OO with TO=0T_O = 0, so ∇f(O)=O\nabla f(O) = O. For (x,y)≠O(x, y) \ne O, with ρ2=x2+y2\rho^2 = x^2 + y^2: fx=2xsin⁡1ρ2−2xρ2cos⁡1ρ2f_x = 2x\sin\frac1{\rho^2} - \frac{2x}{\rho^2}\cos\frac1{\rho^2}. On the xx-axis at xn=(2πn)−1/2x_n = (2\pi n)^{-1/2}: sin⁡1xn2=sin⁡2πn=0\sin\frac1{x_n^2} = \sin 2\pi n = 0 and cos⁡2πn=1\cos 2\pi n = 1, so fx(xn,0)=−2xn→−∞f_x(x_n, 0) = -\frac2{x_n} \to -\infty, not tending to fx(O)=0f_x(O) = 0. So fxf_x is not continuous at the origin. ■\blacksquare

    stretch

    Show that F(x,y)=(x2−y2, 2xy)F(x, y) = (x^2 - y^2,\ 2xy) has Jacobian determinant 4(x2+y2)4(x^2 + y^2) and that JFJ_F is always a scalar multiple of a rotation matrix. (Hint: compare FF with z↦z2z \mapsto z^2 for z=x+iyz = x + iy in the complex numbers of 0.6.)

    Solution

    JF=[2x−2y2y2x]J_F = \begin{bmatrix}2x & -2y\\ 2y & 2x\end{bmatrix} and det⁡JF=4x2+4y2\det J_F = 4x^2 + 4y^2. Writing 2x2+y2=s2\sqrt{x^2 + y^2} = s, JF=s[cos⁡ϕ−sin⁡ϕsin⁡ϕcos⁡ϕ]J_F = s\begin{bmatrix}\cos\phi & -\sin\phi\\ \sin\phi & \cos\phi\end{bmatrix} with (cos⁡ϕ,sin⁡ϕ)=(x,y)/x2+y2(\cos\phi, \sin\phi) = (x, y)/\sqrt{x^2 + y^2}: a rotation by ϕ\phi scaled by ss. So FF maps every tiny circle to a tiny circle, rotated by the argument of zz and scaled by 2∣z∣2|z|: this is the derivative of z2z^2, which is multiplication by 2z2z. The map preserves angles (is conformal), a property that holds for every complex-differentiable function.

    stretchPractice Final 2013, extra credit

    Is every C1C^1 vector field g:R2→R2g: \mathbb R^2 \to \mathbb R^2 the gradient of some scalar field? Show that g(x,y)=(−y,x)g(x, y) = (-y, x) is not a gradient of any twice continuously differentiable ff.

    Solution

    If g=∇fg = \nabla f with ff having continuous second partials, then g1=fxg_1 = f_x, g2=fyg_2 = f_y, so D2g1=fxyD_2g_1 = f_{xy} and D1g2=fyxD_1g_2 = f_{yx}, which are equal for continuous second partials (the equality theorem of 5.2’s box). For g=(−y,x)g = (-y, x): D2g1=−1D_2g_1 = -1 but D1g2=+1D_1g_2 = +1. They differ, so no such ff exists. The condition Djgi=DigjD_jg_i = D_ig_j is necessary; the field (−y,x)(-y, x) is the rotation field of the first picture, and going once around the origin with it never returns to the same “height”, which is why it cannot be the gradient of a function.

    Summary

    • A field FF is differentiable at aa if F(a+v)=F(a)+Ta(v)+∥v∥E(a,v)F(a + v) = F(a) + T_a(v) + \lVert v \rVert E(a, v) with TaT_a linear and E→0E \to 0 as v→0v \to 0. The linear map TaT_a is the total derivative F′(a)F'(a): the best linear approximation, with an error that is small compared with ∥v∥\lVert v \rVert.
    • If ff is differentiable, then f′(a;y)f'(a; y) exists for every yy and f′(a;y)=Ta(y)=∇f(a)⋅yf'(a; y) = T_a(y) = \nabla f(a)\cdot y. So TaT_a is unique and the gradient formula of 5.2 is a theorem. Differentiable fields are continuous.
    • A vector field is differentiable exactly when its components are, and the matrix of F′(a)F'(a) is the Jacobian matrix JF(a)J_F(a) with (i,j)(i, j) entry DjFi(a)D_jF_i(a): rows are gradients, columns are F′(a;ej)F'(a; e_j). For a scalar field it is the row ∇fT\nabla f^{\mathsf T}.
    • Continuous partial derivatives near aa imply differentiable at aa (Apostol 8.13, proved by moving one coordinate at a time with the one-variable mean value theorem). The converse fails. Chain of implications: C1⇒C^1 \Rightarrow differentiable ⇒\Rightarrow continuous and all directional derivatives exist; no arrow reverses (the table of HW 12).
    • The linearization L(x)=F(a)+F′(a)(x−a)L(x) = F(a) + F'(a)(x - a) is the best affine approximation; for a scalar field its graph is the tangent plane z=f(a)+∇f(a)⋅(x−a)z = f(a) + \nabla f(a)\cdot(x - a).
    • Along a curve, ddtf(r(t))=∇f(r(t))⋅r′(t)\frac d{dt}f(r(t)) = \nabla f(r(t))\cdot r'(t). Hence the gradient is perpendicular to every level set, and the tangent plane to f=cf = c at aa is ∇f(a)⋅(x−a)=0\nabla f(a)\cdot(x - a) = 0 (when ∇f(a)≠O\nabla f(a) \ne O).
    • The Jacobian determinant is the local area or volume scaling (the rr of polar coordinates); the chain rule of 5.4 multiplies Jacobians.

    Watch and read

    The same ideas explained by someone else. Use these when an explanation here does not land.

    Where this sits

    Comes from
    1.4 The derivative as best linear approximation
    2.3 Linear maps, null space, range, rank–nullity
    2.5 Matrices as maps, multiplication, change of basis
    3.8 Matrix calculus and backpropagation
    5.2 Directional derivatives, partial derivatives and the gradient
    Leads to
    5.4 The chain rule for fields
    Same idea elsewhere
    MATH 375: Lectures 21 to 23 and Apostol 8.11 to 8.19. The total derivative, differentiable implies continuous, the gradient and the Jacobian, tangent planes, the table of implications of homework 12 (8.14 #11), the derivative along a path of Lecture 22, and the linearisations of the final review are all worked below. Apostol's proof that continuous partials imply differentiability (8.13), which the lecture skipped, is given in full.
    MATH 521: 521 calls this the Fréchet derivative and proves the inverse and implicit function theorems from it. The statement 'the derivative is the unique linear map with error o(‖v‖)' is the definition there, in any normed space.
    MATH 340 / CS 532: A neural network layer is a differentiable map; its Jacobian is what backpropagation (3.8) multiplies. Newton's method for systems of equations solves J Δx = −F.
    Robotics: The Jacobian of the map from joint angles to hand position gives hand speed from joint speeds, and the places where its determinant is zero are the singular arm positions.