# What is the difference/relationship between the gradient and the Jacobian?

What is the difference/relationship between the gradient and the Jacobian?

I think it has to do with vectors/covectors, tangent spaces / contangent spaces, but I'm not sure what's going on. (A gentle and readable but thorough reference in addition to an answer would be appreciated too.)

Let $$R$$ be the real numbers.
Let $$f: R^2 \longrightarrow R$$ be a smooth function.
Let $$p \in R^2$$.

(The Jacobian is typically defined for (differentiable?) functions $$f: R^n \longrightarrow R^m$$, but just set $$m$$ to 1.)

Now the gradient is a vector field, whose value at $$p$$ is a (column) vector (in particular, not a covector):

$$\nabla f(p) := \left[{\partial f \over \partial x_1}(p) \ \ {\partial f \over \partial x_2}(p)\right]^T$$

(with the convention that vectors are column vectors and covectors are row vectors).

And the Jacobian $$Jf(p)$$ is the $$1 \times 2$$ matrix (or just the row vector, ie. covector? what's the rigorous difference?):

$$Jf(p) := \left[\left[{\partial f \over \partial x_1}(p) \ \ {\partial f \over \partial x_2}(p)\right]\right].$$

In particular, since the gradient and the Jacobian are just "transposes" (duals) of each other, when would you use one or the other? What's the point?

There are related questions here, here, here, but I'm hoping for more insights.

• Calculus point of view: gradient is the Jacobian of a real function of two or more variables ($f:\mathbb R^n\to\mathbb R$). The difference is the name and the notation. Aug 23 at 9:27
• "... but just set $m=1$..." well, there you go, in the special case that $m=1$, the "gradient" and the "Jacobian" are formally identical. Aug 25 at 14:40

The gradient $$\nabla f$$ is usually defined for a scalar-valued function $$f$$ (with values in $$\mathbb R$$, say), whereas the Jacobian is defined for maps $$\mathbb R^n\to\mathbb R^m$$. Thus the Jacobian is a generalisation of the gradient. A more substantive difference exists between the gradient $$\nabla f$$ and the differential $$df$$, the point being is that the differential is intrinsic, whereas the gradient depends on the choice of a metric. In Euclidean space they can be thought of as being the same, but once one switches to a more general framework of manifolds, the difference becomes crucial. For example, in defining the de Rham cohomology of a differentiable manifold, one must use the differential $$df$$ because the gradient is not defined on a differentiable manifold without introducing a metric, which is not always desirable.

"Derivative", "gradient" and "Jacobian" are essentially the same. They all describe how your mapping $$f(x)$$ induces the linear mapping between tangent spaces $$T_x\mathbb{R}^n\to T_{f(x)}\mathbb{R}^m$$. It's just one is preferred over another when talking about specific dimensions:

• $$n=m=1$$: derivative
• $$n>1,m=1$$: gradient
• $$m>1$$: Jacobian

Whether to use row vectors or column vectors is mostly conventional, and it depends on how you want the matrix representation to be used in arithmetics. For example, a nice convention for the Jacobian is: $$Jf(x)=\left[\matrix{\frac{\partial f_1}{\partial x_1}&\cdots&\frac{\partial f_1}{\partial x_n}\\ &\ddots&\\ \frac{\partial f_m}{\partial x_1}&\cdots&\frac{\partial f_m}{\partial x_n}}\right]$$ because this allows you to write $$f(x)=f(x_0)+Jf(x_0)(x-x_0)+o(|x-x_0|).$$

Note that I use the word "describe" because derivative/gradient/Jacobian is generally considered as a scalar/vector/matrix field, not the mapping itself, but it can be used to represent the mapping (at least in Euclidean spaces; I am not sure about manifolds). The mapping between tangent spaces induced by $$f$$ is called the differential $$df$$ of $$f$$.

• second bullet point is misleading. The gradient is also used to mean a vector (field) associated to $df$ using an inner product. Aug 23 at 9:21
• @peek-a-boo I carefully chose the word "describe". The gradient vector field can be used to compute the differential mapping using the inner product. Aug 23 at 9:34