Hessian Calculator

Compute the Hessian matrix of second derivatives.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a function and its variables to get the matrix of second partial derivatives. For x² + y² the Hessian is [2 0; 0 2].

How to use

1
Step 1
Type f.
2
Step 2
List the variables.
3
Step 3
Press Calculate.

How it works

Entry (i, j) is ∂²f/∂xᵢ∂xⱼ. At a critical point, a positive-definite Hessian means a local minimum, a negative-definite one a local maximum, and a mixed-sign one a saddle. For smooth f the matrix is symmetric.

Hᵢⱼ = ∂²f / ∂xᵢ∂xⱼ

Worked example

Cubic plus cross term

Input
x^3 + x*y^2, variables x,y
Output
[6x, 2y; 2y, 2x]
Walkthrough
f_x = 3x² + y² so f_xx = 6x and f_xy = 2y. f_y = 2xy so f_yy = 2x.

Limitations

  • The result is shown as text, rows separated by semicolons.
  • It gives the matrix, not the definiteness test.

Questions

What is the Hessian of x² + y²?
[2 0; 0 2].
What is the Hessian of x³ + xy²?
[6x 2y; 2y 2x].
Why is the Hessian symmetric?
Mixed partials are equal for smooth functions, so f_xy = f_yx.

Features

  • Second partials
  • Symmetric result
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Definite integrals intro

    Khan Academy

    Definite integral basics for area-under-curve calculators.

    Watch on YouTube
  • Derivative as a concept

    Khan Academy

    Core derivative intuition for differentiation tools.

    Watch on YouTube