Partial derivative

A partial derivative of a function of many variables is the derivative of that function with respect to one of its arguments.

For example, if $f(x,y,z) = xy + z(x + y),$ then $f$ has three partial derivatives at the point $(3,4,12)$:

  • $\frac{\partial f}{\partial x} = (4x + 12(x + 4))' \rvert_{x = 3} = 16,$
  • $\frac{\partial f}{\partial y} = (3y + 12(3 + y))' \rvert_{y = 4} = 15,$
  • $\frac{\partial f}{\partial z} = (3*4 + z(3 + 4))' \rvert_{z = 12} = 7.$

Del operator

The del operator, or nabla symbol, written $\nabla$, represents the vector \[\left( \frac{\partial}{\partial x_1}, \frac{\partial}{\partial x_2}, \dots , \frac{\partial}{\partial x_n} \right)\] where the value $n$ is the arity (number of arguments) of the function in question.

Gradient

The product of $\nabla$ and a function $f(x_1, x_2, \dots, x_n)$ is \[\nabla f = \left( \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \dots , \frac{\partial f}{\partial x_n} \right),\] a vector storing, in order, all of the partial derivatives of $f$.

The gradient applies when $f$ is a scalar-valued function of many variables. For example, the gradient of temperature in a closed room is $\left( \frac{\partial T}{\partial x}, \frac{\partial T}{\partial y}, \frac{\partial T}{\partial z} \right)$, where $x$, $y$, and $z$ are the Cartesian coordinates in the three spatial dimensions: length, width, and height, respectively. $\frac{\partial T}{\partial x}$ and $\frac{\partial T}{\partial y}$ are likely to be close to zero at most points, but $\frac{\partial T}{\partial z}$ probably has a small positive value, since the air nearer the ceiling (greater $z$) is warmer than the air nearer the floor (lesser $z$). Therefore, the typical direction of the gradient vector $\nabla T$ is close to upwards.

Divergence

When $\mathbf{f}$ is a vector-valued function or vector field whose values are in the same dimensions as its arguments, the dot product of $\nabla$ with $\mathbf{f}$ yields the divergence \[\nabla \cdot \mathbf{f} =  \frac{\partial \mathbf{f}_{x_1}}{\partial x_1} + \frac{\partial \mathbf{f}_{x_2}}{\partial x_2} + \dots + \frac{\partial \mathbf{f}_{x_n}}{\partial x_n},\] where the notation $\mathbf{f}_{x_i}$ refers to the $x_i$-direction component of vector $\mathbf{f}$.

Informally, the divergence measures how much the field "spreads out" from a point. This is because the term in the sum corresponding to each dimension is positive if the change in the component of the field in the dimension agrees with change in the the argument coordinate in the dimension (pushing the field away from the point) and negative if the change in the component disagrees with change in the coordinate (pulling the field toward the point), with magnitude determined by the rate of such change of the field.

Curl

If $\mathbf{f}$ has values and arguments in three dimensions (here $x$, $y$, and $z$), then we can also take the cross product of $\nabla$ and $\mathbf{f}$ to obtain the curl as follows: \[\nabla \times \mathbf{f} = \left( \frac{\partial \mathbf{f}_z}{\partial y} - \frac{\partial \mathbf{f}_y}{\partial z}, \frac{\partial \mathbf{f}_x}{\partial z} - \frac{\partial \mathbf{f}_z}{\partial x}, \frac{\partial \mathbf{f}_y}{\partial x} - \frac{\partial \mathbf{f}_x}{\partial y} \right).\]

Because the cross product is perpendicular to its factors, and its magnitude is determined by how nearly perpendicular to each other the factors are, curl measures change of the field perpendicular to change in position; hence, how much the field curves around the point. According to the curl right-hand rule, the direction of the field around a point is counterclockwise from the perspective of the head of the curl vector at the point.

Applications

Partial derivatives (the gradient in particular) are crucial in multiple linear regression and therefore in artificial intelligence and machine learning.

See also