The Hessian matrix is a square matrix that collects all second-order partial derivatives of a scalar-valued function of several variables. It summarizes how the function curves in different directions near a point, and it is a core tool in multivariable calculus, optimization, and numerical analysis.
In this calculator we focus on a function of two real variables, written as f(x, y). At a point (x, y), the 2×2 Hessian matrix is
Here:
f_xx is the second partial derivative with respect to x,f_yy is the second partial derivative with respect to y,f_xy and f_yx are the mixed partial derivatives.If the function is sufficiently smooth (twice continuously differentiable), then f_xy = f_yx, so the Hessian is symmetric.
This tool evaluates the Hessian matrix of f(x, y) at a single point and applies the second-derivative test to classify that point as a local minimum, local maximum, saddle point, or inconclusive. To use it:
f_xx, f_xy, f_yx, and f_yy evaluated at your point.This workflow is useful whenever you need to inspect the local curvature of a surface, check the nature of a critical point in homework or research, or verify hand calculations.
The function field accepts a standard, calculator-style syntax for f(x, y). While the exact parser may vary by implementation, the following conventions are typically supported:
x and y for the two coordinates.x + y, x - 2*y.x*y, 2*x*y, x*(y + 1)./, for example x/y, (x^2 + y^2)/(1 + x^2).^, such as x^2, y^3, (x^2 + y^2)^0.5.sin, cos, tan, exp, log or ln, sqrt are usually allowed, for example sin(x)*cos(y), exp(x^2 + y^2), ln(1 + x^2 + y^2).3.14 or 2.5 work as usual; in many setups, pi and e are also defined.Some example inputs that illustrate typical usage are:
x^2 + x*y + y^2sin(x) * cos(y)exp(x^2 + y^2)ln(1 + x^2 + y^2)(x^2 - y^2)/(1 + x^2*y^2)Coordinates should be entered as real numbers. For instance, you might use 0, 1.5, -2, or 3.14159. If the function is not defined at the chosen point (for example, division by zero), the calculator may return an error or an undefined result.
When analyzing critical points of f(x, y) (points where the gradient is zero), the Hessian plays the 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:
D > 0 and a > 0, the point is a local minimum.D > 0 and a < 0, the point is a local maximum.D < 0, the point is a saddle point (the surface curves up in one direction and down in another).D = 0, the test is inconclusive; higher-order derivatives or other arguments are needed.The calculator automatically computes a, b, c, and D, then applies this decision rule to label the point.
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.
f_x(x, y) = 2x + yf_y(x, y) = x + 2yf_xx(x, y) = d/dx (2x + y) = 2f_xy(x, y) = d/dy (2x + y) = 1f_yx(x, y) = d/dx (x + 2y) = 1f_yy(x, y) = d/dy (x + 2y) = 2At 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]].
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). In fact, for this positive-definite quadratic function, (0, 0) is also 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.
The calculator output usually contains:
f_xx, f_xy, f_yx, and f_yy at your chosen point.D = f_xx * f_yy - (f_xy)^2.You can interpret these pieces as follows:
f_xx (or equivalently, the eigenvalues of H) distinguishes between a bowl-shaped minimum and a dome-shaped maximum when D > 0.Keep in mind that the second-derivative test assumes you are evaluating at a critical point where the gradient is zero. If you feed in a point that is not critical, the classification still describes the local curvature, but it does not directly say whether that point is an extremum of the function.
The table below summarizes the main behaviors the calculator may report, assuming 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. |
This Hessian matrix calculator is especially helpful for:
By automating the derivative calculations, the tool lets you focus on interpreting the results, rather than getting bogged down in algebra.
Like any symbolic or numeric calculator, this tool operates under a set of assumptions and has some limitations you should keep in mind:
f(x, y). It does not directly handle three or more variables, complex variables, or vector-valued functions.f_xy = f_yx) relies on the function being sufficiently smooth. If that condition fails, the theoretical interpretation of the Hessian becomes more subtle.D = 0, the test is inherently inconclusive. Even when D ≠ 0, the test describes local behavior near the point, not global minima or maxima over all of ℝ².When results look surprising, double-check that your function is entered correctly, that the point lies in the domain of the function, and that you are interpreting the classification in the context of a critical point.
The Hessian matrix condenses second-order information about a function of two variables into a compact 2×2 array of partial derivatives. By computing the Hessian at a point and examining its determinant and entries, you can infer whether the function is locally minimized, maximized, or has saddle-like behavior there. This calculator streamlines that process for functions of the form f(x, y), helping you verify calculations, explore examples, and build intuition about curvature and optimization in several variables.