Jacobian, Hessian and Gradient Calculator
Enter a scalar function for its gradient, Hessian, determinant and every critical point classified, or a vector function for its Jacobian matrix, determinant, divergence and curl, all evaluated at any point.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Pick a mode
Choose scalar f for gradient and Hessian or vector F for the Jacobian.
- 2Type the function
Enter f, or one component of F per line.
- 3Set variables and point
Optionally fix the variable order and enter a point to evaluate.
- 4Read the matrices
See the gradient, Hessian or Jacobian and their determinants.
- 5Check critical points
Read the table of points with D or eigenvalues and their type.
- 6Use the plots
Look at the contour map or bent grid, then export or print.
About this tool
The gradient, the Hessian and the Jacobian are the three matrices of first and second derivatives that multivariable calculus, optimisation, machine learning and physics keep coming back to. The gradient of a scalar function points uphill and vanishes at critical points. The Hessian, the matrix of second partial derivatives, describes how the surface curves and decides whether a critical point is a minimum, a maximum or a saddle. The Jacobian of a vector function collects the partial derivatives of every component and measures how a map stretches, rotates and squashes small regions; its determinant is the factor that appears when you change variables in a multiple integral. This calculator works in two modes. In scalar mode you type f(x, y), f(x, y, z) or up to four variables, and the tool differentiates symbolically, lists every first and second partial derivative, builds the Hessian and its determinant and the Laplacian. It then solves ∇f = 0 by Newton's method from many starting points inside a box you set, keeps the distinct solutions, recognises exact values and classifies each point with the Hessian eigenvalues and, for two variables, with the discriminant D = fxx·fyy − fxy². A contour map marks minima, maxima and saddles. In vector mode you type the components one per line and choose the variable order; the tool returns the Jacobian matrix, its determinant when it is square, and the divergence and curl when the variables are x, y and z. At any point you choose, it evaluates everything numerically, explains whether the map is locally invertible, and for maps of the plane draws how a small square grid is bent compared with the parallelogram predicted by J. If you only need single partial derivatives, directional derivatives or a tangent plane, the partial derivative calculator elsewhere on the site covers those.
Two modes in one page
Scalar mode answers optimisation questions: where are the critical points, what kind are they, and how does the function curve at a given point. If the point you typed is not critical, the tool gives the length and direction of the gradient, the direction of steepest ascent, and says whether the Hessian there is positive definite, negative definite or indefinite. Vector mode answers change-of-variables and vector-field questions. The polar map preset confirms that det J = r, and the spherical preset simplifies the determinant all the way to ρ² sin φ using sin² + cos² = 1. The vector field preset shows curl and divergence for a three-dimensional field. Non-square Jacobians, such as a map from two inputs to three outputs, are handled and explained.
Worked example
For f = x³ − 3x + y² the gradient is (3x² − 3, 2y) and the Hessian has fxx = 6x, fxy = 0 and fyy = 2, so det H = 12x. Setting the gradient to zero gives the two points (1, 0) and (−1, 0). At (1, 0), D = 12 > 0 and fxx = 6 > 0, so it is a local minimum with f = −2; the Hessian eigenvalues are 2 and 6. At (−1, 0), D = −12 < 0, so it is a saddle point with f = 2. For the polar map (r cos θ, r sin θ) at r = 2, θ = π/4 the Jacobian determinant is r = 2, so small areas are doubled there.
Limits
The critical point search is numeric, so a point outside the search box, or a whole curve of critical points, may be missed or shown only by a few samples. When D = 0 or a Hessian eigenvalue is zero the second-derivative test gives no conclusion, and the tool says so rather than guessing. Long symbolic Hessian determinants are not always simplified to their shortest form.
Worked example
f = x³ − 3x + y²: local minimum (1, 0) with f = −2 and D = 12; saddle (−1, 0) with f = 2 and D = −12.
Quick facts
- Category: Math & Science
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: OpenStax Calculus Volume 3, sections 4.6, 4.7 and 5.7
Frequently asked questions
What is the difference between the Jacobian and the Hessian?
The Jacobian holds the first derivatives of a vector function, one row per component. The Hessian holds the second derivatives of a single scalar function; it is the Jacobian of the gradient.
How is a critical point classified?
By the signs of the Hessian eigenvalues there: all positive means a local minimum, all negative a local maximum, mixed signs a saddle. With two variables the tool also shows D = fxx·fyy − fxy².
Can I set the order of the variables?
Yes. Type them in the variables box, such as r, theta or rho, phi, theta. That order sets the columns of the Jacobian and the order of the point you evaluate at.
What does a zero Jacobian determinant mean?
The map squashes a neighbourhood of the point onto something lower-dimensional, so it has no differentiable local inverse there. In a change of variables such points must be handled separately.
When are divergence and curl shown?
For a square Jacobian in the variables x, y and z (or x and y). The divergence is the trace of J; the curl combines the off-diagonal entries.
How many critical points can it find?
Every isolated point inside the search box that Newton's method reaches from its several hundred starts. Increase the box if you expect points further from the origin.
