📚 Directional Derivative in Terms of Gradient | 用梯度表示方向导数
In multivariable calculus, the ability to measure how a function changes in any given direction is essential. The directional derivative generalises the idea of a partial derivative, and it can be expressed elegantly using the gradient vector. This article explores the definition, geometric meaning, and key properties that link the directional derivative directly to the gradient.
在多变量微积分中,测量函数沿任意方向的变化率是一项核心能力。方向导数将偏导数的概念加以推广,并能借助梯度向量简洁地表达。本文将探讨方向导数的定义、几何意义,以及将方向导数与梯度直接联系起来的关键性质。
1. Introduction to Directional Derivatives | 方向导数简介
A function of one variable has a single derivative that gives the rate of change along the x-axis. For a function of two or more variables, the rate of change depends on the direction in which we move. The directional derivative extends the idea of a derivative to an arbitrary direction specified by a unit vector.
单变量函数只有一个导数,它给出沿 x 轴方向的变化率。对于两个或更多变量的函数,变化率取决于我们移动的方向。方向导数将导数的概念推广到由一个单位向量指定的任意方向。
2. Gradient Vector Definition | 梯度向量的定义
The gradient of a differentiable scalar function f(x, y) is a vector field whose components are the partial derivatives. In two dimensions it is written as:
可微标量函数 f(x, y) 的梯度是一个向量场,其分量就是偏导数。在二维情形下,它记作:
∇f = (∂f/∂x , ∂f/∂y)
For a function of three variables f(x, y, z), the gradient is ∇ nt points in the direction of the greatest rate of increase of f, and its magnitude equals that maximum rate.
对于三元函数 f(x, y, z),梯度为 ∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z)。梯度指向 f 增加最快的方向,其模长等于那个最大变化率。
3. Directional Derivative Formula | 方向导数的公式
If u is a unit vector, the directional derivative of f at a point in the direction of u is the dot product of the gradient and u:
若 u 是一个单位向量,则 f 在一点处沿 u 方向的方向导数就是梯度与 u 的点积:
Du f = ∇f · u
Expanding the dot product gives Du sions, where u₁ and u₂ are the components of the unit direction vector. This formula holds provided f is differentiable at the point.
展开点积,在二维下有 Du f = (∂f/∂x) u₁ + (∂f/∂y) u₂,其中 u₁ 和 u₂ 是单位方向向量的分量。该公式在 f 于点处可微的条件下成立。
4. Derivation from Chain Rule | 从链式法则推导
x₀ + t u₁, y₀ + t u₂). Then f(r(t)) is a single-variable function of t. By the chain rule:
通过考虑过点 (x₀, y₀) 且方向为 u 的直线 r(t) = (x₀ + t u₁, y₀ + t u₂),可将 f(r(t)) 视作单变量 t 的函数。利用链式法则可得:
df/dt = ∂f/∂x · dx/dt + ∂f/∂y · dy/dt = ∂f/∂x u₁ + ∂f/∂y u₂
Evaluating at t = 0 gives the directional derivative. This is exactly ∇ directional derivative is the scalar projection of the gradient onto the direction vector.
在 t = 0 处取值即得方向导数。这正是 ∇f · u,从而验证方向导数是梯度在方向向量上的标量投影。
5. Geometric Interpretation | 几何解释
n the direction of u. At a given point, the tangent plane has a slope that varies with direction, and the directional derivative gives the rate of rise or fall along that specific direction.
从几何角度看,方向导数表示曲面 z = f(x, y) 在 u 方向上的切线斜率。在给定点处,切平面沿不同方向的斜率不同,方向导数给出沿该具体方向的升降率。
6. Direction of Maximum Increase | 最大增加方向
Since the dot product ∇f · u equals |∇f| cos θ, where θ is the angle between ∇f and u, it is maximised when cos θ = 1, i.e. when u points in the same direction as ∇f. Then the maximum directional derivative is |∇f|.
由于点积 ∇f · u = |∇f| cos θ,其中 θ 为 ∇f 与 u 的夹角,当 cos θ = 1,即 u 与 ∇f 同向时,该点积取最大值。此时最大方向导数为 |∇f|。
Conversely, the direction of steepest descent is opposite to the gradient, yielding a directional derivative of −|∇f|. This property is fundamental in optimisation algorithms such as gradient descent.
相反,最速下降方向与梯度反向,方向导数为 −|∇f|。这一性质是梯度下降等优化算法的基础。
7. Direction of Zero Change | 零变化方向与等值线
When u is perpendicular to ∇f, the dot product is zero, so the directional derivative vanishes. This means that moving infinitesimally in such a direction does not change the function value; you are moving along a level curve (or level surface) at that instant.
当 u 垂直于 ∇f 时,点积为零,故方向导数为零。这意味着沿该方向作无穷小移动不会改变函数值;此刻你正沿等值线(或等值面)移动。
8. Gradient and Level Curves | 梯度与等值线的关系
A crucial geometric fact is that the gradient vector at a point is always orthogonal to the level curve (or level surface) passing through that point. Thus the tangent direction to a level curve gives zero directional derivative. This orthogonality is widely used in constructing tangent lines and normal vectors.
一个关键的几何事实是:点处的梯度向量总是垂直于经过该点的等值线(或等值面)。因此,等值线的切线方向给出零方向导数。这一正交性广泛应用于构造切线和法向量。
9. Computing Directional Derivatives (Example) | 计算方向导数(实例)
at the point (1, 2) in the direction of the vector v = (3, 4). First compute the gradient:
考虑 f(x, y) = x² + y² 在点 (1, 2) 处沿向量 v = (3, 4) 的方向。首先计算梯度:
∇f = (2x, 2y) → ∇f(1, 2) = (2, 4)
The direction vector must be of unit length. The magnitude of v is |v| = √3² + 4² = 5, so the unit vector u = (3/5, 4/5). Then the directional derivative is:
方向向量必须为单位长度。v 的大小为 |v| = √3² + 4² = 5,故单位向量 u = (3/5, 4/5)。于是方向导数为:
Du f = (2, 4) · (3/5, 4/5) = 2·(3/5) + 4·(4/5) = 6/5 + 16/5 = 22/5 = 4.4
g along the direction of v at a rate of 4.4. The maximum rate of increase at that point is |∇f| = √2²+4² = √20 ≈ 4.47, which occurs in the direction (2, 4).
这一正值表明 f 沿 v 方向以 4.4 的速率增加。该点处的最大增加率为 |∇f| = √2²+4² = √20 ≈ 4.47,发生在 (2, 4) 方向上。
10. Directional Derivatives in Three Variables | 三元函数的方向导数
For a function of three variables, the same principle applies. If f(x, y, z) is differentiable and u is a unit vector in space, the directional derivative is:
对于三元函数,同样原理适用。若 f(x, y, z) 可微,且 u 是空间中的一个单位向量,则方向导数为:
Du f = ∇f · u = ∂f/∂x u₁ + ∂f/∂y u₂ + ∂f/∂z u₃
Geometrically, the gradient is perpendicular to level surfaces, and the directional derivative measures the instantaneous change in the value of f as we move through the domain in the chosen direction.
在几何上,梯度垂直于等值面,而方向导数度量当我们沿选定方向在定义域内移动时 f 的瞬时变化量。
11. Common Mistakes | 常见错误
One of the most frequent errors is forgetting to normalise the direction vector. If v is not a unit vector, computing ∇f · v gives a scaled value, not the true directional derivative. Another pitfall is confusing the directional derivative with a vector quantity; it is a scalar that can be positive, negative, or zero. Students also sometimes mistake partial derivatives for directional derivatives – partial derivatives are simply directional derivatives along the coordinate axes.
最常见的错误之一是忘记将方向向量单位化。若 v 不是单位向量,计算 ∇f · v 会得到缩放后的值,而非真正的方向导数。另一个误区是将方向导数误认为向量;它是一个标量,可取正值、负值或零。学生有时也会将偏导数与方向导数混淆——偏导数其实就是沿坐标轴方向的方向导数。
12. Summary and Key Takeaways | 总结和要点
The directional derivative concept unifies the idea of rate of change in multivariable functions. Its key relationship with the gradient is Du f = ∇ l to the gradient yield zero instantaneous change. Mastery of this relationship is essential for advanced topics such as constrained optimisation, tangent plane approximations, and the study of vector fields in physics and engineering.
方向导数的概念统一了多变量函数的变化率思想。其与梯度的关键关系为 Du f = ∇f · u,只要 u 是单位向量。梯度本身给出最大增加率的方向和大小,而与梯度正交的方向给出零瞬时变化。掌握这一关系对于约束优化、切平面近似以及物理与工程中向量场的研究等高级主题至关重要。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图