← 返回资讯屏轩教育 · 行业资讯

The Gradient Vector in Two Dimensions | 二维梯度向量

2026-08-03 02:51 · 本文部分内容由AI辅助创作

📚 The Gradient Vector in Two Dimensions | 二维梯度向量

In single-variable calculus, the derivative f' f change of a function and the direction in which it increases. When we move to functions of two variables, the landscape becomes richer — lleys, and slopes. To understand how the function changes from a point, we need not just one number but a vector that captures both the direction and the rate of steepest ascent. This vector is called the gradient, and it lies at the heart of multivariable calculus. In IB Mathematics courses, the gradient vector appears in optimisation problems, modelling spatial relationships, and linking algebraic and geometric intuition.

在单变量微积分中,导数 f'(x) 告诉我们函数的瞬时变化率及其增加的方向。当我们转向二元函数时,景象变得更加丰富——曲面 z = f(x, y) 可以有丘陵、山谷和斜坡。要理解函数从某一点如何变化,我们需要的不仅仅是一个数字,而是一个能够捕捉最陡上升方向和速率的向量。这个向量称为梯度,它是多变量微积分的核心。在 IB 数学课程中,梯度向量出现在优化问题、空间关系建模以及代数与几何直觉的联系中。


1. The Gradient Vector: First Encounter | 初识梯度向量

d by a function z = f(x, y), where z is your elevation. At your current location, you ask: “If I take a small step, in which direction will I gain height the fastest?” tion is a vector that points in the direction of maximum rate of increase of f. Its magnitude tells you how steep that climb is.

想象你站在一个由函数 z = f(x, y) 描述的山坡上,其中 z 是你所在的海拔高度。在你当前的位置,你问:“如果我迈出一小步,沿哪个方向能最快地提升高度?”答案由梯度向量给出。与单变量函数的导数是一个标量不同,二元函数的梯度是一个指向 f 增长率最大方向的向量。其大小告诉你攀登有多陡。

This simple idea extends the concept of slope to a two-dimensional domain. The gradient will become our primary tool for analyzing surfaces, optimising functions, and even understanding physical fields such as temperature or pressure distributions.

这个简单的想法将斜率的概念扩展到了二维定义域。梯度将成为我们分析曲面、优化函数甚至理解温度场或压力场等物理场的主要工具。


2. Partial Derivatives: The Building Blocks | 偏导数:梯度的基石

understand partial derivatives. For a function f(x, y), the partial derivative ∂f/∂x (read “partial f partial x” y measures the rate of change with respect to y, keeping x constant. Formally, ∂f/∂x = limh→0 [f(x+h, y) − f(x, y)] / h, and similarly for y.

要构建梯度,我们必须首先理解偏导数。对于函数 f(x, y),偏导数 ∂f/∂x(读作“partial f partial x”)衡量当 x 变化而 y 固定时 f 的变化。类似地,∂f/∂y 衡量在 x 保持不变的情况下 f 关于 y 的变化率。形式化地,∂f/∂x = limh→0 [f(x+h, y) − f(x, y)] / h,y 方向同理。

bers form the components of the gradient vector. Treating one variable as constant allows us to apply ordinary differentiation rules, making the computation straightforward.

例如,若 f(x, y) = x² + y³,则 ∂f/∂x = 2x,∂f/∂y = 3y²。这两个数字构成了梯度向量的分量。将一个变量视为常数使我们可以应用普通的微分法则,从而使计算变得直接。


3. Definition and Notation of the Gradient | 梯度的定义与符号

The gradient of f at a point (x, y) is defined as the vector composed of its first-order partial derivatives:

∇f(x, y) = (∂f/∂x, ∂f/∂y)

The symbol ∇ (nabla or del) denotes the vector differential operator. The gradient is also written as grad f. It is an example of a vector field: to every point (x, y) where the partial derivatives exist, it assigns a vector.

f 在点 (x, y) 处的梯度定义为其一阶偏导数组成的向量:

∇f(x, y) = (∂f/∂x, ∂f/∂y)

符号 ∇(纳布拉或德尔)表示向量微分算子。梯度也记作 grad f。它是一个向量场的例子:对于偏导数存在的每一个点 (x, y),它赋予一个向量。

For instance, consider f(x, y) = x² + y². Then ∇f = (2x, 2y). At the point (1, 2), the gradient vector is ∇f(1, 2) = (2, 4). This vector points away from the origin, and its length is √2² + 4² = √20 ≈ 4.47, representing the maximum rate of increase at that location.

例如,考虑 f(x, y) = x² + y²。则 ∇f = (2x, 2y)。在点 (1, 2) 处,梯度向量为 ∇f(1, 2) = (2, 4)。这个向量指向远离原点的方向,其长度为 √2² + 4² = √20 ≈ 4.47,代表该位置的最大增长率。


广告 / Sponsored

4. Gradient and Directional Derivatives | 梯度与方向导数

nit vector (a² + b² = 1). The directional derivative of f in the direction of u, denoted Duf, is the dot product:

Duf = ∇f · u = a·(∂f/∂x) + b·(∂f/∂y)

This formula allows us to find the slope of the surface in any direction without having to re-parametrise the curve.

当我们考虑沿任意方向的变化率时,梯度的真正威力才显现出来。设 u = (a, b) 为单位向量(a² + b² = 1)。f 在 u 方向上的方向导数,记作 Duf,是点积:

Duf = ∇f · u = a·(∂f/∂x) + b·(∂f/∂y)

这个公式使我们能够在不重新参数化曲线的情况下求出曲面沿任意方向的斜率。

If u is not a unit vector, we must first normalise it: u = v/|v| e directional derivative measures instantaneous rate of change. Importantly, by the Cauchy–Schwarz inequality, Duf is maximised when u points in the same direction as ∇f, and that maximum value is exactly |∇f|. Conversely, the minimum (steepest descent) occurs when u is opposite to ∇f, giving −|∇f|. If u is perpendicular to ∇f, Duf = 0 — you are walking along a contour line.

如果 u 不是单位向量,我们必须先将其归一化:u = v/|v|。方向导数衡量瞬时变化率。重要的是,根据柯西-施瓦茨不等式,当 u 指向与 ∇f 相同的方向时,Duf 取得最大值,并且该最大值正好是 |∇f|。反之,最小值(最陡下降)发生在 u 与 ∇f 方向相反时,得到 −|∇f|。如果 u 垂直于 ∇f,则 Duf = 0 —— 你正沿着等高线行走。


5. Geometric Interpretation: Gradient is Normal to Level Curves | 几何意义:梯度垂直于等高线

rve is the set of points where f(x, y) = c for a constant c (like an isotherm or contour).

微积分中最优美的几何事实之一是,某点处的梯度向量垂直于经过该点的 f 的等高线。等高线是满足 f(x, y) = c(c 为常数)的点集(类似于等温线或地形等高线)。

that f(r(t)) = c. Differentiating both sides with respect to t using the chain rule gives ∇f(r(t)) · r'(t) = 0. Since r'(t) is tangent to the level curve, ∇ gent lines and is used extensively in Lagrangian multipliers and constrained optimisation.

要理解其原因,考虑等高线的参数化 r(t),使得 f(r(t)) = c。使用链式法则对 t 求导,得到 ∇f(r(t)) · r'(t) = 0。由于 r'(t) 与等高线相切,∇f 必定与曲线正交。这种正交性是求切线的基础,并广泛用于拉格朗日乘数法和约束优化中。

For example, the level curves of f(x, y) = x² + y² are circles x² + y² = c. The gradient ∇ (2x, 2y) is a radial vector, which is indeed perpendicular to the circles at every point.

例如,f(x, y) = x² + y² 的等高线是圆 x² + y² = c。梯度 ∇f = (2x, 2y) 是一个径向向量,确实在每一点都垂直于圆周。


6. Computing the Gradient: Worked Examples | 梯度计算:实例解析

Let us work through several examples to build fluency. First, take f(x, y) = x³y + exy. We compute the partial derivatives carefully: