Hessian matrix
If the gradient tells you the slope of a multivariable function, the Hessian tells you its curvature — how the surface bends, whether it cups upward like a bowl, downward like a dome, or twists into a saddle. It is the second-order companion to the gradient, the multivariable analogue of the second derivative that decides the shape near a point.
Formally, the Hessian of a scalar function f at a point is the n-by-n matrix H whose (i, j) entry is the second partial derivative d^2 f / (dx_i dx_j). When f is C^2, Clairaut's theorem makes H symmetric. It appears as the quadratic term of the Taylor expansion: f(a + h) is approximately f(a) + grad f(a) . h + (1/2) h^T H h, the half-quadratic-form being the curvature correction.
At a critical point (where the gradient vanishes), the Hessian's definiteness classifies the point: positive definite means a strict local minimum, negative definite a strict local maximum, and indefinite (eigenvalues of both signs) a saddle point. An honest caveat: if the Hessian is only semidefinite (a zero eigenvalue), the test is inconclusive and one must look at higher-order behavior.
For f(x, y) = x^2 - y^2, the Hessian is [2, 0; 0, -2], which is indefinite (eigenvalues 2 and -2). At the critical point (0, 0) this is a saddle: a minimum along x, a maximum along y. For g = x^2 + y^2 the Hessian [2, 0; 0, 2] is positive definite — a strict minimum.
Indefinite Hessian: a saddle. Positive definite: a minimum.