jacobian

Jacobian matrix of a symbolic vector function.

Category: Mathematics > Calculus

Syntax

J = jacobian(f, v)

Matrix of the partial derivatives of each component of f with respect to each variable in v.

Description

The Jacobian is the linearization of a multi-variable map around a point. It is used in Newton's method for systems, in stability analysis of differential equations and in change of variables for integrals, where its determinant is the scaling factor. For a scalar f the Jacobian is the gradient as a row.

Input arguments

f
Scalar or vector of symbolic expressions.
v
Vector of symbolic variables.

Output arguments

J
Matrix with numel(f) rows and numel(v) columns; entry (i, j) is diff(f(i), v(j)).

Example

A 2-by-3 Jacobian

syms x y z
J = jacobian([x^2*y; x + z], [x y z])
Output
J = 
[2*x*y, x^2, 0]
[    1,   0, 1]

See also

hessian diff gradient det