Hessian Matrix Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: what the Hessian matrix means for f(x, y)

The Hessian matrix packages the second partial derivatives of a function into one square matrix, so you can see how the surface bends in different directions near a chosen point. In this calculator, the focus is on a two-variable function written as f(x, y), because that is the form needed for the 2×2 Hessian shown below and for the second-derivative test used by the tool.

At a point (x, y), the 2×2 Hessian matrix is

H = fxx fxy fyx fyy

Here:

When the function is twice continuously differentiable, the mixed partials agree, so the Hessian is symmetric and the two off-diagonal entries should match once the expression is differentiated successfully.

How to use the Hessian Matrix Calculator

This Hessian matrix calculator evaluates f(x, y) at one coordinate pair and then applies the second-derivative test to the curvature data it finds. Use it when you want to see whether a point behaves like a local minimum, a local maximum, a saddle point, or a case where second derivatives do not decide the outcome.

  1. Enter the function in the field labeled Function f(x, y).
  2. Enter the point where you want to evaluate the Hessian:
    • Type the x coordinate in the corresponding box.
    • Type the y coordinate in the corresponding box.
  3. Click the compute button to calculate the second partial derivatives and build the Hessian matrix at that point.
  4. Read the output:
    • The calculator shows the Hessian entries f_xx, f_xy, f_yx, and f_yy evaluated at your point.
    • It also computes the determinant of the Hessian and uses the second-derivative test to classify the point.

That makes the tool useful for checking multivariable calculus homework, testing symbolic differentiation, or confirming the local shape of a surface you have already sketched by hand.

Input format for Hessian calculations

The function field accepts ordinary calculator-style syntax for f(x, y), so you can describe the surface without switching to another algebra system. The important part is that the expression depends on x and y in a form the parser can differentiate twice.

A few expressions that make the Hessian calculator show different curvature patterns are:

Enter the point as ordinary real numbers. Because x and y are just coordinates, you do not need to convert any units; what matters is that both values describe the same location in the same coordinate system. If the function is not defined at the chosen point, for example because of division by zero, the calculator may return an error or an undefined result.

The second-derivative test in this Hessian calculator

When you evaluate a critical point of f(x, y) with this Hessian calculator, the second-derivative test plays the same role that the second derivative plays in single-variable calculus.

Suppose that at a specific point you have the Hessian

H = [[a, b], [b, c]],

where a = f_xx, b = f_xy = f_yx, and c = f_yy evaluated at that point. Define the determinant

D = a*c - b^2.

The classical second-derivative test states:

The calculator computes a, b, c, and D from your expression at the point you enter, then applies this decision rule automatically.

Worked example: a quadratic surface with a constant Hessian

Consider the quadratic function

f(x, y) = x^2 + x*y + y^2.

We will compute the Hessian at the point (0, 0) and classify that point using the second-derivative test. This example is convenient because the Hessian does not depend on the point, so the calculator should show the same matrix anywhere you evaluate it.

1. First partial derivatives

2. Second partial derivatives

3. Form the Hessian

At any point (x, y), the Hessian is

H(x, y) = [[2, 1], [1, 2]].

Because this particular function is quadratic, the Hessian is constant and does not depend on the point. At (0, 0) you have

H(0, 0) = [[2, 1], [1, 2]].

4. Compute the determinant and classify

In this case, a = 2, b = 1, and c = 2. The determinant is

D = a*c - b^2 = 2*2 - 1^2 = 4 - 1 = 3.

This satisfies D > 0 and a = 2 > 0, so by the second-derivative test the point (0, 0) is a local minimum of f(x, y). For this positive-definite quadratic surface, the same calculation also shows that the origin is the unique global minimum.

If you enter this function and the point (0, 0) into the calculator, it should output the Hessian matrix [[2, 1], [1, 2]], report D = 3, and classify the point as a local minimum.

Interpreting the Hessian results at a point

After the Hessian calculator finishes, the table shows the second derivatives and the determinant used for classification. Those values tell you how the surface bends near the point you chose.

You can interpret these pieces as follows:

Remember that the second-derivative test assumes you are looking at a critical point where the gradient is zero. If you evaluate some other point on the surface, the Hessian still describes local curvature, but it does not by itself say whether that point is an extremum.

Comparison: Hessian patterns at critical points

This table summarizes the main curvature patterns the Hessian calculator may report when you are at a critical point.

Condition on Hessian Determinant D Typical classification Geometric picture
f_xx > 0, D > 0 Positive Local minimum Surface shaped like a bowl, curving upward in all directions.
f_xx < 0, D > 0 Positive Local maximum Surface shaped like an upside-down bowl, curving downward in all directions.
D < 0 Negative Saddle point Surface rising in some directions and falling in others.
D = 0 Zero Inconclusive Higher-order terms determine the behavior; more analysis is required.

Typical use cases

This Hessian matrix calculator is especially helpful for:

By automating the second partial derivatives and determinant, the tool lets you focus on the shape of the surface rather than getting bogged down in algebra.

Assumptions and limitations for Hessian evaluation

Like any symbolic or numeric Hessian tool, this calculator works under a set of assumptions that are worth checking before you trust the classification:

If the result looks surprising, recheck the expression, confirm that the point lies in the function's domain, and make sure you are interpreting the Hessian at a critical point rather than at an arbitrary location on the surface.

Summary: what this Hessian matrix calculator tells you

The Hessian matrix condenses second-order information about f(x, y) into a compact 2×2 snapshot of curvature. This calculator evaluates that snapshot at the point you enter, computes the determinant used by the second-derivative test, and helps you decide whether the local shape is bowl-like, dome-like, saddle-shaped, or undecidable from second derivatives alone. It is a compact way to verify homework, explore examples, and build intuition about multivariable curvature and optimization.

How the Hessian result is built

For this Hessian calculator, the displayed result is assembled from the second partial derivatives of the function at the point you enter. The tool differentiates f(x, y) twice, places the results into the 2×2 Hessian, and uses the diagonal terms and mixed term to compute the determinant shown in the result box. Enter x and y as ordinary real-number coordinates; the app does not convert units or rescale the point for you.

Status messages will appear here.
Enter a function and point.

Arcade Mini-Game: Hessian Matrix Calculator Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.