Let Ω ⊆ ℝᵖ be open, let f, g₁, …, g_k : Ω → ℝ belong to C¹(Ω), and let c ∈ Ω satisfy g₁(c) = ⋯ = g_k(c) = 0. Suppose there is a neighborhood U ⊆ Ω of c such that either f(x) ≤ f(c) for every x ∈ U with g₁(x) = ⋯ = g_k(x) = 0, or f(x) ≥ f(c) for every such x. Then there exist real numbers μ, λ₁, …, λ_k, not all 0, with μ∇f(c) = λ₁∇g₁(c) + ⋯ + λ_k∇g_k(c).
前提說:在同時滿足 k 個約束的點之中,c 是 f 的相對極值點。結論說 μ∇f(c) 落在約束梯度張成的子空間裡。k = 1 時就是 42.7 的第一部分。
Proof. Define F : Ω → ℝ^{k+1} by F(x) = (f(x), g₁(x), …, g_k(x)). As in 42.7, the coordinate lemma and 41.2 show that F ∈ C¹(Ω) with DF(c)(v) = (Df(c)(v), Dg₁(c)(v), …, Dg_k(c)(v)), and F(c) = (f(c), 0, …, 0).
這一步的所求:一個 C¹ 的並排函數。F 的 k + 1 個座標都可微,座標引理讓 F 可微、導數逐座標寫出;F 的偏導數就是 f, g₁, …, g_k 的偏導數,由 41.2 全部連續,再用一次 41.2 得 F ∈ C¹。c 滿足所有約束,所以 F(c) 後面 k 個座標都是零。拿正例看:F(x, y, z) = (x, x² + y² + z² − 2, z − 1),F(1, 0, 1) = (1, 0, 0)。
Suppose DF(c) maps ℝᵖ onto ℝ^{k+1}, and let m, α be as in 41.6. For 0 < s < min{α, ρ}/(2m), the point y = (f(c) + s, 0, …, 0) has ‖y − F(c)‖ = s, so some x ∈ Ω satisfies F(x) = y and ‖x − c‖ ≤ 2ms < ρ. This x lies in U, satisfies every constraint, and has f(x) = f(c) + s > f(c), a contradiction. Hence DF(c) is not onto.
這一步的所求:DF(c) 不映成,走反證,與 42.7 第二步逐字相同。F(x) 的後 k 個座標全為零,正是 x 同時滿足 k 個約束;41.6 若適用,會在 c 附近找到一個像是 (f(c) + s, 0, …, 0) 的點,它滿足所有約束、函數值又比 f(c) 大,與 c 是約束下的極大值點矛盾。s 的上限一半讓 41.6 適用,一半讓原像落在 U 裡。
By the lemma there is a nonzero (μ, ν₁, …, ν_k) ∈ ℝ^{k+1} with μDf(c)(v) + ν₁Dg₁(c)(v) + ⋯ + ν_kDg_k(c)(v) = 0 for every v ∈ ℝᵖ. Put λᵢ = −νᵢ. By the gradient corollary, the vector μ∇f(c) − Σᵢ λᵢ∇gᵢ(c) has inner product 0 with every v, in particular with itself, so it is 0.
這一步的所求:讀出乘數。法向量引理用在 L = DF(c)、q = k + 1 上,給出非零的法向量;它與 DF(c)(v) 的內積逐座標展開,就是上面的和。梯度推論把每個 D(·)(c)(v) 換成梯度與 v 的內積,合併成一個向量與 v 的內積;與每個 v 都正交的向量,取 v 為它自己就知道長度是零。法向量非零,所以 μ, λ₁, …, λ_k 不全為零。
並排的 F 把「滿足所有約束」記成後 k 個座標為零;約束下的極值讓 DF(c) 不映成;法向量的座標就是 μ 與 −λ₁, …, −λ_k。∎
42.9 的 μ 可能是零,那時結論只說約束的梯度彼此線性相關,對 f 毫無資訊。下面的推論說明什麼時候可以排除這種情形。先說記號:一個 p × k 矩陣的 rank,指以它為矩陣的線性函數 ℝᵏ → ℝᵖ(§21-2 的 21.2 的對應)的 rank。
42.10 COROLLARY
In addition to the hypotheses of 42.9, suppose that the p × k matrix whose entry in row j and column i is Dⱼ gᵢ(c) has rank k; equivalently, the gradients ∇g₁(c), …, ∇g_k(c) are linearly independent. Then there are real numbers λ₁, …, λ_k with ∇f(c) = λ₁∇g₁(c) + ⋯ + λ_k∇g_k(c); in coordinates, Dⱼ f(c) = λ₁Dⱼ g₁(c) + ⋯ + λ_kDⱼ g_k(c) for j = 1, …, p.
矩陣的第 i 行是 ∇gᵢ(c)。rank 等於 k(行數)恰好是說這 k 個梯度線性獨立。此時 μ 可取為 1,而且乘數唯一(線性獨立的向量表示一個向量的係數是唯一的)。實際求解時,p 條座標方程式加上 k 條約束 gᵢ(c) = 0,共 p + k 條方程式,未知數是 c 的 p 個座標與 k 個乘數。乘數可以全是零:那表示 ∇f(c) = 0,例如 f 是常數。
Proof. By the rank-plus-nullity lemma, the rank of G is k exactly when its nullity is 0, that is, when G(λ) = 0 only for λ = 0; this says that ∇g₁(c), …, ∇g_k(c) are linearly independent.
這一步的所求:題設的兩種說法等價。rank 加 nullity 等於定義域的維數,這裡定義域是 ℝᵏ,所以 rank 為 k ⟺ nullity 為 0 ⟺ null space 只有零向量。null space 裡的向量 λ 正是讓 Σ λᵢ∇gᵢ(c) = 0 的係數,「只有零係數」就是線性獨立的定義。
Let μ, λ₁, …, λ_k be given by 42.9. If μ = 0, then G(λ₁, …, λ_k) = 0 with (λ₁, …, λ_k) ≠ 0, contradicting the independence. Hence μ ≠ 0; dividing by μ and renaming λᵢ/μ as λᵢ gives ∇f(c) = Σᵢ λᵢ∇gᵢ(c), whose j-th coordinate is the displayed equation.