Higher-Order Derivatives
Vector Calculus
Taking the derivative of a derivative gives higher-order derivatives. In 1D, f''(x) measures curvature โ how fast the slope is itself changing. Large positive f'' means the function curves up sharply (a narrow bowl), small f'' means gentle curvature (a wide bowl), and negative f'' means curving down
The Hessian is the matrix of second partial derivatives; it is symmetric for smooth functions.
No Hessian โ no curvature analysis, no Newton step, no understanding of why some loss landscapes are easy and others terrible.
Taking the derivative of a derivative gives higher-order derivatives. In 1D, measures curvature โ how fast the slope is itself changing. Large positive means the function curves up sharply (a narrow bowl), small means gentle curvature (a wide bowl), and negative means curving down (a hill).
For multivariable , the second-order object is the Hessian matrix with entries . For sufficiently smooth , mixed partials commute (Clairaut's theorem): , so the Hessian is symmetric.
The Hessian characterizes critical points. At a point where : if is positive definite (all eigenvalues > 0), it is a local minimum; if negative definite, a local maximum; if indefinite (mixed signs), a saddle point; if singular, the test is inconclusive and you need higher-order analysis. The eigenvalues of the Hessian give the curvatures along the principal axes of the quadratic form.
The condition number of the Hessian โ the ratio โ governs how hard the optimization problem is. A high condition number means the loss landscape has very elongated valleys: gradient descent zigzags because it can't find the long narrow direction. This is exactly why Newton's method converges faster: it rescales by the inverse Hessian, making the effective landscape isotropic.
In ML, the Hessian drives second-order optimization (Newton, quasi-Newton methods like L-BFGS, natural gradient descent), Laplace approximations of Bayesian posteriors (approximate a posterior by a Gaussian with covariance ), and sharpness-based generalization (flat minima with small Hessian eigenvalues tend to generalize better than sharp ones). Storing and inverting Hessians is expensive ( storage, inversion), which is why most deep learning uses first-order methods or stochastic approximations.
Worked example โ classify critical point of $f(x,y) = x^2 + xy + y^2$: Gradient vanishes only at . Hessian has eigenvalues (both positive). Since is positive definite, the origin is a strict local minimum, matching the fact that is a convex quadratic form.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.