# Directional derivative

In mathematics, the directional derivative of a multivariate differentiable function along a given vector v at a given point x intuitively represents the instantaneous rate of change of the function, moving through x with a velocity specified by v. It therefore generalizes the notion of a partial derivative, in which the rate of change is taken along one of the curvilinear coordinate curves, all other coordinates being constant.

The directional derivative is a special case of the Gateaux derivative.

## Notation

Let $\phi$  be a curve whose tangent vector at some chosen point is v. The directional derivative of a function f with respect to v may be denoted by any of the following:

• $\nabla _{\mathbf {v} }{f}(\mathbf {x} ),$
• $f'_{\mathbf {v} }(\mathbf {x} ),$
• $D_{\mathbf {v} }f(\mathbf {x} ),$
• $Df(\mathbf {x} )(\mathbf {v} ),$
• $\partial _{\mathbf {v} }f(\mathbf {x} ),$
• $\mathbf {v} \cdot {\nabla f(\mathbf {x} )},$
• $\mathbf {v} \cdot {\frac {\partial f(\mathbf {x} )}{\partial \mathbf {x} }}.$

## Definition

A contour plot of $f(x,y)=x^{2}+y^{2}$ , showing the gradient vector in black, and the unit vector $\mathbf {u}$  scaled by the directional derivative in the direction of $\mathbf {u}$  in orange. The gradient vector is longer because the gradient points in the direction of greatest rate of increase of a function.

The directional derivative of a scalar function

$f(\mathbf {x} )=f(x_{1},x_{2},\ldots ,x_{n})$

along a vector

$\mathbf {v} =(v_{1},\ldots ,v_{n})$

is the function $\nabla _{\mathbf {v} }{f}$  defined by the limit

$\nabla _{\mathbf {v} }{f}(\mathbf {x} )=\lim _{h\to 0}{\frac {f(\mathbf {x} +h\mathbf {v} )-f(\mathbf {x} )}{h}}.$

This definition is valid in a broad range of contexts, for example where the norm of a vector (and hence a unit vector) is undefined.

If the function f is differentiable at x, then the directional derivative exists along any vector v, and one has

$\nabla _{\mathbf {v} }{f}(\mathbf {x} )=\nabla f(\mathbf {x} )\cdot \mathbf {v}$

where the $\nabla$  on the right denotes the gradient and $\cdot$  is the dot product. This follows from defining a path $h(t)=x+tv$  and using the definition of the derivative as a limit which can be calculated along this path to get:

{\begin{aligned}0&=\lim _{t\to 0}{\frac {f(x+tv)-f(x)-tD_{f}(x)(v)}{t}}\\&=\lim _{t\to 0}{\frac {f(x+tv)-f(x)}{t}}-D_{f}(x)(v)=\nabla _{v}f(x)-D_{f}(x)(v)\\\rightarrow &\nabla f(\mathbf {x} )\cdot \mathbf {v} =D_{f}(x)(v)=\nabla _{\mathbf {v} }{f}(\mathbf {x} )\end{aligned}}

Intuitively, the directional derivative of f at a point x represents the rate of change of f, in the direction of v with respect to time, when moving past x.

### Using only direction of vector

In a Euclidean space, some authors define the directional derivative to be with respect to an arbitrary nonzero vector v after normalization, thus being independent of its magnitude and depending only on its direction.

This definition gives the rate of increase of f per unit of distance moved in the direction given by v. In this case, one has

$\nabla _{\mathbf {v} }{f}(\mathbf {x} )=\lim _{h\to 0}{\frac {f(\mathbf {x} +h\mathbf {v} )-f(\mathbf {x} )}{h|\mathbf {v} |}},$

or in case f is differentiable at x,

$\nabla _{\mathbf {v} }{f}(\mathbf {x} )=\nabla f(\mathbf {x} )\cdot {\frac {\mathbf {v} }{|\mathbf {v} |}}.$

### Restriction to a unit vector

In the context of a function on a Euclidean space, some texts restrict the vector v to being a unit vector. With this restriction, both the above definitions are equivalent.

## Properties

Many of the familiar properties of the ordinary derivative hold for the directional derivative. These include, for any functions f and g defined in a neighborhood of, and differentiable at, p:

1. sum rule:
$\nabla _{\mathbf {v} }(f+g)=\nabla _{\mathbf {v} }f+\nabla _{\mathbf {v} }g.$
2. constant factor rule: For any constant c,
$\nabla _{\mathbf {v} }(cf)=c\nabla _{\mathbf {v} }f.$
3. product rule (or Leibniz's rule):
$\nabla _{\mathbf {v} }(fg)=g\nabla _{\mathbf {v} }f+f\nabla _{\mathbf {v} }g.$
4. chain rule: If g is differentiable at p and h is differentiable at g(p), then
$\nabla _{\mathbf {v} }(h\circ g)(\mathbf {p} )=h'(g(\mathbf {p} ))\nabla _{\mathbf {v} }g(\mathbf {p} ).$

## In differential geometry

Let M be a differentiable manifold and p a point of M. Suppose that f is a function defined in a neighborhood of p, and differentiable at p. If v is a tangent vector to M at p, then the directional derivative of f along v, denoted variously as df(v) (see Exterior derivative), $\nabla _{\mathbf {v} }f(\mathbf {p} )$  (see Covariant derivative), $L_{\mathbf {v} }f(\mathbf {p} )$  (see Lie derivative), or ${\mathbf {v} }_{\mathbf {p} }(f)$  (see Tangent space § Definition via derivations), can be defined as follows. Let γ : [−1, 1] → M be a differentiable curve with γ(0) = p and γ′(0) = v. Then the directional derivative is defined by

$\nabla _{\mathbf {v} }f(\mathbf {p} )=\left.{\frac {d}{d\tau }}f\circ \gamma (\tau )\right|_{\tau =0}.$

This definition can be proven independent of the choice of γ, provided γ is selected in the prescribed manner so that γ′(0) = v.

### The Lie derivative

The Lie derivative of a vector field $W^{\mu }(x)$  along a vector field $V^{\mu }(x)$  is given by the difference of two directional derivatives (with vanishing torsion):

${\mathcal {L}}_{V}W^{\mu }=(V\cdot \nabla )W^{\mu }-(W\cdot \nabla )V^{\mu }.$

In particular, for a scalar field $\phi (x)$ , the Lie derivative reduces to the standard directional derivative:

${\mathcal {L}}_{V}\phi =(V\cdot \nabla )\phi .$

### The Riemann tensor

Directional derivatives are often used in introductory derivations of the Riemann curvature tensor. Consider a curved rectangle with an infinitesimal vector δ along one edge and δ′ along the other. We translate a covector S along δ then δ′ and then subtract the translation along δ′ and then δ. Instead of building the directional derivative using partial derivatives, we use the covariant derivative. The translation operator for δ is thus

$1+\sum _{\nu }\delta ^{\nu }D_{\nu }=1+\delta \cdot D,$

and for δ′,

$1+\sum _{\mu }\delta '^{\mu }D_{\mu }=1+\delta '\cdot D.$

The difference between the two paths is then

$(1+\delta '\cdot D)(1+\delta \cdot D)S^{\rho }-(1+\delta \cdot D)(1+\delta '\cdot D)S^{\rho }=\sum _{\mu ,\nu }\delta '^{\mu }\delta ^{\nu }[D_{\mu },D_{\nu }]S_{\rho }.$

It can be argued that the noncommutativity of the covariant derivatives measures the curvature of the manifold:

$[D_{\mu },D_{\nu }]S_{\rho }=\pm \sum _{\sigma }R^{\sigma }{}_{\rho \mu \nu }S_{\sigma },$

where R is the Riemann curvature tensor and the sign depends on the sign convention of the author.

## In group theory

### Translations

In the Poincaré algebra, we can define an infinitesimal translation operator P as

$\mathbf {P} =i\nabla .$

(the i ensures that P is a self-adjoint operator) For a finite displacement λ, the unitary Hilbert space representation for translations is

$U(\mathbf {\lambda } )=\exp \left(-i\mathbf {\lambda } \cdot \mathbf {P} \right).$

By using the above definition of the infinitesimal translation operator, we see that the finite translation operator is an exponentiated directional derivative:

$U(\mathbf {\lambda } )=\exp \left(\mathbf {\lambda } \cdot \nabla \right).$

This is a translation operator in the sense that it acts on multivariable functions f(x) as

$U(\mathbf {\lambda } )f(\mathbf {x} )=\exp \left(\mathbf {\lambda } \cdot \nabla \right)f(\mathbf {x} )=f(\mathbf {x} +\mathbf {\lambda } ).$

### Rotations

The rotation operator also contains a directional derivative. The rotation operator for an angle θ, i.e. by an amount θ = |θ| about an axis parallel to ${\hat {\theta }}={\boldsymbol {\theta }}/\theta$  is

$U(R(\mathbf {\theta } ))=\exp(-i\mathbf {\theta } \cdot \mathbf {L} ).$

Here L is the vector operator that generates SO(3):

$\mathbf {L} ={\begin{pmatrix}0&0&0\\0&0&1\\0&-1&0\end{pmatrix}}\mathbf {i} +{\begin{pmatrix}0&0&-1\\0&0&0\\1&0&0\end{pmatrix}}\mathbf {j} +{\begin{pmatrix}0&1&0\\-1&0&0\\0&0&0\end{pmatrix}}\mathbf {k} .$

It may be shown geometrically that an infinitesimal right-handed rotation changes the position vector x by

$\mathbf {x} \rightarrow \mathbf {x} -\delta {\boldsymbol {\theta }}\times \mathbf {x} .$

So we would expect under infinitesimal rotation:

$U(R(\delta {\boldsymbol {\theta }}))f(\mathbf {x} )=f(\mathbf {x} -\delta {\boldsymbol {\theta }}\times \mathbf {x} )=f(\mathbf {x} )-(\delta {\boldsymbol {\theta }}\times \mathbf {x} )\cdot \nabla f.$

It follows that

$U(R(\delta \mathbf {\theta } ))=1-(\delta \mathbf {\theta } \times \mathbf {x} )\cdot \nabla .$

Following the same exponentiation procedure as above, we arrive at the rotation operator in the position basis, which is an exponentiated directional derivative:

$U(R(\mathbf {\theta } ))=\exp(-(\mathbf {\theta } \times \mathbf {x} )\cdot \nabla ).$

## Normal derivative

A normal derivative is a directional derivative taken in the direction normal (that is, orthogonal) to some surface in space, or more generally along a normal vector field orthogonal to some hypersurface. See for example Neumann boundary condition. If the normal direction is denoted by $\mathbf {n}$ , then the directional derivative of a function f is sometimes denoted as ${\frac {\partial f}{\partial n}}$ . In other notations,

${\frac {\partial f}{\partial \mathbf {n} }}=\nabla f(\mathbf {x} )\cdot \mathbf {n} =\nabla _{\mathbf {n} }{f}(\mathbf {x} )={\frac {\partial f}{\partial \mathbf {x} }}\cdot \mathbf {n} =Df(\mathbf {x} )[\mathbf {n} ].$

## In the continuum mechanics of solids

Several important results in continuum mechanics require the derivatives of vectors with respect to vectors and of tensors with respect to vectors and tensors. The directional directive provides a systematic way of finding these derivatives.

The definitions of directional derivatives for various situations are given below. It is assumed that the functions are sufficiently smooth that derivatives can be taken.

### Derivatives of scalar-valued functions of vectors

Let $f(\mathbf {v} )$  be a real-valued function of the vector $\mathbf {v}$ . Then the derivative of $f(\mathbf {v} )$  with respect to $\mathbf {v}$  (or at $\mathbf {v}$ ) in the direction $\mathbf {u}$  is defined as

${\frac {\partial f}{\partial \mathbf {v} }}\cdot \mathbf {u} =Df(\mathbf {v} )[\mathbf {u} ]=\left[{\frac {d}{d\alpha }}~f(\mathbf {v} +\alpha ~\mathbf {u} )\right]_{\alpha =0}$

for all vectors $\mathbf {u}$ .

Properties:

1. If $f(\mathbf {v} )=f_{1}(\mathbf {v} )+f_{2}(\mathbf {v} )$  then ${\frac {\partial f}{\partial \mathbf {v} }}\cdot \mathbf {u} =\left({\frac {\partial f_{1}}{\partial \mathbf {v} }}+{\frac {\partial f_{2}}{\partial \mathbf {v} }}\right)\cdot \mathbf {u} .$
2. If $f(\mathbf {v} )=f_{1}(\mathbf {v} )~f_{2}(\mathbf {v} )$  then ${\frac {\partial f}{\partial \mathbf {v} }}\cdot \mathbf {u} =\left({\frac {\partial f_{1}}{\partial \mathbf {v} }}\cdot \mathbf {u} \right)~f_{2}(\mathbf {v} )+f_{1}(\mathbf {v} )~\left({\frac {\partial f_{2}}{\partial \mathbf {v} }}\cdot \mathbf {u} \right).$
3. If $f(\mathbf {v} )=f_{1}(f_{2}(\mathbf {v} ))$  then ${\frac {\partial f}{\partial \mathbf {v} }}\cdot \mathbf {u} ={\frac {\partial f_{1}}{\partial f_{2}}}~{\frac {\partial f_{2}}{\partial \mathbf {v} }}\cdot \mathbf {u} .$

### Derivatives of vector-valued functions of vectors

Let $\mathbf {f} (\mathbf {v} )$  be a vector-valued function of the vector $\mathbf {v}$ . Then the derivative of $\mathbf {f} (\mathbf {v} )$  with respect to $\mathbf {v}$  (or at $\mathbf {v}$ ) in the direction $\mathbf {u}$  is the second-order tensor defined as

${\frac {\partial \mathbf {f} }{\partial \mathbf {v} }}\cdot \mathbf {u} =D\mathbf {f} (\mathbf {v} )[\mathbf {u} ]=\left[{\frac {d}{d\alpha }}~\mathbf {f} (\mathbf {v} +\alpha ~\mathbf {u} )\right]_{\alpha =0}$

for all vectors $\mathbf {u}$ .

Properties:

1. If $\mathbf {f} (\mathbf {v} )=\mathbf {f} _{1}(\mathbf {v} )+\mathbf {f} _{2}(\mathbf {v} )$  then ${\frac {\partial \mathbf {f} }{\partial \mathbf {v} }}\cdot \mathbf {u} =\left({\frac {\partial \mathbf {f} _{1}}{\partial \mathbf {v} }}+{\frac {\partial \mathbf {f} _{2}}{\partial \mathbf {v} }}\right)\cdot \mathbf {u} .$
2. If $\mathbf {f} (\mathbf {v} )=\mathbf {f} _{1}(\mathbf {v} )\times \mathbf {f} _{2}(\mathbf {v} )$  then ${\frac {\partial \mathbf {f} }{\partial \mathbf {v} }}\cdot \mathbf {u} =\left({\frac {\partial \mathbf {f} _{1}}{\partial \mathbf {v} }}\cdot \mathbf {u} \right)\times \mathbf {f} _{2}(\mathbf {v} )+\mathbf {f} _{1}(\mathbf {v} )\times \left({\frac {\partial \mathbf {f} _{2}}{\partial \mathbf {v} }}\cdot \mathbf {u} \right).$
3. If $\mathbf {f} (\mathbf {v} )=\mathbf {f} _{1}(\mathbf {f} _{2}(\mathbf {v} ))$  then ${\frac {\partial \mathbf {f} }{\partial \mathbf {v} }}\cdot \mathbf {u} ={\frac {\partial \mathbf {f} _{1}}{\partial \mathbf {f} _{2}}}\cdot \left({\frac {\partial \mathbf {f} _{2}}{\partial \mathbf {v} }}\cdot \mathbf {u} \right).$

### Derivatives of scalar-valued functions of second-order tensors

Let $f(\mathbf {S} )$  be a real-valued function of the second order tensor $\mathbf {S}$ . Then the derivative of $f(\mathbf {S} )$  with respect to $\mathbf {S}$  (or at $\mathbf {S}$ ) in the direction $\mathbf {T}$  is the second order tensor defined as

${\frac {\partial f}{\partial \mathbf {S} }}:\mathbf {T} =Df(\mathbf {S} )[\mathbf {T} ]=\left[{\frac {d}{d\alpha }}~f(\mathbf {S} +\alpha \mathbf {T} )\right]_{\alpha =0}$

for all second order tensors $\mathbf {T}$ .

Properties:

1. If $f(\mathbf {S} )=f_{1}(\mathbf {S} )+f_{2}(\mathbf {S} )$  then ${\frac {\partial f}{\partial \mathbf {S} }}:\mathbf {T} =\left({\frac {\partial f_{1}}{\partial \mathbf {S} }}+{\frac {\partial f_{2}}{\partial \mathbf {S} }}\right):\mathbf {T} .$
2. If $f(\mathbf {S} )=f_{1}(\mathbf {S} )~f_{2}(\mathbf {S} )$  then ${\frac {\partial f}{\partial \mathbf {S} }}:\mathbf {T} =\left({\frac {\partial f_{1}}{\partial \mathbf {S} }}:\mathbf {T} \right)~f_{2}(\mathbf {S} )+f_{1}(\mathbf {S} )~\left({\frac {\partial f_{2}}{\partial \mathbf {S} }}:\mathbf {T} \right).$
3. If $f(\mathbf {S} )=f_{1}(f_{2}(\mathbf {S} ))$  then ${\frac {\partial f}{\partial \mathbf {S} }}:\mathbf {T} ={\frac {\partial f_{1}}{\partial f_{2}}}~\left({\frac {\partial f_{2}}{\partial \mathbf {S} }}:\mathbf {T} \right).$

### Derivatives of tensor-valued functions of second-order tensors

Let $\mathbf {F} (\mathbf {S} )$  be a second order tensor-valued function of the second order tensor $\mathbf {S}$ . Then the derivative of $\mathbf {F} (\mathbf {S} )$  with respect to $\mathbf {S}$  (or at $\mathbf {S}$ ) in the direction $\mathbf {T}$  is the fourth order tensor defined as

${\frac {\partial \mathbf {F} }{\partial \mathbf {S} }}:\mathbf {T} =D\mathbf {F} (\mathbf {S} )[\mathbf {T} ]=\left[{\frac {d}{d\alpha }}~\mathbf {F} (\mathbf {S} +\alpha \mathbf {T} )\right]_{\alpha =0}$

for all second order tensors $\mathbf {T}$ .

Properties:

1. If $\mathbf {F} (\mathbf {S} )=\mathbf {F} _{1}(\mathbf {S} )+\mathbf {F} _{2}(\mathbf {S} )$  then ${\frac {\partial \mathbf {F} }{\partial \mathbf {S} }}:\mathbf {T} =\left({\frac {\partial \mathbf {F} _{1}}{\partial \mathbf {S} }}+{\frac {\partial \mathbf {F} _{2}}{\partial \mathbf {S} }}\right):\mathbf {T} .$
2. If $\mathbf {F} (\mathbf {S} )=\mathbf {F} _{1}(\mathbf {S} )\cdot \mathbf {F} _{2}(\mathbf {S} )$  then ${\frac {\partial \mathbf {F} }{\partial \mathbf {S} }}:\mathbf {T} =\left({\frac {\partial \mathbf {F} _{1}}{\partial \mathbf {S} }}:\mathbf {T} \right)\cdot \mathbf {F} _{2}(\mathbf {S} )+\mathbf {F} _{1}(\mathbf {S} )\cdot \left({\frac {\partial \mathbf {F} _{2}}{\partial \mathbf {S} }}:\mathbf {T} \right).$
3. If $\mathbf {F} (\mathbf {S} )=\mathbf {F} _{1}(\mathbf {F} _{2}(\mathbf {S} ))$  then ${\frac {\partial \mathbf {F} }{\partial \mathbf {S} }}:\mathbf {T} ={\frac {\partial \mathbf {F} _{1}}{\partial \mathbf {F} _{2}}}:\left({\frac {\partial \mathbf {F} _{2}}{\partial \mathbf {S} }}:\mathbf {T} \right).$
4. If $f(\mathbf {S} )=f_{1}(\mathbf {F} _{2}(\mathbf {S} ))$  then ${\frac {\partial f}{\partial \mathbf {S} }}:\mathbf {T} ={\frac {\partial f_{1}}{\partial \mathbf {F} _{2}}}:\left({\frac {\partial \mathbf {F} _{2}}{\partial \mathbf {S} }}:\mathbf {T} \right).$