A directional derivative answers a simple local question: if a function is observed from a point and the input is nudged in one chosen direction, what is the instantaneous rate of change? In one-variable calculus there are only two directions along the real line, so the ordinary [derivative](/page/Derivative) already captures the local first-order behaviour. In several variables, a function may rise steeply in one direction, remain flat in another, and fail to have a coherent linear approximation even when every individual directional rate exists.
text
admin
This makes the directional derivative a bridge between elementary partial derivatives and the full total derivative. It is also the pointwise ancestor of the Gateaux derivative in functional analysis and the geometric source of the gradient in Euclidean spaces. The concept is useful because it separates two questions that are often conflated: whether a function has rates of change along lines, and whether those rates assemble into a single linear approximation.
text
admin
## Definition
h2
admin
For a real-valued function on an [open set](/page/Open%20Set) in Euclidean space, the most direct way to measure change in a direction is to restrict the function to the line through the point. The direction tells us which line to use; the ordinary one-variable limit then measures the slope of the resulting function at time $0$.
text
admin
[definition: Directional Derivative]
Let $U \subset \mathbb{R}^n$ be open, let $f: U \to \mathbb{R}$ be a function, let $a \in U$, and let $v \in \mathbb{R}^n$. The directional derivative of $f$ at $a$ in the direction $v$ is the limit
\begin{align*}
D_v f(a) = \lim_{t \to 0} \frac{f(a + tv) - f(a)}{t},
\end{align*}
when this limit exists in $\mathbb{R}$.
[/definition]
definition
admin
The vector $v$ is not required to have length $1$. Scaling $v$ changes the speed at which the line is traversed, so the value of $D_v f(a)$ records both the geometric direction and the chosen parametrisation. When the intent is only to measure slope per unit distance, the direction vector is usually normalised by requiring $|v| = 1$.
text
admin
[example: Linear Function in a Chosen Direction]
Let $f:\mathbb{R}^2\to\mathbb{R}$ be given by $f(x_1,x_2)=2x_1-x_2$. At $a=(0,0)$ in the direction $v=(3,1)$,
\begin{align*}
\frac{f(a+tv)-f(a)}{t}
=\frac{f(3t,t)-f(0,0)}{t}
=\frac{6t-t}{t}=5
\end{align*}
for $t\neq 0$. Hence $D_v f(0,0)=5$. If the unit direction $u=v/|v|=(3,1)/\sqrt{10}$ is used instead, the directional derivative is $5/\sqrt{10}$, so the length of the direction vector affects the parametrised rate.
[/example]
example
admin
Many arguments require evaluating the same directional rate at several points, rather than at one fixed point. A PDE estimate, an optimization algorithm, or a comparison of slopes along a vector field needs to know where the derivative exists as the base point moves. This motivates a function whose input is the base point and whose value is the directional derivative in a fixed direction.
text
admin
[definition: Directional Derivative Function]
Let $U \subset \mathbb{R}^n$ be open, let $f: U \to \mathbb{R}$ be a function, and let $v \in \mathbb{R}^n$. The directional derivative function in the direction $v$ is the function $D_v f: U_v \to \mathbb{R}$ defined by
\begin{align*}
D_v f(a)=\lim_{t \to 0}\frac{f(a+tv)-f(a)}{t}
\end{align*}
for every $a \in U_v$, where
\begin{align*}
U_v = \{a \in U : D_v f(a) \text{ exists}\}.
\end{align*}
[/definition]
definition
admin
Computations with arbitrary directions need a coordinate starting point, because formulas for functions of several variables are usually written in coordinates. We therefore need a named special case for changing only one coordinate at a time; this is the version that becomes the usual partial derivative.
text
admin
[definition: Coordinate Directional Derivative]
Let $U \subset \mathbb{R}^n$ be open, let $f: U \to \mathbb{R}$ be a function, let $a \in U$, and let $e_i \in \mathbb{R}^n$ be the $i$th standard basis vector. The coordinate directional derivative of $f$ at $a$ in the $i$th coordinate direction is
\begin{align*}
D_{e_i}f(a) = \lim_{t \to 0} \frac{f(a + te_i) - f(a)}{t},
\end{align*}
when this limit exists.
[/definition]
definition
admin
The coordinate directional derivative is usually written as $\partial_{x_i}f(a)$. The notation is shorter, but it should not hide the fact that this is still a directional derivative: it measures variation only along the line parallel to the $x_i$-axis.
text
admin
Two-sided line slopes are well suited to interior points of open domains. At boundary points of a feasible region, or at a corner of a nonsmooth function, the reverse direction may be unavailable or may describe a different physical question. The one-sided version keeps the initial forward rate while discarding the irrelevant reverse motion.
text
admin
[definition: One-Sided Directional Derivative]
Let $U \subset \mathbb{R}^n$, let $f: U \to \mathbb{R}$ be a function, let $a \in U$, and let $v \in \mathbb{R}^n$ be such that $a + tv \in U$ for all sufficiently small $t > 0$. The one-sided directional derivative of $f$ at $a$ in the direction $v$ is
\begin{align*}
D_v^+ f(a) = \lim_{t \downarrow 0} \frac{f(a + tv) - f(a)}{t},
\end{align*}
when this limit exists in $\mathbb{R}$.
[/definition]
definition
admin
The one-sided version is not a replacement for differentiability. It is a different local measurement, suited to boundaries, cones of feasible directions, and nonsmooth functions such as norms.
text
admin
## Equivalent Characterisations
h2
admin
The definition uses a line because a direction through a point gives a one-variable slice of the original function. Naming this slice helps compare directional derivatives with ordinary derivatives.
text
admin
[definition: Line Restriction]
Let $U \subset \mathbb{R}^n$ be open, let $f: U \to \mathbb{R}$ be a function, let $a \in U$, and let $v \in \mathbb{R}^n$. A line restriction of $f$ at $a$ in the direction $v$ is a function $g: I \to \mathbb{R}$ defined by
\begin{align*}
g(t)=f(a+tv),
\end{align*}
where $I \subset \mathbb{R}$ is an open interval containing $0$ and $a + tv \in U$ for every $t \in I$.
[/definition]
definition
admin
A directional derivative is defined by changing $f$ only along the line $a+tv$, so it should be recoverable from the ordinary derivative of the one-variable slice $g(t)=f(a+tv)$. The point that needs checking is that the two limiting processes use the same parameter $t$ and therefore produce the same number when the slice is differentiable at $0$.