# What is the Jacobian?

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

- Page: https://www.acalculator.org/math/jacobian-calculator
- JSON spec: https://www.acalculator.org/math/jacobian-calculator.json
- Version: 602d0dd1202a

## Default answer

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.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Functions | x, y (and z) in terms of the variables, separated by commas. |
| v | Variables | The variables, in order, such as u, v. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| det | Jacobian determinant | The determinant of the Jacobian matrix. |
| matrix | Jacobian matrix | Row i holds the partial derivatives of function i; rows are separated by semicolons. |

## Method

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

## Assumptions

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

## Worked examples

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

## FAQ

### 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.

## Sources

- OpenStax, Calculus Volume 3, section 5.7 Change of Variables in Multiple Integrals: https://openstax.org/books/calculus-volume-3/pages/5-7-change-of-variables-in-multiple-integrals
