acalculator

What is the Jacobian?

Type the functions, such as r cos(t), r sin(t), and the variables, such as r, t. The page gives the Jacobian matrix and its determinant.

Your numbers

Jacobian determinant
2u^2 + 2v^2

The Jacobian determinant of u^2 - v^2, u v with respect to u, v is 2u^2 + 2v^2.

Jacobian matrix
[2u, -2v; v, u]

Jacobian determinant: 2u^2 + 2v^2. The Jacobian determinant of u^2 - v^2, u v with respect to u, v is 2u^2 + 2v^2.

How to calculate

Finds the Jacobian matrix and determinant of a change of variables, checked numerically.

Example with the default inputs (Functions u^2 - v^2, u v, Variables u, v): The Jacobian determinant of u^2 - v^2, u v with respect to u, v is 2u^2 + 2v^2.

Method: Partial derivatives from a CAS, each checked; the determinant by cofactors, simplified.

  • Radians. An answer that fails its check is not shown.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Functions u^2 - v^2, u v, Variables u, v gives Jacobian determinant 2u^2 + 2v^2, Jacobian matrix [2u, -2v; v, u].Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.7, Ex. 5.68
  2. Functions r cos(t), r sin(t), Variables r, t gives Jacobian determinant r.Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.7, Ex. 5.67

How it works

You type n functions (n = 2 or 3), separated by commas, and n different variables in order. The Jacobian matrix has one row per function and one column per variable: the entry in row i, column j is the partial derivative of function i with respect to variable j. The Jacobian determinant is the determinant of that matrix.

Partial derivatives. For each entry, a computer algebra system (nerdamer, open source) differentiates the function with respect to one variable while the other variables are held constant. The algebra runs after you start typing, in the background. Each entry is checked: at 15 fixed test points in all the variables (values such as 0.21, −0.37, 0.57, 1.33, −0.91 and up to ±8.93), a five-point central difference with steps h = 0.001 × max(1, |value|) and h/2 must match the formula to 10⁻⁶ × max(1, |slope|) (plus 10⁻¹¹ × |f| / h for rounding). Points where the function is not real, or where the two steps disagree, are skipped; at least 3 points must agree and none may disagree.

Determinant. The determinant is expanded by cofactors along the first row; each minor is simplified first. A form is simplified by three candidates: the form itself; the algebra’s expanded form; and that expanded form expanded again after each cos(u)² is written as 1 − sin(u)². The shortest written form is kept, and each expanded form must equal the determinant at the 15 test points to 10⁻⁹. So r cos(θ)² + r sin(θ)² becomes r.

What you can type

  • Variables: 2 or 3 different letters, separated by commas or spaces: u, v or r, t or x, y, z. Any lowercase letter except e (Euler’s number) works, and θ.
  • Functions: separated by commas, one per variable, using only those variables. pi (or π) is π.
  • Operations: + − * / and ^; brackets group; numbers and letters side by side multiply.
  • Functions: sqrt, cbrt, ln (and log), log10, exp, abs, sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh and their inverses. Angles are in radians.

How answers are written

  • Jacobian determinant: in the syntax you type, as MathML. Terms that are numbers times powers of the variables come first, highest total degree first, then by the powers of the letters in alphabetical order; other terms follow; a constant comes last. In a product, the sign comes in front, then numbers and constants, then powers of letters in alphabetical order (a letter that appears twice is one power: v v is v^2), then the other factors. The same order applies inside brackets and function arguments, except that the first term with a plus sign is moved to the front: sqrt(1 − x^2 y^2).
  • Jacobian matrix: entries in the same syntax, in brackets, entries in a row separated by commas, rows separated by semicolons: [2u, −2v; v, u].
  • An answer whose text holds a decimal point or a whole number of 9 or more digits (a number the algebra rounded) is not shown.

Assumptions

  • Angles are in radians; ln and log are the natural logarithm.
  • An answer that fails its check, finds no formula, or takes over 3 seconds is not shown ("No verified answer").

Worked examples by hand

x = u² − v², y = uv (OpenStax Calculus Volume 3, section 5.7, Example 5.68). ∂x/∂u = 2u, ∂x/∂v = −2v, ∂y/∂u = v, ∂y/∂v = u. The matrix is [2u, −2v; v, u] and the determinant is 2u · u − (−2v) · v = 2u² + 2v².

x = r cos θ, y = r sin θ (Example 5.67). The matrix is [cos θ, −r sin θ; sin θ, r cos θ], so J = r cos²θ + r sin²θ = r.

Other questions people ask

What is the Jacobian?

For a change of variables x = g(u, v), y = h(u, v), the Jacobian matrix holds the partial derivatives: the first row is ∂x/∂u, ∂x/∂v and the second row is ∂y/∂u, ∂y/∂v. Its determinant, the Jacobian J(u, v) = ∂(x, y)/∂(u, v), measures how the change of variables stretches area. It is the factor in dA = |J| du dv when you change variables in a double integral.

What is the Jacobian of polar coordinates?

For x = r cos θ, y = r sin θ, the Jacobian matrix is [cos θ, −r sin θ; sin θ, r cos θ] and its determinant is r cos²θ + r sin²θ = r. That is why dA = r dr dθ in polar coordinates. Type r cos(θ), r sin(θ) with the variables r, θ (or t in place of θ).

Why does the order of the variables matter?

The columns of the matrix follow the variables in the order you type them. Swapping two variables swaps two columns, which changes the sign of the determinant but not its absolute value. In a change of variables in an integral you use |J|, so the sign does not change the answer there.

How is the answer checked?

Each partial derivative comes from a computer algebra system and must match a numeric difference quotient at 15 test points. The determinant is built from those checked entries, and each simplified form of it must equal that determinant at the same 15 points. An answer that fails is not shown.

What about spherical coordinates?

For x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ the Jacobian determinant is ρ² sin φ in absolute value. With plain letters, type p sin(q) cos(t), p sin(q) sin(t), p cos(q) and the variables p, q, t to get p^2 sin(q); the order p, t, q gives −p^2 sin(q).

Can the Jacobian matrix be non-square?

In general yes, but this page is for changes of variables, so it takes as many functions as variables: 2 functions of 2 variables or 3 of 3. It then always gives the determinant too.