Skip to content

Hessian Matrix

Given a function f\colon \mathbb {R} ^{n}\to \mathbb {R}. Its Hessian matrix is written as \mathbf{H} f. The elements in the matrix are the second order partial derivatives of the function. So the matrix looks as follows.

\mathbf {H} f={\begin{bmatrix}{\dfrac {\partial ^{2}f}{\partial x_{1}^{2}}}&{\dfrac {\partial ^{2}f}{\partial x_{1}\,\partial x_{2}}}&\cdots &{\dfrac {\partial ^{2}f}{\partial x_{1}\,\partial x_{n}}}\\[2.2ex]{\dfrac {\partial ^{2}f}{\partial x_{2}\,\partial x_{1}}}&{\dfrac {\partial ^{2}f}{\partial x_{2}^{2}}}&\cdots &{\dfrac {\partial ^{2}f}{\partial x_{2}\,\partial x_{n}}}\\[2.2ex]\vdots &\vdots &\ddots &\vdots \\[2.2ex]{\dfrac {\partial ^{2}f}{\partial x_{n}\,\partial x_{1}}}&{\dfrac {\partial ^{2}f}{\partial x_{n}\,\partial x_{2}}}&\cdots &{\dfrac {\partial ^{2}f}{\partial x_{n}^{2}}}\end{bmatrix}}

The elements in the matrix is as follows.

(\mathbf {H} f)_ {i,j}={\frac {\partial ^{2}f}{\partial x_{i}\,\partial x_{j}}}