Hessian Matrix Calculator

Type a function of x, y (and z), and optionally a point, to find its Hessian.

Use x, y and z. Type powers with ^ and functions with brackets: sin(xy), e^(x + y), ln(x), sqrt(x).

Optional: a point such as (1, 0) to evaluate the Hessian there and classify a critical point.

Try

Result

You enteredH[x3+y2−3x]H\left[x^{3} + y^{2} - 3x\right]

H(1,0)=[6002]\displaystyle H\left(1, 0\right) = \begin{bmatrix} 6 & 0 \\ 0 & 2 \end{bmatrix}

At the point

local minimum\displaystyle \text{local minimum}

Determinant

det⁡H=12x\displaystyle \det H = 12x

Determinant at the point

det⁡H(1,0)=12\displaystyle \det H\left(1, 0\right) = 12
Show the work
  1. Hessian matrix

    The Hessian collects every second partial derivative: row i, column j is f differentiated by the i-th and then the j-th variable. It describes how the surface bends in every direction.

    Using H=[fxxfxyfyxfyy]H = \begin{bmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{bmatrix}

    H=[fxxfxyfyxfyy]H = \begin{bmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{bmatrix}
  2. Second partial derivatives

    Differentiate each first partial again with respect to each variable. The mixed partials agree (fxy=fyxf_{xy} = f_{yx}, Clairaut's theorem), so the matrix is symmetric.

    H=[6x002]H = \begin{bmatrix} 6x & 0 \\ 0 & 2 \end{bmatrix}
  3. Determinant of the Hessian

    For two variables this is the D of the second derivative test.

    Using D=fxxfyy−fxy2D = f_{xx}f_{yy} - f_{xy}^2

    det⁡H=12x\det H = 12x
  4. Hessian at the point

    Substitute (1,0)\left(1, 0\right).

    H(1,0)=[6002]H\left(1, 0\right) = \begin{bmatrix} 6 & 0 \\ 0 & 2 \end{bmatrix}
  5. Leading principal minors (Sylvester's criterion)

    All leading minors positive: positive definite. Alternating −, +, −: negative definite. Otherwise, with a nonzero determinant: indefinite.

    D1=6D2=12\begin{gathered} D_{1} = 6 \\ D_{2} = 12 \end{gathered}
  6. What the Hessian says

    At a critical point, a positive definite Hessian means a local minimum.

  7. Result

    The Hessian at the point.

    H(1,0)=[6002]H\left(1, 0\right) = \begin{bmatrix} 6 & 0 \\ 0 & 2 \end{bmatrix}

Worked examples