Survey of Mathematics
Unit 5

Differential calculus in many variables

The derivative as the best linear approximation, in any dimension.

10 chapters written · 46 definitions · 60 theorems · builds on Unit 1, Unit 2, Unit 4

The story

The derivative of a function of many variables is a linear map: the best linear approximation near a point. Unit 2 made that idea precise; this unit uses it. Partial derivatives and the gradient (5.2) are pieces of the derivative, the Jacobian (5.3) is its matrix, and the chain rule (5.4) is matrix multiplication.

From there: Taylor's theorem and the Hessian decide maxima and minima using eigenvalues (5.6), the inverse and implicit function theorems say when equations can be solved locally (5.7), and Lagrange multipliers handle constraints (5.8). The unit ends with partial differential equations (5.9) and gradient descent (5.10).

Chapters

  1. 5.1Scalar and vector fields, limits and continuityA field attaches a number or a vector to every point of space. Limits and continuity of fields are the limits of Unit 1 with the distance between points of the line replaced by the length of a vector, and the one new difficulty is that a point of the plane can be approached along infinitely many paths, all of which must agree.
  2. 5.2Directional derivatives, partial derivatives and the gradientTo differentiate a function of many variables, pick a direction and ask the one-variable question along that line. The answers for the coordinate directions are the partial derivatives; collected into a vector they form the gradient, which points uphill and is perpendicular to the level sets. But having a derivative in every direction does not even make a function continuous.
  3. 5.3The total derivative, the Jacobian matrix and tangent planesA 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.
  4. 5.4The chain rule for fieldsIf one field is fed into another, the derivative of the composite is the product of the two Jacobian matrices, the outer one evaluated at the image point. This one rule gives the derivative along a path, the formulas for changing coordinates, the derivative of an inverse (the inverse matrix), and, applied twice, the second derivatives of a composite.
  5. 5.5Higher partial derivatives and the equality of mixed partialsDifferentiate a field twice and there are n² second partials, but for any field you will meet they come in equal pairs, f_xy = f_yx. This chapter proves that (Schwarz, Clairaut) with the mean value theorem on a rectangle, shows the function where it fails, and records what the pairing buys. It also sharpens the test of 5.3 for differentiability.
  6. 5.6Taylor's formula, the Hessian and extremaNear a point, a C² field equals its value, plus its gradient dotted with the step, plus half a quadratic form in the step whose symmetric matrix is the Hessian. At a critical point the gradient term is zero, so the sign of the quadratic form, read off from the Hessian's eigenvalues by the spectral theorem, decides between maximum, minimum and saddle. Absolute extrema on a closed bounded set are found by comparing the critical points with the boundary.
  7. 5.7Inverse and implicit functionsA field whose Jacobian matrix is invertible at a point can be undone near that point by a differentiable inverse, because the best linear approximation can be undone and a contraction argument carries the undoing over to the field itself. Applied to the map (x, y) to (x, F(x, y)) it says that an equation F(x, y) = 0 defines y as a differentiable function of x wherever the partial derivative F_y is not zero, and it gives the formula dy/dx = -F_x/F_y.
  8. 5.8Constrained extrema and Lagrange multipliersTo extremise a field f on the set where g = c, look for points where the gradient of f is a multiple of the gradient of g, because there the level curve of f touches the constraint without crossing it. The multiplier is a number you solve for, and it equals the rate at which the best value changes when the constraint moves. The proof reduces to an ordinary extremum by solving the constraint with the implicit function theorem, and a bordered Hessian decides between maximum and minimum.
  9. 5.9Partial differential equationsA partial differential equation relates the partial derivatives of an unknown function of several variables, and its solutions contain whole arbitrary functions instead of constants. A first-order linear equation with constant coefficients says the unknown is constant along straight characteristic lines. The wave equation splits into two such transport equations (d'Alembert), the heat equation smooths its data mode by mode (separation of variables), and the solutions of Laplace's equation obey a mean value property that forbids interior maxima.
  10. 5.10Gradient descent, momentum and Newton's methodTo minimise a function, repeatedly step against its gradient. On a quadratic the error after each step is multiplied by the matrix I minus eta times the Hessian, so the speed is set by the Hessian's eigenvalues and the condition number of 3.5, and the path zig-zags across narrow valleys. Momentum improves the rate from (k-1)/(k+1) to (sqrt k - 1)/(sqrt k + 1), stochastic gradients trade exactness for cost and leave a noise floor proportional to the step, Newton's method divides by the Hessian and converges quadratically near a minimum, and in high dimensions most critical points are saddles.

The theorem chain

Every theorem in the unit, in the order it is proved. Each one is used by the ones after it. The label says whether it is on the 375/376 exams (T), an Apostol extra (A), or beyond both (B).

5.1 Scalar and vector fields, limits and continuity

  1. Theorem · T Limit laws for fields If F→bF \to b and G→cG \to c as x→ax \to a, then F+G→b+cF + G \to b + c, λF→λb\lambda F \to \lambda b, F⋅G→b⋅cF \cdot G \to b \cdot c and ∥F∥→∥b∥\lVert F \rVert \to \lVert b \rVert.
  2. Theorem · T A field has a limit exactly when its components do F(x)→bF(x) \to b as x→ax \to a if and only if Fk(x)→bkF_k(x) \to b_k for every component kk.
  3. Theorem · T A limit forces the same value along every path If F(x)→bF(x) \to b as x→ax \to a and a path r(t)→ar(t) \to a with r(t)≠ar(t) \ne a, then F(r(t))→bF(r(t)) \to b along the path.
  4. Proposition · T Squeeze for fields If ∥F(x)−b∥≤φ(∥x−a∥)\lVert F(x) - b \rVert \le \varphi(\lVert x - a \rVert) near aa and φ(r)→0\varphi(r) \to 0 as r→0+r \to 0^+, then F(x)→bF(x) \to b.
  5. Theorem · T Building continuous fields Sums, scalar multiples, dot products, norms and compositions of continuous fields are continuous; so are the coordinate functions, linear maps, polynomials, and quotients where the denominator is not zero.
  6. Theorem · T A strict inequality between continuous fields defines an open set

5.2 Directional derivatives, partial derivatives and the gradient

  1. Lemma · T Scaling a direction scales the derivative If f′(a;y)f'(a; y) exists then f′(a;cy)=c f′(a;y)f'(a; cy) = c\,f'(a; y) for every real cc.
  2. Theorem · T The derivative of a slice For g(t)=f(a+ty)g(t) = f(a + ty), the derivative g′(t)g'(t) exists exactly when f′(a+ty;y)f'(a + ty; y) exists, and then g′(t)=f′(a+ty;y)g'(t) = f'(a + ty; y).
  3. Theorem · T The gradient is the direction of steepest ascent If f′(a;y)=∇f(a)⋅yf'(a; y) = \nabla f(a)\cdot y for all yy and ∇f(a)≠O\nabla f(a) \ne O, then among unit vectors uu the rate f′(a;u)f'(a; u) is largest, equal to ∥∇f(a)∥\lVert\nabla f(a)\rVert, for u=∇f(a)/∥∇f(a)∥u = \nabla f(a)/\lVert\nabla f(a)\rVert, smallest for u=−∇f(a)/∥∇f(a)∥u = -\nabla f(a)/\lVert\nabla f(a)\rVert, and 00 for uu perpendicular to ∇f(a)\nabla f(a).
  4. Theorem · T Partial derivatives vanish at an interior extremum If ff has a local maximum or minimum at an interior point aa and a partial derivative Dkf(a)D_kf(a) exists, then Dkf(a)=0D_kf(a) = 0; so ∇f(a)=O\nabla f(a) = O when all partials exist.

5.3 The total derivative, the Jacobian matrix and tangent planes

  1. Theorem · T Directional derivative as a dot product with the gradient If 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.
  2. Theorem · T A vector field is differentiable exactly when its components are F=(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.
  3. Theorem · T Differentiable fields are continuous If FF is differentiable at aa, then FF is continuous at aa.
  4. Theorem · A Continuous partial derivatives imply differentiable If 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.
  5. Theorem · T Rate of change along a curve If 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).
  6. Theorem · T The gradient is perpendicular to level sets If 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.

5.4 The chain rule for fields

  1. Theorem · T The chain rule for fields If gg is differentiable at aa and ff is differentiable at b=g(a)b = g(a), then h=f∘gh = f \circ g is differentiable at aa and h′(a)=f′(b)∘g′(a)h'(a) = f'(b) \circ g'(a); in matrices, Dh(a)=Df(b) Dg(a)Dh(a) = Df(b)\,Dg(a).
  2. Corollary · A The gradient of a composite If ff is a scalar field and g=(g1,…,gn)g = (g_1, \dots, g_n) a vector field, then ∇(f∘g)(a)=∑k=1nDkf(g(a)) ∇gk(a)=Dg(a)T ∇f(g(a))\nabla(f \circ g)(a) = \sum_{k=1}^n D_kf(g(a))\,\nabla g_k(a) = Dg(a)^{\mathsf T}\,\nabla f(g(a)).
  3. Corollary · T Jacobian determinants multiply If ff and gg both map Rn\mathbb R^n to Rn\mathbb R^n, then det⁡D(f∘g)(a)=det⁡Df(g(a))⋅det⁡Dg(a)\det D(f \circ g)(a) = \det Df(g(a))\cdot\det Dg(a).
  4. Theorem · T The derivative of an inverse field If F:U→VF: U \to V is a diffeomorphism, then DF(x)DF(x) is an invertible matrix for every xx, and D(F−1)(F(x))=(DF(x))−1D(F^{-1})(F(x)) = \big(DF(x)\big)^{-1}.
  5. Theorem · T Second derivative along a path If rr is twice differentiable and ff has continuous second partials, then d2dt2f(r(t))=∑i,jDjDif(r(t)) ri′(t) rj′(t)+∇f(r(t))⋅r′′(t)\dfrac{d^2}{dt^2}f(r(t)) = \sum_{i,j} D_jD_if(r(t))\,r_i'(t)\,r_j'(t) + \nabla f(r(t))\cdot r''(t).
  6. Theorem · B Second derivatives of a composite field If h=f∘gh = f \circ g with ff a scalar field and g:Rp→Rng: \mathbb R^p \to \mathbb R^n, all C2C^2, then the matrix of second partials of hh is Dg(a)T [DlDkf(b)] Dg(a)+∑k=1nDkf(b) [DjDigk(a)]Dg(a)^{\mathsf T}\,[D_lD_kf(b)]\,Dg(a) + \sum_{k=1}^n D_kf(b)\,[D_jD_ig_k(a)].

5.5 Higher partial derivatives and the equality of mixed partials

  1. Theorem · B Differentiability from n minus one continuous partials If D1f,…,DnfD_1f, \dots, D_nf exist in a ball around aa, and D2f,…,DnfD_2f, \dots, D_nf are continuous at aa (while D1fD_1f merely exists at aa), then ff is differentiable at aa with total derivative v↦∇f(a)⋅vv \mapsto \nabla f(a)\cdot v.
  2. Lemma · A The rectangle lemma If fxf_x and fxyf_{xy} exist on an open set containing the rectangle with corners (a,b)(a, b) and (a+h,b+k)(a + h, b + k), then Δ(h,k)=hk fxy(ξ,η)\Delta(h, k) = hk\,f_{xy}(\xi, \eta) for some point (ξ,η)(\xi, \eta) strictly inside the rectangle.
  3. Theorem · A Equality of mixed partials (Schwarz, Clairaut) If fxf_x, fyf_y, fxyf_{xy}, fyxf_{yx} exist on an open set containing (a,b)(a, b) and fxyf_{xy} and fyxf_{yx} are both continuous at (a,b)(a, b), then fxy(a,b)=fyx(a,b)f_{xy}(a, b) = f_{yx}(a, b).
  4. Theorem · A Peano's refinement of Schwarz's theorem If fxf_x, fyf_y and fxyf_{xy} exist on an open set containing (a,b)(a, b) and fxyf_{xy} is continuous at (a,b)(a, b), then fyx(a,b)f_{yx}(a, b) exists and equals fxy(a,b)f_{xy}(a, b).
  5. Corollary · A Order does not matter for C^k fields If ff is of class CkC^k on an open set, then any two partial derivatives of order at most kk that differentiate the same number of times in each variable are equal; in particular the matrix of second partials of a C2C^2 field is symmetric.

5.6 Taylor's formula, the Hessian and extrema

  1. Theorem · T Second-order Taylor formula for scalar fields If ff is C2C^2 on a ball B(a,r)B(a, r) and ∥v∥<r\lVert v \rVert < r, then f(a+v)=f(a)+∇f(a)⋅v+12vTHf(a+cv) vf(a + v) = f(a) + \nabla f(a)\cdot v + \frac12v^{\mathsf T}H_f(a + cv)\,v for some c∈(0,1)c \in (0, 1), and also f(a+v)=f(a)+∇f(a)⋅v+12vTHf(a) v+∥v∥2E2(a,v)f(a + v) = f(a) + \nabla f(a)\cdot v + \frac12v^{\mathsf T}H_f(a)\,v + \lVert v \rVert^2E_2(a, v) with E2(a,v)→0E_2(a, v) \to 0 as v→Ov \to O.
  2. Lemma · A A quadratic form is squeezed by the extreme eigenvalues If AA is a real symmetric matrix with eigenvalues λmin⁡≤⋯≤λmax⁡\lambda_{\min} \le \dots \le \lambda_{\max}, then λmin⁡∥v∥2≤vTAv≤λmax⁡∥v∥2\lambda_{\min}\lVert v \rVert^2 \le v^{\mathsf T}Av \le \lambda_{\max}\lVert v \rVert^2 for every vv, with equality at the corresponding eigenvectors.
  3. Theorem · T The second-derivative test
  4. Corollary · A A local minimum needs a positive semidefinite Hessian If a C2C^2 field has a local minimum at a critical point aa, then every eigenvalue of Hf(a)H_f(a) is at least 00; if it has a local maximum, every eigenvalue is at most 00.
  5. Theorem · T The second-derivative test for two variables

5.7 Inverse and implicit functions

  1. Lemma · B Mean value inequality for fields If HH is differentiable on a convex set KK and ∥DH(z)∥≤M\lVert DH(z)\rVert \le M for all z∈Kz \in K, then ∥H(x1)−H(x2)∥≤M∥x1−x2∥\lVert H(x_1) - H(x_2)\rVert \le M\lVert x_1 - x_2\rVert for x1,x2∈Kx_1, x_2 \in K.
  2. Theorem · B Inverse function theorem If F:U→RnF: U \to \mathbb R^n is continuously differentiable on an open set UU and det⁡DF(a)≠0\det DF(a) \ne 0, then FF has a continuously differentiable local inverse GG near aa, with DG(F(x))=DF(x)−1DG(F(x)) = DF(x)^{-1}.
  3. Theorem · T Implicit function theorem If F(x,y)=OF(x, y) = O at (a,b)(a, b), FF is continuously differentiable and the m×mm \times m matrix DyF(a,b)D_yF(a, b) is invertible, then near (a,b)(a, b) the equation defines exactly one y=g(x)y = g(x), it is continuously differentiable, and Dg(x)=−DyF−1DxFDg(x) = -D_yF^{-1}D_xF.
  4. Corollary · T Implicit differentiation formulas Under the hypotheses of the implicit function theorem: dydx=−FxFy\dfrac{dy}{dx} = -\dfrac{F_x}{F_y}; for F(x,y,z)=0F(x, y, z) = 0, zx=−FxFzz_x = -\dfrac{F_x}{F_z} and zy=−FyFzz_y = -\dfrac{F_y}{F_z}; for two equations in u,vu, v, ux=−∂(F,G)/∂(x,v)∂(F,G)/∂(u,v)u_x = -\dfrac{\partial(F, G)/\partial(x, v)}{\partial(F, G)/\partial(u, v)}.
  5. Corollary · B Level sets near a regular point are graphs If aa is a regular point of F:RN→RmF: \mathbb R^N \to \mathbb R^m with F(a)=cF(a) = c, then near aa the level set {F=c}\{F = c\} is the graph of a C1C^1 function of N−mN - m of the coordinates, and its tangent vectors at aa are exactly the vectors in the null space of DF(a)DF(a).

5.8 Constrained extrema and Lagrange multipliers

  1. Theorem · T Lagrange multiplier theorem If f,g1,…,gmf, g_1, \dots, g_m are C1C^1, ff has a local constrained extremum at aa, and aa is a regular point of gg (the gradients ∇gi(a)\nabla g_i(a) are linearly independent), then ∇f(a)=∑λi∇gi(a)\nabla f(a) = \sum\lambda_i\nabla g_i(a) for unique numbers λi\lambda_i.
  2. Theorem · B Second-order test for constrained extrema At a regular point with multipliers λi\lambda_i: if vTHv>0v^{\mathsf T}Hv \gt 0 for all nonzero vv in the tangent space then aa is a strict local constrained minimum; if <0\lt 0, a strict local maximum; a local minimum forces vTHv≥0v^{\mathsf T}Hv \ge 0 on the tangent space.
  3. Corollary · B Bordered determinant test in two variables For f(x,y)f(x, y) with one constraint gg at a regular point: det⁡B>0\det B \gt 0 means a strict local constrained maximum, det⁡B<0\det B \lt 0 a strict local constrained minimum, where BB is the 3×33 \times 3 bordered Hessian.
  4. Theorem · B The multiplier is the price of the constraint If the constrained optimum x∗(c)x^*(c) depends differentiably on cc and V(c)=f(x∗(c))V(c) = f(x^*(c)), then V′(c)=λ(c)V'(c) = \lambda(c): the multiplier is the rate at which the best value changes when the constraint g=cg = c is moved.
  5. Theorem · B Gradient inequality for convex functions A differentiable convex function lies above each of its tangent planes: f(y)≥f(x)+∇f(x)⋅(y−x)f(y) \ge f(x) + \nabla f(x)\cdot(y - x).
  6. Theorem · B Positive semidefinite Hessian implies convex If ff is C2C^2 on an open convex set and its Hessian is positive semidefinite everywhere, then ff is convex; in particular 12xTAx−bTx\tfrac12x^{\mathsf T}Ax - b^{\mathsf T}x is convex when AA is symmetric positive semidefinite.
  7. Corollary · B A convex Lagrangian gives a global minimum If x↦L(x,λ)=f(x)−∑λi(gi(x)−ci)x \mapsto L(x, \lambda) = f(x) - \sum\lambda_i(g_i(x) - c_i) is convex and aa satisfies ∇f(a)=∑λi∇gi(a)\nabla f(a) = \sum\lambda_i\nabla g_i(a) and g(a)=cg(a) = c, then aa is an absolute minimum of ff on {g=c}\{g = c\}.

5.9 Partial differential equations

  1. Proposition · A Superposition for linear homogeneous equations The solutions of a linear homogeneous PDE form a vector space: sums and multiples of solutions are solutions.
  2. Theorem · A First-order equation with constant coefficients If a,ba, b are constants, not both 00, then ff satisfies afx+bfy=0af_x + bf_y = 0 if and only if f(x,y)=g(bx−ay)f(x, y) = g(bx - ay) for some differentiable function gg of one variable.
  3. Theorem · A d'Alembert's solution of the wave equation If FF is twice differentiable and GG is differentiable, then u(x,t)=12[F(x+ct)+F(x−ct)]+12c∫x−ctx+ctG(s) dsu(x, t) = \tfrac12\big[F(x + ct) + F(x - ct)\big] + \dfrac1{2c}\displaystyle\int_{x - ct}^{x + ct}G(s)\,ds solves utt=c2uxxu_{tt} = c^2u_{xx} with u(x,0)=F(x)u(x, 0) = F(x) and ut(x,0)=G(x)u_t(x, 0) = G(x); conversely every C2C^2 solution on R2\mathbb R^2 has this form.
  4. Lemma · A Orthogonality of the sine modes ∫0Lsin⁡nπxLsin⁡mπxL dx=0\displaystyle\int_0^L\sin\frac{n\pi x}L\sin\frac{m\pi x}L\,dx = 0 for n≠mn \ne m and =L2= \frac L2 for n=mn = m; hence if f=∑bmsin⁡mπxLf = \sum b_m\sin\frac{m\pi x}L (finite sum) then bn=2L∫0Lfsin⁡nπxLb_n = \frac2L\int_0^Lf\sin\frac{n\pi x}L.
  5. Theorem · B Uniqueness for the heat equation A C2C^2 solution of ut=αuxxu_t = \alpha u_{xx} on [0,L]×[0,T][0, L]\times[0, T] with given initial temperature and given end temperatures is unique.
  6. Lemma · A Polar form of the Laplacian If U(r,θ)=u(rcos⁡θ,rsin⁡θ)U(r, \theta) = u(r\cos\theta, r\sin\theta) with uu of class C2C^2, then for r>0r \gt 0: uxx+uyy=Urr+1rUr+1r2Uθθu_{xx} + u_{yy} = U_{rr} + \dfrac1rU_r + \dfrac1{r^2}U_{\theta\theta}.
  7. Theorem · B Mean value property of harmonic functions If uu is harmonic on an open set containing the closed disc of radius RR about aa, then u(a)=12π∫02πu(a1+Rcos⁡θ, a2+Rsin⁡θ) dθu(a) = \dfrac1{2\pi}\displaystyle\int_0^{2\pi}u\big(a_1 + R\cos\theta,\ a_2 + R\sin\theta\big)\,d\theta: the value at the centre is the average over the circle.
  8. Corollary · B Maximum principle for harmonic functions If uu is harmonic on a connected open set Ω\Omega and has a maximum (or a minimum) at a point of Ω\Omega, then uu is constant. So a non-constant harmonic function on a bounded region, continuous up to the boundary, attains its largest and smallest values on the boundary only.

5.10 Gradient descent, momentum and Newton's method

  1. Lemma · B Descent lemma If ∇f\nabla f is LL-Lipschitz, then f(y)≤f(x)+∇f(x)⋅(y−x)+L2∥y−x∥2f(y) \le f(x) + \nabla f(x)\cdot(y - x) + \frac L2\lVert y - x\rVert^2; consequently the step y=x−η∇f(x)y = x - \eta\nabla f(x) with η≤1L\eta \le \frac1L gives f(y)≤f(x)−η2∥∇f(x)∥2f(y) \le f(x) - \frac\eta2\lVert\nabla f(x)\rVert^2.
  2. Theorem · B Gradient descent on a quadratic For f(x)=12xTAx−bTxf(x) = \frac12x^{\mathsf T}Ax - b^{\mathsf T}x with AA symmetric positive definite with eigenvalues in [μ,L][\mu, L], gradient descent converges to x∗=A−1bx^* = A^{-1}b for every start if and only if 0<η<2/L0 \lt \eta \lt 2/L; the error is multiplied by max⁡(∣1−ημ∣,∣1−ηL∣)\max(|1 - \eta\mu|, |1 - \eta L|) per step, which is smallest, equal to κ−1κ+1\frac{\kappa - 1}{\kappa + 1} with κ=L/μ\kappa = L/\mu, at η=2L+μ\eta = \frac2{L + \mu}.
  3. Corollary · B Gradient descent is a contraction If ff is C2C^2 with μI⪯Hf(x)⪯LI\mu I \preceq H_f(x) \preceq LI everywhere on Rn\mathbb R^n and 0<η<2/L0 \lt \eta \lt 2/L, then T(x)=x−η∇f(x)T(x) = x - \eta\nabla f(x) is a contraction with constant ρ=max⁡(∣1−ημ∣,∣1−ηL∣)<1\rho = \max(|1 - \eta\mu|, |1 - \eta L|) \lt 1, so gradient descent converges to the unique minimiser x∗x^* and ∥xk−x∗∥≤ρk1−ρ∥x1−x0∥\lVert x_k - x^*\rVert \le \dfrac{\rho^k}{1 - \rho}\lVert x_1 - x_0\rVert.
  4. Theorem · B Gradient descent on a convex smooth function If ff is convex and LL-smooth with a minimiser x∗x^*, then gradient descent with η=1/L\eta = 1/L satisfies f(xk)−f(x∗)≤L∥x0−x∗∥22kf(x_k) - f(x^*) \le \dfrac{L\lVert x_0 - x^*\rVert^2}{2k}.
  5. Theorem · B Momentum on a quadratic For a quadratic with eigenvalues in [μ,L][\mu, L], the heavy-ball method with η=4(L+μ)2\eta = \dfrac4{(\sqrt L + \sqrt\mu)^2} and β=(κ−1κ+1)2\beta = \Big(\dfrac{\sqrt\kappa - 1}{\sqrt\kappa + 1}\Big)^2 makes the error decay at the rate κ−1κ+1\dfrac{\sqrt\kappa - 1}{\sqrt\kappa + 1} (up to a factor polynomial in kk).
  6. Theorem · B Noise floor of stochastic gradient descent For the loss 1N∑12(w−ai)2\frac1N\sum\frac12(w - a_i)^2, whose minimiser is the mean aˉ\bar a, SGD with a fixed step η∈(0,2)\eta \in (0, 2) has E[wk]−aˉ→0\mathrm{E}[w_k] - \bar a \to 0 but E[(wk−aˉ)2]→ησ22−η\mathrm{E}[(w_k - \bar a)^2] \to \dfrac{\eta\sigma^2}{2 - \eta}, where σ2\sigma^2 is the variance of the aia_i; with steps ηk=1k+1\eta_k = \frac1{k + 1} the iterate is the running average and the error tends to 00.
  7. Theorem · B Quadratic convergence of Newton's method If F(x∗)=OF(x^*) = O, JF(x∗)J_F(x^*) is invertible with ∥JF(x∗)−1∥≤β0\lVert J_F(x^*)^{-1}\rVert \le \beta_0 and JFJ_F is MM-Lipschitz near x∗x^*, then for ∥x0−x∗∥≤12β0M\lVert x_0 - x^*\rVert \le \dfrac1{2\beta_0M} the Newton iterates satisfy ∥xk+1−x∗∥≤β0M∥xk−x∗∥2\lVert x_{k+1} - x^*\rVert \le \beta_0M\lVert x_k - x^*\rVert^2: the number of correct digits doubles at each step.
  8. Proposition · B Gradient descent near a saddle For f=12(ax2−γy2)f = \frac12(ax^2 - \gamma y^2) with a,γ>0a, \gamma \gt 0, gradient descent with step η\eta has yk=(1+ηγ)ky0y_k = (1 + \eta\gamma)^ky_0: it leaves the saddle exponentially fast but with a time of order 1ηγln⁡1∣y0∣\dfrac1{\eta\gamma}\ln\dfrac1{|y_0|}, which is long when the negative curvature γ\gamma is small.

Terms this unit defines

Unit review

A mixed set of 12 quick checks drawn at random from the 77 in this unit's chapters. Each one says which chapter it comes from, so a miss tells you what to reread. Press "New set" for another mix.

Where it leads

Units that build on this one: Unit 6, Integration in many variables, Unit 7, Differential equations, Unit 8, Fourier analysis, Unit 9, Complex analysis, Unit 13, Geometry and topology, Unit 15, Optimisation, dynamics and computation.