Multivariable Taylor & critical points
A surface has no single slope. It has a slope in every direction and a curvature in every direction, and this part packs both into one object — the Hessian. The same quadratic model that decides whether a point is a bowl, a dome or a saddle also decides how many steps an optimizer needs to get down. Our running arm reaches for a target, and its squared reach error is exactly this kind of landscape.
The local quadratic model
Taylor to second order, on a surface
Single-variable Taylor said a curve looks like a line up close, then a parabola. The same expansion holds for a surface once we replace the derivative by the gradient and the second derivative by the Hessian matrix $H$. Near a point $\mathbf a = (a,b)$ and a displacement $\Delta = (\Delta x, \Delta y)$:
The first two terms are the tangent plane — the same linear model as the gradient. Add the third and the flat plane bows into a paraboloid whose bending is fixed by the four numbers $f_{xx}, f_{xy}, f_{yx}, f_{yy}$. Cut the series after the plane and the error is $O(\|\Delta\|^2)$; keep the quadratic term and it drops to $O(\|\Delta\|^3)$. Below, the surface is plotted with the tangent plane (blue), the quadratic model (red) and the point they agree at. Slide the point and the neighbourhood size $h$.
Drag to orbit. The marker is the expansion point; the blue patch is the tangent plane, the red patch the second-order model. Both are drawn only over the neighbourhood of radius $r \approx 2.6h$.
The second-derivative test
Curvature signs decide bowl, dome or saddle
At a critical point the gradient vanishes, so the quadratic model collapses to $\tfrac{1}{2}\Delta^{\mathsf T}H\Delta$. Choose axes along the Hessian's eigenvectors and this is just two independent parabolas:
Curving up in both eigen-directions ($\lambda_1, \lambda_2 > 0$) is a minimum; curving down in both ($\lambda_1, \lambda_2 < 0$) is a maximum; opposite signs give a saddle. Since the determinant of a matrix is the product of its eigenvalues,
so $D>0$ with $f_{xx}>0$ is a minimum, $D>0$ with $f_{xx}<0$ a maximum, $D<0$ a saddle, and $D=0$ (or a zero eigenvalue) is degenerate — the linear terms decide. Drag the point over the contour map: the readout computes $\nabla f$, $H$, its eigenvalues, and the verdict. Faint rings mark the four critical points; find them all. The 3D panel is the same surface the contour is slicing.
Contour map of $f$. Drag the point; the arrow is $\nabla f$ (the uphill direction). When it shrinks to nothing you are at a critical point.
Newton's method, in matrix form
The optimizer's quadratic model in action
If a surface is well approximated by its quadratic model, the fastest way down is to jump straight to that model's minimum. Minimising $f + \mathbf g^{\mathsf T}\Delta + \tfrac{1}{2}\Delta^{\mathsf T}H\Delta$ in $\Delta$ gives $\mathbf g + H\Delta = 0$, hence the Newton step
which is $-\mathbf g / f''$ in one dimension. On a quadratic the model is exact and one step lands on the minimum. On our cubic landscape it converges quadratically — each step roughly squares the remaining error — but only if the Hessian is invertible; where it is singular, $H\mathbf x = -\mathbf g$ has no unique solution and the step is undefined. Step or play, and watch $\lvert\nabla f\rvert$ collapse.
The Newton iterates on the contour map. Each step solves $H\mathbf p = -\mathbf g$ exactly and moves.
Why eigenvalues govern convergence
Curvature, not slope, sets the pace
Take the barest curved landscape, $f(x,y) = \tfrac{1}{2}(\kappa x^2 + y^2)$ with $\kappa \ge 1$. Its Hessian is diagonal with eigenvalues $\kappa$ and $1$, so the level sets are ellipses with condition number $\kappa = \lambda_{\max}/\lambda_{\min}$. Gradient descent with step $\alpha$ multiplies each eigen-coordinate by $(1-\alpha\lambda)$, so with the best fixed step $\alpha = 2/(\lambda_{\max}+\lambda_{\min})$ the slow direction decays like
which crawls when $\kappa$ is large and the iteration bounces side to side across the valley. Newton's step divides each direction by its own curvature, so it is unmoved by conditioning: on this quadratic it reaches the bottom in exactly one step, and the two paths below show the difference. The full race between gradient descent, momentum and Adam lives in Volume II, Part 10, and the practical systems that exploit it are in Nonlinear Optimization.
Level ellipses of the quadratic. Blue: steepest descent zig-zagging across the valley. Magenta: Newton's single jump.
Where this shows up
From a theorem to a solver
Every solver in Nonlinear Optimization is a negotiation with this quadratic model. Gauss–Newton, Levenberg–Marquardt and pose-graph optimisation all build an approximate Hessian, ask the second-derivative test what shape they are sitting in, and then take a step the model predicts will help — raising damping when the saddle-shaped directions make that step untrustworthy. The curvature-and-convergence story continues in Volume II, Part 10, where the same ellipses from Step 4 become the reason momentum and adaptive methods exist. And back at the arm: the squared reach error as a function of the joint angles is a surface exactly like the one above, with a bowl at the target and saddles where extra reach buys nothing.
Notation to carry forward
| Object | Reads as | What it decides |
|---|---|---|
∇f(a), g | The gradient, a vector of first partials | Where the tangent plane tilts; zero at a critical point |
H(a) | The Hessian, the matrix of second partials | How the surface bends in every direction |
f(a) + gᵀΔ | Tangent plane / linear model | Error O(‖Δ‖²); Newton's tangent step |
f(a) + gᵀΔ + ½ΔᵀHΔ | Local quadratic model | Error O(‖Δ‖³); the basis of the test |
D = f_xx f_yy − f_xy² | Determinant of H = λ₁λ₂ | Sign sorts min, max and saddle at a critical point |
λ₁, λ₂ | Eigenvalues of H | Curvature along the principal directions |
p = −H⁻¹g | The Newton step | Reaches the model's minimum; undefined if H singular |
κ = λ_max / λ_min | Condition number of H | Sets the gradient-descent contraction ((κ−1)/(κ+1))ᵏ |
Further reading
- MIT 18.02, Multivariable Calculus — the Taylor expansion and second-derivative test, derived from scratch.
- Wikipedia, Second partial derivative test — the discriminant version of the test with worked examples.
- Boyd & Vandenberghe, Convex Optimization — why curvature is the object that makes an optimisation problem tractable.
- Nocedal & Wright, Numerical Optimization — Newton, Gauss–Newton and trust regions, at the level a solver actually uses them.