A **Hessian matrix** or simply a **Hessian** is a matrix of all the second-order partial derivatives of a function . For example, given the function

The resulting Hessian is

The Hessian matrix will be symmetric if the partial derivatives of the function are continuous.

The determinant of a Hessian matrix can be used as a generalisation of the second derivative test for single-variable functions. If the determinant of the Hessian positive, it will be an extreme value (minimum if the matrix is positive definite). If it is negative, there will be a saddle point. If it is 0, another test must be used.

The Hessian can be thought of as the second derivative of a multivariable function, with gradient being the first and higher order derivatives being tensors of higher rank.

A **bordered Hessian** is a similar matrix used to optimize a multivariable function with a constraint .

∇ is the del operator and ^{T} represents the transpose. If there are more constraints, more columns and rows can be added.