Relation between Hessian matrix and second-order partial derivatives

From Calculus

Relation at a point

For a function of two variables at a point

Suppose is a real-valued function of two variables and is a point in the domain of at which is twice differentiable. In particular, this means that all the four second-order partial derivatives exist at , i.e., the two pure second-order partials exist, and so do the two second-order mixed partial derivatives and . Then, the Hessian matrix of at , denoted , can be expressed explicitly as a matrix of real numbers defined as follows:

Note that it may be possible that is not twice differentiable at but the above matrix still exists. In that case, we do not call it the Hessian matrix, because it does not satisfy any of the nice behavior that we expect of the Hessian matrix.

For a function of multiple variables at a point

Suppose is a real-valued function of multiple variables . Suppose is a point in the domain of at which is twice differentiable. In other words, are real numbers and the point has coordinates . It then follows that all the second-order partials (pure and mixed) of with respect to these variables exist at the point . Then, the Hessian matrix of at , denoted , is a matrix of real numbers that can be expressed explicitly as follows:

The entry (i.e., the entry in the row and column) is . This is the same as . Note that in the two notations, the order in which we write the partials differs because the convention differs (left-to-right versus right-to-left).

The matrix looks like this:

Note that it may be possible that is not twice differentiable at but the above matrix still exists. In that case, we do not call it the Hessian matrix, because it does not satisfy any of the nice behavior that we expect of the Hessian matrix.

Relation as functions

For a function of two variables

Suppose is a real-valued function of two variables . The Hessian matrix of , denoted satisfies the following:

The equality holds whenever the left side makes sense. In other words, the domain of is contained in the domain of the right side, but it is possible that the domain of definition for the matrix on the right side is strictly bigger than the domain of definition of .

We can also write the above in point-free notation:

Again, equality holds whenever the left side makes sense.

For a function of multiple variables

Suppose is a function of variables . The Hessian matrix of , denoted , is related to the second-order partial derivatives as follows (expressed in point-free notation):

The equality holds whenever the left side makes sense. In other words, the domain of is contained in the domain of the right side, but it is possible that the domain of definition for the matrix on the right side is strictly bigger than the domain of definition of .

Note for functions with continuous second-order partials

For further information, refer: continuous partials of a given order implies differentiable that many times

If all the second-order partial derivatives (both pure and mixed) of are continuous functions at and around a particular point in the domain, then the Hessian matrix exists and is given by the matrix expression in terms of second-order partials. In particular, if all the second-order partials of exist and are continuous everywhere, then the Hessian matrix of exists everywhere and is given by the matrix expression everywhere.

The key role of continuity is as follows: it helps us conclude that, in fact, the Hessian matrix does exist. Without checking continuity, we can still compute the matrix of second-order partials, and we know it must equal the Hessian matrix if it exists, but we don't know whether the Hessian matrix exists. Continuity helps bridge that knowledge gap, allowing us to go from computing second-order partials to computing the Hessian matrix without reverting to first principles.