Skip to content

Vector Calculus — Overview

Chapters 2–4 gave us the objects of machine learning (vectors, matrices, decompositions). Chapter 5 gives us the verb: how a model learns. Learning is optimization, optimization runs on gradients, and gradients are vector calculus. Every time a neural network trains, it is computing derivatives of a loss with respect to millions of parameters — and this chapter is the machinery that makes that possible.

Why gradients are the whole game

A model has knobs (parameters) and a loss that says how wrong it is. Training = turning the knobs to shrink the loss. The gradient points in the direction the loss increases fastest, so stepping against it decreases the loss — that’s gradient descent. The entire deep-learning revolution rests on computing this gradient efficiently, which is exactly what backpropagation (reverse-mode automatic differentiation) does.

The concept map

diagram Diagram mermaid

(Adapted from Figure 5.2 of the book.)

The through-line

  1. Differentiation of Univariate Functions — the derivative as a slope; the rules (product, quotient, chain); Taylor series.
  2. Partial Differentiation and Gradients — derivatives of multivariable functions; the gradient as the direction of steepest ascent.
  3. Gradients of Vector-Valued Functions — the Jacobian: the derivative of a function that outputs a vector.
  4. Gradients of Matrices — derivatives with respect to matrices, which become higher-dimensional tensors.
  5. Useful Identities for Computing Gradients — a cheat sheet of matrix-gradient formulas, plus gradient checking.
  6. Backpropagation and Automatic Differentiation — the chain rule on a computation graph; how deep networks actually get their gradients.
  7. Higher-Order Derivatives — the Hessian: curvature, used to tell minima from saddle points.
  8. Linearization and Multivariate Taylor Series — approximating any function with polynomials around a point.

Where each idea shows up in ML

Vector-calculus ideaMachine learning payoff
Derivative / gradientGradient descent — how every model trains
Chain ruleThe mathematical core of backpropagation
JacobianNormalizing flows, sensitivity, change of variables
HessianNewton’s method, saddle-point detection, curvature
Backprop / autodiffPyTorch/TensorFlow .backward().backward() — automatic gradients
Taylor seriesLocal approximations, Laplace approximation, optimization theory

Prerequisites

Start with Differentiation of Univariate Functions.

If this helped you, consider buying me a coffee ☕

Buy me a coffee

Was this page helpful?

Let us know how we did