Hessian Matrix

Definition

Looking to understand the curvature of a function? Useful for optimization because it gives us the local behavior. For a scalar-valued function, the Hessian matrix calculates the second partial derivative. It is a matrix of functions that should be evaluated at some points:

H=[∂2f∂x2∂2f∂x∂y∂2f∂y∂x∂2f∂y2] 

Example

Let's say we have the equation below:

f(x,y)=3x2sin(y)

Let us calculate the first partial derivative with respect to x and y:

∂f∂x=6xsin(y)

and

∂f∂y=3x2cos(y)

Then we can take the derivative of ∂f∂x with respect to x and y:

∂2f∂x2=6sin(y)∂2f∂x∂y=6xcos(y)

as well as with ∂f∂y with respect to x and y:

∂2f∂y∂x=6xcos(y)

and

∂2f∂y2=−3x2sin(y)

Therefore the Hessian matrix of f(x,y) is:

H=[6sin(y)6xcos(y)6xcos(y)−3x2sin(y)] 

We then calculate the Determinant

How to interepret

Usage

You can figure out if you’re at a maximum/minimum point by calculating the Hessian.

Though

The Hessian is generally not used for some optimizationmethod because of the computational intensity it takes to fill it and invert it.

For Maximum-likelihood

As we're trying to maximum the log-likelihood when estimating parameters wtih Maximum likelihood, it makes sense we use the Hessian matrix.

Additionally, the asymptomatic covariance matrix of the parameters is given by the inverse of the negative of the Hessian matrix.

The negative Hessian evaluated at the MLE is the same as the observed Fisher Information matrix evaluated at the MLE.

Association with the Taylor Series

The Hessian matrix arises naturally in the second-order Taylor Series of a scalar function.

References