# The directional derivative

Other languages:
English • ‎español
Series Geophysical References Series Digital Imaging and Deconvolution: The ABCs of Seismic Exploration and Processing Enders A. Robinson and Sven Treitel 2 http://dx.doi.org/10.1190/1.9781560801610 9781560801481 SEG Online Store

Given the function ${\displaystyle t(x)}$ of a single variable, the chain rule is

 {\displaystyle {\begin{aligned}{\frac {dt}{d\sigma }}&{\rm {=}}{\frac {dt}{dx}}{\frac {dx}{d\sigma }}.\end{aligned}}} (6)

The chain rule can be extended to functions of several variables. For example, the chain rule for ${\displaystyle t(x,y)}$ is

 {\displaystyle {\begin{aligned}{\frac {dt}{d\sigma }}&{\rm {=}}{\frac {\partial t}{\partial x}}{\frac {dx}{d\sigma }}{\rm {+}}{\frac {\partial t}{\partial y}}{\frac {dy}{d\sigma }}.\end{aligned}}} (7)

The directional derivative is a generalization of a partial derivative (Robinson and Clark, 2005a[1]). The partial derivatives give the rate of change of the traveltime in the directions of the axes. The directional derivative gives the rate of change in any specified direction. The traveltime ${\displaystyle t\left(x,y\right)}$ depends on both coordinate axes x, y. We might hold y constant and consider the curve that gives the variation of t with x alone. The slope ${\displaystyle \partial {\rm {/}}\partial x}$ of this curve is called the partial derivative of t with respect to x. We define the partial derivative ${\displaystyle \partial t/\partial y}$ similarly.

In general, we want to know the slope in some arbitrary direction. Recall that a unit vector is a vector with length, or magnitude, of one. We can convert any vector into a unit vector in the same direction by dividing the vector by its magnitude. Hence, the unit vector for direction angle ${\displaystyle \gamma }$ (as measured from the horizontal) can be represented by ${\displaystyle \mathbf {w=} \left({\rm {\ cos\ }}\gamma {\rm {,\ sin\ }}\gamma \right)}$. If we let ${\displaystyle \sigma }$ represent distance in the direction of the vector w, then

 {\displaystyle {\begin{aligned}{\frac {dx}{d\sigma }}&{\rm {=\ cos\ }}\gamma {\rm {\ }}{\frac {dy}{d\sigma }}{\rm {=\ sin\ }}\gamma .\end{aligned}}} (8)

The slope of ${\displaystyle t\left(x,y\right)}$ in the direction of this unit vector is called the directional derivative. The directional derivative is the weighted average of the two partial derivatives, the weights being the component of the unit directional vector. Thus, the directional derivative is given by the chain rule

 {\displaystyle {\begin{aligned}{\frac {\partial t}{\partial \sigma }}&{\rm {=}}{\frac {\partial t}{\partial x}}{\frac {dx}{d\sigma }}{\rm {+}}{\frac {\partial t}{\partial y}}{\frac {dy}{d\sigma }}{\rm {=}}{\frac {\partial t}{\partial x}}{\rm {\ cos\ }}\gamma {\rm {+}}{\frac {\partial t}{\partial y}}{\rm {\ sin\ }}\gamma {\rm {=}}\left({\frac {\partial t}{\partial x}},{\frac {\partial t}{\partial y}}\right)\cdot \left({\rm {\ cos\ }}\gamma {\rm {,\ sin\ }}\gamma \right).\end{aligned}}} (9)

This shows that The directional derivative is the dot product

 {\displaystyle {\begin{aligned}{\frac {\partial t}{\partial \sigma }}&{\rm {=}}\left({\frac {\partial t}{\partial x}}{\rm {\ ,\ }}{\frac {\partial t}{\partial y}}\right)\cdot \left({\rm {\ cos\ }}\gamma {\rm {,\ sin\ }}\gamma \right){\rm {=}}\mathrm {grad} {\textit {t}}\cdot \mathbf {w} .\end{aligned}}} (10)

The first vector in the dot product is the gradient of traveltime. The second vector is the unit vector in the desired direction. The partial derivatives are special cases of The directional derivatives. For instance, ${\displaystyle \partial t{\rm {/}}\partial x}$ is the directional derivative in the x-direction. The directional derivative can be written as

 {\displaystyle {\begin{aligned}{\frac {\partial t}{\partial \sigma }}&{\rm {=}}\mathrm {grad} {\textit {t}}\cdot \mathbf {w=|} \mathrm {grad} {\textit {t}}{\rm {|}}\cdot \mathbf {|w|\ cos\ } \alpha {\rm {=|}}\mathrm {grad} {\textit {t}}{\rm {|}}\cdot {\rm {\ cos\ }}\alpha ,\end{aligned}}} (11)

where ${\displaystyle \alpha }$ is the angle between the gradient and the directional vector. The maximum value of the directional derivative is obtained when the direction vector points in the same direction as the gradient, that is, when ${\displaystyle \alpha {\rm {=0}}}$. This maximum value is equal to the magnitude of the gradient. In other words, the gradient gives the direction of maximum slope. Suppose the directional vector points along a contour line. Because the contour line is level, the directional derivative in the direction of a contour line must be zero. Thus, ${\displaystyle {\rm {\ cos\ }}\alpha }$ must be zero, so ${\displaystyle \alpha }$ is ${\displaystyle {\rm {9}}0^{\rm {o}}}$. Therefore, the gradient vector is orthogonal (or perpendicular) to the contour line.

Let us now introduce the important concept of a flow line. A vector field is a rule that assigns a vector to each point (x,y). An important case is the vector field defined by the gradient. In visualizing such a vector field, we imagine that the vector grad t is attached to each point. Thus, the vector field assigns a direction and a magnitude to each point. If a hypothetical particle moves in such a manner that its direction at any point coincides with the direction of the gradient at that point, then the curve traces out a so-called flow line. Because the direction of the flow line is determined uniquely by the vector field, it is impossible to have two directions at the same point. Therefore, it is impossible to have two flow lines cross each other. The contour lines and the associated flow lines are important tools in understanding seismic wave motion (Robinson and Clark, 2007[2]).

## References

1. Robinson, E. A., and R. D. Clark, 2005a, Basic seismology 10 - The king’s chamber and seismic ray direction: The Leading Edge, 24, no. 5, 485–487.
2. Robinson, E. A., and R. D. Clark, 2007, Michael Faraday and the eikonal equation: The Leading Edge, 26, no. 1, 24–26.