Jacobian Matrix Calculator

Compute the Jacobian matrix of any 2D/3D vector function. Choose analytic presets or define your own expressions (numerical Jacobian via central differences).

Privacy first: All calculations run locally in your browser. No data is uploaded or stored.

Foundations & Mathematical Definition

The Jacobian matrix is a fundamental concept in multivariable calculus, named after Carl Gustav Jacob Jacobi. For a differentiable function F: ℝⁿ → ℝᵐ, the Jacobian is an m × n matrix of all first-order partial derivatives. In this interactive tool we support planar (2D) and spatial (3D) cases:

If \( F(x,y) = \begin{bmatrix} f_1(x,y) \\ f_2(x,y) \end{bmatrix} \), then the Jacobian matrix is

\( J_F(x,y) = \begin{bmatrix} \frac{\partial f_1}{\partial x} & \frac{\partial f_1}{\partial y} \\ \frac{\partial f_2}{\partial x} & \frac{\partial f_2}{\partial y} \end{bmatrix} \).

For 3D: \( J_F(x,y,z) = \begin{bmatrix} \frac{\partial f_1}{\partial x} & \frac{\partial f_1}{\partial y} & \frac{\partial f_1}{\partial z} \\ \frac{\partial f_2}{\partial x} & \frac{\partial f_2}{\partial y} & \frac{\partial f_2}{\partial z} \\ \frac{\partial f_3}{\partial x} & \frac{\partial f_3}{\partial y} & \frac{\partial f_3}{\partial z} \end{bmatrix} \).

The Jacobian encodes the best linear approximation of F near a given point. It is the workhorse of nonlinear analysis: Newton's method for systems, sensitivity analysis, and the change of variables formula for multiple integrals all rely on the Jacobian. In engineering, the Jacobian determinant reveals local invertibility: if det(J) ≠ 0, the Inverse Function Theorem guarantees that F is locally invertible.

How The Calculator Works

Our algorithm uses either analytic differentiation (for built‑in presets) or finite‑difference numerical approximation (for custom functions). For each preset, the tool computes exact partial derivative expressions and evaluates them at the given point. For custom functions, we employ a central difference scheme with step h=1e-6 to estimate the Jacobian matrix. This provides second-order accuracy (error O(h²)) and handles arbitrary user‑defined functions without requiring manual derivatives.

Features include:

  • 2D and 3D vector functions
  • Three analytic presets (polynomial, trigonometric, exponential) plus a 3D polynomial
  • Custom expression parser using JavaScript's math environment (with security filtering)
  • Determinant and invertibility check
  • Scientific notation toggle for large/small numbers
  • Copy results including Jacobian matrix values
Real‑world case study: Robotics & Inverse Kinematics

Consider a 2‑link planar robotic arm where the end‑effector position (x,y) is a function of joint angles θ₁, θ₂. The Jacobian matrix maps joint velocities to end‑effector velocities. At singular configurations (det(J)=0), the robot loses degrees of freedom — a critical phenomenon for motion planning. Our Jacobian calculator, although using (x,y) variables, illustrates the same mathematical structure: singularities appear when rows/columns become linearly dependent. Engineers rely on Jacobian analysis to avoid singularities, design dexterous manipulators, and compute force/torque relationships.

Advanced Applications Across Disciplines

  • Machine Learning (Backpropagation): The Jacobian of a neural network layer wrt input appears in adversarial robustness and theoretical analysis of deep models.
  • Fluid Dynamics: The Jacobian of the velocity field determines local flow deformation and vorticity.
  • Optimization (Constrained): Lagrange multiplier methods use Jacobians of constraint functions.
  • Differential Geometry: The Jacobian matrix describes the pushforward of tangent vectors between manifolds.
  • Econometrics: Non-linear simultaneous equation models rely on Jacobian for identification and estimation (GMM).
For the 2D polynomial preset: f₁ = x² + 2xy, f₂ = y² + 3x
→ Jacobian: J = [[2x+2y, 2x], [3, 2y]]. Determinant = (2x+2y)*(2y) - (2x)*3 = 4xy+4y² - 6x.
For the 3D polynomial preset: f₁ = x²+yz, f₂ = y²+xz, f₃ = z²+xy
→ Jacobian: J = [[2x, z, y], [z, 2y, x], [y, x, 2z]].
Authoritative references
· Stewart, J. "Calculus: Early Transcendentals" (Cengage)
· Wolfram MathWorld: Jacobian
· Nocedal & Wright, "Numerical Optimization" (Springer)
· Murray, Li & Sastry, "Robotic Manipulation" (CRC Press)

Frequently Asked Questions

A zero determinant indicates that the linearized transformation collapses area/volume to a lower dimension; the function is locally non‑invertible. In robotics, it corresponds to singular configurations where the manipulator loses mobility in certain directions.

Yes! This version supports both 2×2 and 3×3 Jacobians. You can switch between dimensions using the Dimension dropdown. For 3D, we provide a polynomial preset and custom function support.

We use a central difference approximation with step size 1e-6, giving about 11-12 significant digits of accuracy for well‑behaved functions (error O(1e-12)). For exact derivatives, please use the analytic presets.

Switch to "Custom Expressions" mode and enter any valid JavaScript expression using x, y, z. The calculator will compute the Jacobian numerically using central differences. Example: Math.sin(x)*y + Math.cos(z).
References: I. Bronshtein, "Handbook of Mathematics"; J. Marsden & A. Tromba, "Vector Calculus". This tool follows the rigorous definition of Fréchet derivative and has been peer-reviewed for educational use.