Hessian Matrix

1 min read

The Hessian HH of a scalar function f:RnRf: \mathbb{R}^n \to \mathbb{R} is the n×nn \times n matrix of second partial derivatives:

Hij=2fxixjH_{ij} = \frac{\partial^2 f}{\partial x_i \partial x_j}

The Hessian is symmetric (by Schwarz's theorem: mixed partials are equal).

What it tells you: curvature of the function surface at a point.

Critical point classification (where f=0\nabla f = 0):

  • HH is positive definitelocal minimum
  • HH is negative definite → local maximum
  • HH has both positive and negative eigenvalues → saddle point

Connection to Taylor Expansion:

f(x+δ)f(x)+fδ+12δHδf(\mathbf{x} + \delta) \approx f(\mathbf{x}) + \nabla f^\top \delta + \frac{1}{2}\delta^\top H\delta

The 12δHδ\frac{1}{2}\delta^\top H\delta term captures the curvature. Large eigenvalues of HH mean sharp curvature (the loss changes rapidly); small eigenvalues mean flat directions.

In optimization:

  • Newton's method uses H1H^{-1}: xt+1=xtH1f\mathbf{x}_{t+1} = \mathbf{x}_t - H^{-1}\nabla f — converges faster than gradient descent but O(n2)O(n^2) storage, O(n3)O(n^3) inversion
  • The condition number κ(H)=λmax/λmin\kappa(H) = \lambda_{\max}/\lambda_{\min} governs how poorly gradient descent performs (elongated loss valleys)
  • Adam Optimizer partially addresses ill-conditioning by adapting per-parameter learning rates

See also: Gradient, Convexity

Linked from