# Jacobian matrix and determinant

In vector calculus, the Jacobian matrix (/əˈkbiən/,[1][2][3] /ɪ-, jɪ-/) of a vector-valued function in several variables is the matrix of all its first-order partial derivatives. When this matrix is square, that is, when the function takes the same number of variables as input as the number of vector components of its output, its determinant is referred to as the Jacobian determinant. Both the matrix and (if applicable) the determinant are often referred to simply as the Jacobian in literature.[4]

Suppose f : ℝn → ℝm is a function such that each of its first-order partial derivatives exist on n. This function takes a point x ∈ ℝn as input and produces the vector f(x) ∈ ℝm as output. Then the Jacobian matrix of f is defined to be an m×n matrix, denoted by J, whose (i,j)th entry is ${\displaystyle \mathbf {J} _{ij}={\frac {\partial f_{i}}{\partial x_{j}}}}$, or explicitly

${\displaystyle \mathbf {J} ={\begin{bmatrix}{\dfrac {\partial \mathbf {f} }{\partial x_{1}}}&\cdots &{\dfrac {\partial \mathbf {f} }{\partial x_{n}}}\end{bmatrix}}={\begin{bmatrix}{\dfrac {\partial f_{1}}{\partial x_{1}}}&\cdots &{\dfrac {\partial f_{1}}{\partial x_{n}}}\\\vdots &\ddots &\vdots \\{\dfrac {\partial f_{m}}{\partial x_{1}}}&\cdots &{\dfrac {\partial f_{m}}{\partial x_{n}}}\end{bmatrix}}.}$

This matrix, whose entries are functions of x, is denoted in various ways; common notations include ${\displaystyle D\mathbf {f} }$, ${\displaystyle \mathbf {J} _{\mathbf {f} }}$, ${\displaystyle \nabla \mathbf {f} }$, and ${\displaystyle {\frac {\partial (f_{1},..,f_{m})}{\partial (x_{1},..,x_{n})}}}$ . Note also that some authors define the Jacobian as the transpose of the form given above.

The Jacobian matrix represents the differential of f at every point where f is differentiable. In detail, if h is a displacement vector represented by a column matrix, the matrix product J(x) ⋅ h is another displacement vector, that is the best approximation of the change of f in a neighborhood of x, if f(x) is differentiable at x.[a] This means that the function that maps y to f(x) + J(x) ⋅ (yx) is the best linear approximation of f for points close to x. This linear function is known as the derivative or the differential of f at x.

When m = n, the Jacobian matrix is square, so its determinant is a well-defined function of x, known as the Jacobian determinant of f. It carries important information about the local behavior of f. In particular, the function f has locally in the neighborhood of a point x an inverse function that is differentiable if and only if the Jacobian determinant is nonzero at x (see Jacobian conjecture). The Jacobian determinant also appears when changing the variables in multiple integrals (see substitution rule for multiple variables).

When m = 1, that is when f : ℝn → ℝ is a scalar-valued function, the Jacobian matrix reduces to a row vector. This row vector of all first-order partial derivatives of f is the transpose of the gradient of f, i.e. ${\displaystyle \mathbf {J} _{f}=(\nabla f)^{\intercal }}$. Here we are adopting the convention that the gradient vector ${\displaystyle \nabla f}$ is a column vector. Specialising further, when m = n = 1, that is when f : ℝ → ℝ is a scalar-valued function of a single variable, the Jacobian matrix has a single entry. This entry is the derivative of the function f.

These concepts are named after the mathematician Carl Gustav Jacob Jacobi (1804–1851).

## Jacobian matrix

The Jacobian of a vector-valued function in several variables generalizes the gradient of a scalar-valued function in several variables, which in turn generalizes the derivative of a scalar-valued function of a single variable. In other words, the Jacobian matrix of a scalar-valued function in several variables is (the transpose of) its gradient and the gradient of a scalar-valued function of a single variable is its derivative.

At each point where a function is differentiable, its Jacobian matrix can also be thought of as describing the amount of "stretching", "rotating" or "transforming" that the function imposes locally near that point. For example, if (x′, y′) = f(x, y) is used to smoothly transform an image, the Jacobian matrix Jf(x, y), describes how the image in the neighborhood of (x, y) is transformed.

If a function is differentiable at a point, its differential is given in coordinates by the Jacobian matrix. However a function does not need to be differentiable for its Jacobian matrix to be defined, since only its first-order partial derivatives are required to exist.

If f is differentiable at a point p in n, then its differential is represented by Jf(p). In this case, the linear transformation represented by Jf(p) is the best linear approximation of f near the point p, in the sense that

${\displaystyle \mathbf {f} (\mathbf {x} )-\mathbf {f} (\mathbf {p} )=\mathbf {J} _{\mathbf {f} }(\mathbf {p} )(\mathbf {x} -\mathbf {p} )+o(\|\mathbf {x} -\mathbf {p} \|)\quad ({\text{as }}\mathbf {x} \to \mathbf {p} ),}$

where o(‖xp‖) is a quantity that approaches zero much faster than the distance between x and p does as x approaches p. This approximation specializes to the approximation of a scalar function of a single variable by its Taylor polynomial of degree one, namely

${\displaystyle f(x)-f(p)=f'(p)(x-p)+o(x-p)\quad ({\text{as }}x\to p)}$.

In this sense, the Jacobian may be regarded as a kind of "first-order derivative" of a vector-valued function of several variables. In particular, this means that the gradient of a scalar-valued function of several variables may too be regarded as its "first-order derivative".

Composable differentiable functions f : ℝn → ℝm and g : ℝm → ℝk satisfy the chain rule, namely ${\displaystyle \mathbf {J} _{\mathbf {g} \circ \mathbf {f} }(\mathbf {x} )=\mathbf {J} _{\mathbf {g} }(\mathbf {f} (\mathbf {x} ))\mathbf {J} _{\mathbf {f} }(\mathbf {x} )}$ for x in n.

The Jacobian of the gradient of a scalar function of several variables has a special name: the Hessian matrix, which in a sense is the "second derivative" of the function in question.

## Jacobian determinant

A nonlinear map ${\displaystyle f\colon \mathbb {R} ^{2}\to \mathbb {R} ^{2}}$ sends a small square (left, in red) to a distorted parallelogram (right, in red). The Jacobian at a point gives the best linear approximation of the distorted parallelogram near that point (right, in translucent white), and the Jacobian determinant gives the ratio of the area of the approximating parallelogram to that of the original square.

If m = n, then f is a function from n to itself and the Jacobian matrix is a square matrix. We can then form its determinant, known as the Jacobian determinant. The Jacobian determinant is sometimes simply referred to as "the Jacobian".

The Jacobian determinant at a given point gives important information about the behavior of f near that point. For instance, the continuously differentiable function f is invertible near a point p ∈ ℝn if the Jacobian determinant at p is non-zero. This is the inverse function theorem. Furthermore, if the Jacobian determinant at p is positive, then f preserves orientation near p; if it is negative, f reverses orientation. The absolute value of the Jacobian determinant at p gives us the factor by which the function f expands or shrinks volumes near p; this is why it occurs in the general substitution rule.

The Jacobian determinant is used when making a change of variables when evaluating a multiple integral of a function over a region within its domain. To accommodate for the change of coordinates the magnitude of the Jacobian determinant arises as a multiplicative factor within the integral. This is because the n-dimensional dV element is in general a parallelepiped in the new coordinate system, and the n-volume of a parallelepiped is the determinant of its edge vectors.

The Jacobian can also be used to solve systems of differential equations at an equilibrium point or approximate solutions near an equilibrium point. Its applications include determining the stability of the disease-free equilibrium in disease modelling.[5]

## Inverse

According to the inverse function theorem, the matrix inverse of the Jacobian matrix of an invertible function is the Jacobian matrix of the inverse function. That is, if the Jacobian of the function f : ℝn → ℝn is continuous and nonsingular at the point p in n, then f is invertible when restricted to some neighborhood of p and

${\displaystyle \mathbf {J} _{\mathbf {f} ^{-1}}\circ \mathbf {f} ={\mathbf {J} _{\mathbf {f} }}^{-1}.}$

Conversely, if the Jacobian determinant is not zero at a point, then the function is locally invertible near this point, that is, there is a neighbourhood of this point in which the function is invertible.

The (unproved) Jacobian conjecture is related to global invertibility in the case of a polynomial function, that is a function defined by n polynomials in n variables. It asserts that, if the Jacobian determinant is a non-zero constant (or, equivalently, that it does not have any complex zero), then the function is invertible and its inverse is a polynomial function.

## Critical points

If f : ℝn → ℝm is a differentiable function, a critical point of f is a point where the rank of the Jacobian matrix is not maximal. This means that the rank at the critical point is lower than the rank at some neighbour point. In other words, let k be the maximal dimension of the open balls contained in the image of f; then a point is critical if all minors of rank k of f are zero.

In the case where m = n = k, a point is critical if the Jacobian determinant is zero.

## Examples

### Example 1

Consider the function f : ℝ2 → ℝ2, with (x, y) ↦ (f1(x, y), f2(x, y)), given by

${\displaystyle \mathbf {f} \left({\begin{bmatrix}x\\y\end{bmatrix}}\right)={\begin{bmatrix}f_{1}(x,y)\\f_{2}(x,y)\end{bmatrix}}={\begin{bmatrix}x^{2}y\\5x+\sin y\end{bmatrix}}.}$

Then we have

${\displaystyle f_{1}(x,y)=x^{2}y}$

and

${\displaystyle f_{2}(x,y)=5x+\sin y}$

and the Jacobian matrix of f is

${\displaystyle \mathbf {J} _{\mathbf {f} }(x,y)={\begin{bmatrix}{\dfrac {\partial f_{1}}{\partial x}}&{\dfrac {\partial f_{1}}{\partial y}}\\[1em]{\dfrac {\partial f_{2}}{\partial x}}&{\dfrac {\partial f_{2}}{\partial y}}\end{bmatrix}}={\begin{bmatrix}2xy&x^{2}\\5&\cos y\end{bmatrix}}}$

and the Jacobian determinant is

${\displaystyle \det(\mathbf {J} _{\mathbf {f} }(x,y))=2xy\cos y-5x^{2}.}$

### Example 2: polar-Cartesian transformation

The transformation from polar coordinates (r, φ) to Cartesian coordinates (x, y), is given by the function F: ℝ+ × [0, 2π) → ℝ2 with components:

{\displaystyle {\begin{aligned}x&=r\cos \varphi ;\\y&=r\sin \varphi .\end{aligned}}}
${\displaystyle \mathbf {J} _{\mathbf {F} }(r,\varphi )={\begin{bmatrix}{\dfrac {\partial x}{\partial r}}&{\dfrac {\partial x}{\partial \varphi }}\\[1em]{\dfrac {\partial y}{\partial r}}&{\dfrac {\partial y}{\partial \varphi }}\end{bmatrix}}={\begin{bmatrix}\cos \varphi &-r\sin \varphi \\\sin \varphi &r\cos \varphi \end{bmatrix}}}$

The Jacobian determinant is equal to r. This can be used to transform integrals between the two coordinate systems:

${\displaystyle \iint _{\mathbf {F} (A)}f(x,y)\,dx\,dy=\iint _{A}f(r\cos \varphi ,r\sin \varphi )\,r\,dr\,d\varphi .}$

### Example 3: spherical-Cartesian transformation

The transformation from spherical coordinates (ρ, φ, θ)[6] to Cartesian coordinates (x, y, z), is given by the function F: ℝ+ × [0, π) × [0, 2π) → ℝ3 with components:

{\displaystyle {\begin{aligned}x&=\rho \sin \varphi \cos \theta ;\\y&=\rho \sin \varphi \sin \theta ;\\z&=\rho \cos \varphi .\end{aligned}}}

The Jacobian matrix for this coordinate change is

${\displaystyle \mathbf {J} _{\mathbf {F} }(\rho ,\varphi ,\theta )={\begin{pmatrix}{\dfrac {\partial x}{\partial \rho }}&{\dfrac {\partial x}{\partial \varphi }}&{\dfrac {\partial x}{\partial \theta }}\\[1em]{\dfrac {\partial y}{\partial \rho }}&{\dfrac {\partial y}{\partial \varphi }}&{\dfrac {\partial y}{\partial \theta }}\\[1em]{\dfrac {\partial z}{\partial \rho }}&{\dfrac {\partial z}{\partial \varphi }}&{\dfrac {\partial z}{\partial \theta }}\end{pmatrix}}={\begin{pmatrix}\sin \varphi \cos \theta &\rho \cos \varphi \cos \theta &-\rho \sin \varphi \sin \theta \\\sin \varphi \sin \theta &\rho \cos \varphi \sin \theta &\rho \sin \varphi \cos \theta \\\cos \varphi &-\rho \sin \varphi &0\end{pmatrix}}.}$

What this represents in the spherical-Cartesian transformation is the ratio of area of the new basis (the spherical basis) relative to the original basis (x, y, z).[clarification needed]

The determinant is ρ2 sin φ. As an example, since dV = dx dy dz this determinant implies that the differential volume element dV = ρ2 sin φ . This determinant is not a constant, and varies with coordinates (ρ and φ). It can be used to transform integrals between the two coordinate systems:

${\displaystyle \iiint _{\mathbf {F} (U)}f(x,y,z)\,dx\,dy\,dz=\iiint _{U}f(\rho \sin \varphi \cos \theta ,\rho \sin \varphi \sin \theta ,\rho \cos \varphi )\,\rho ^{2}\sin \varphi \,d\rho \,d\varphi \,d\theta .}$

### Example 4

The Jacobian matrix of the function F : ℝ3 → ℝ4 with components

{\displaystyle {\begin{aligned}y_{1}&=x_{1}\\y_{2}&=5x_{3}\\y_{3}&=4x_{2}^{2}-2x_{3}\\y_{4}&=x_{3}\sin x_{1}\end{aligned}}}

is

${\displaystyle \mathbf {J} _{\mathbf {F} }(x_{1},x_{2},x_{3})={\begin{bmatrix}{\dfrac {\partial y_{1}}{\partial x_{1}}}&{\dfrac {\partial y_{1}}{\partial x_{2}}}&{\dfrac {\partial y_{1}}{\partial x_{3}}}\\[1em]{\dfrac {\partial y_{2}}{\partial x_{1}}}&{\dfrac {\partial y_{2}}{\partial x_{2}}}&{\dfrac {\partial y_{2}}{\partial x_{3}}}\\[1em]{\dfrac {\partial y_{3}}{\partial x_{1}}}&{\dfrac {\partial y_{3}}{\partial x_{2}}}&{\dfrac {\partial y_{3}}{\partial x_{3}}}\\[1em]{\dfrac {\partial y_{4}}{\partial x_{1}}}&{\dfrac {\partial y_{4}}{\partial x_{2}}}&{\dfrac {\partial y_{4}}{\partial x_{3}}}\end{bmatrix}}={\begin{bmatrix}1&0&0\\0&0&5\\0&8x_{2}&-2\\x_{3}\cos x_{1}&0&\sin x_{1}\end{bmatrix}}.}$

This example shows that the Jacobian matrix need not be a square matrix.

### Example 5

The Jacobian determinant of the function F : ℝ3 → ℝ3 with components

{\displaystyle {\begin{aligned}y_{1}&=5x_{2}\\y_{2}&=4x_{1}^{2}-2\sin(x_{2}x_{3})\\y_{3}&=x_{2}x_{3}\end{aligned}}}

is

${\displaystyle {\begin{vmatrix}0&5&0\\8x_{1}&-2x_{3}\cos(x_{2}x_{3})&-2x_{2}\cos(x_{2}x_{3})\\0&x_{3}&x_{2}\end{vmatrix}}=-8x_{1}{\begin{vmatrix}5&0\\x_{3}&x_{2}\end{vmatrix}}=-40x_{1}x_{2}.}$

From this we see that F reverses orientation near those points where x1 and x2 have the same sign; the function is locally invertible everywhere except near points where x1 = 0 or x2 = 0. Intuitively, if one starts with a tiny object around the point (1, 2, 3) and apply F to that object, one will get a resulting object with approximately 40 × 1 × 2 = 80 times the volume of the original one, with orientation reversed.

## Other uses

The Jacobian serves as a linearized design matrix in statistical regression and curve fitting; see non-linear least squares.

### Dynamical systems

Consider a dynamical system of the form ${\displaystyle {\dot {\mathbf {x} }}=F(\mathbf {x} )}$, where ${\displaystyle {\dot {\mathbf {x} }}}$ is the (component-wise) derivative of ${\displaystyle \mathbf {x} }$ with respect to the evolution parameter ${\displaystyle t}$ (time), and ${\displaystyle F\colon \mathbb {R} ^{n}\to \mathbb {R} ^{n}}$ is differentiable. If ${\displaystyle F(\mathbf {x} _{0})=0}$, then ${\displaystyle \mathbf {x} _{0}}$ is a stationary point (also called a steady state). By the Hartman–Grobman theorem, the behavior of the system near a stationary point is related to the eigenvalues of ${\displaystyle \mathbf {J} _{F}\left(\mathbf {x} _{0}\right)}$, the Jacobian of ${\displaystyle F}$ at the stationary point.[7] Specifically, if the eigenvalues all have real parts that are negative, then the system is stable near the stationary point, if any eigenvalue has a real part that is positive, then the point is unstable. If the largest real part of the eigenvalues is zero, the Jacobian matrix does not allow for an evaluation of the stability.[8]

### Newton's method

A square system of coupled nonlinear equations can be solved iteratively by Newton's method. This method uses the Jacobian matrix of the system of equations.

### Surface analysis

Let n = 2 so the Jacobian is a 2 × 2 real matrix. Suppose a surface diffeomorphism f: UV in the neighborhood of p in U is written ${\displaystyle (u(x,y),\ v(x,y)).}$ The matrix ${\displaystyle \mathbf {J} _{\mathbf {f} }(\mathbf {p} )}$ can be interpreted as a complex number: ordinary, split, or dual. Furthermore, since ${\displaystyle \mathbf {J} _{\mathbf {f} }(\mathbf {p} )}$ is invertible, the complex number has a polar decomposition or an alternative planar decomposition.

And again, each such complex number represents a group action on the tangent plane at p. The action is dilation by the norm of the complex number, and rotation respecting angle, hyperbolic angle, or slope, according to the case of ${\displaystyle \mathbf {J} _{\mathbf {f} }(\mathbf {p} ).}$ Such action corresponds to a conformal mapping.

## Notes

1. ^ Differentiability at x implies, but is not implied by, the existence of all first-order partial derivatives at x, and hence is a stronger condition.

## References

1. ^ "Jacobian - Definition of Jacobian in English by Oxford Dictionaries". Oxford Dictionaries - English. Archived from the original on 1 December 2017. Retrieved 2 May 2018.
2. ^ "the definition of jacobian". Dictionary.com. Archived from the original on 1 December 2017. Retrieved 2 May 2018.
3. ^ Team, Forvo. "Jacobian pronunciation: How to pronounce Jacobian in English". forvo.com. Retrieved 2 May 2018.
4. ^ W., Weisstein, Eric. "Jacobian". mathworld.wolfram.com. Archived from the original on 3 November 2017. Retrieved 2 May 2018.
5. ^ Smith? RJ (2015). "The Joys of the Jacobian". Chalkdust. 2: 10–17.
6. ^ Joel Hass, Christopher Heil, and Maurice Weir. Thomas' Calculus Early Transcendentals, 14e. Pearson, 2018, p. 959.
7. ^ Arrowsmith, D. K.; Place, C. M. (1992). "The Linearization Theorem". Dynamical Systems: Differential Equations, Maps, and Chaotic Behaviour. London: Chapman & Hall. pp. 77–81. ISBN 0-412-39080-9.
8. ^ Hirsch, Morris; Smale, Stephen (1974). Differential Equations, Dynamical Systems and Linear Algebra. ISBN 0-12-349550-4.