M1-024M1: Mathematics & Statistics FundamentalsCalculus & Taylor ExpansionMedium
⚡Flashcard Drill➔Mastery:
Explain the Method of Lagrange Multipliers and How It Transforms Constrained Optimization into Unconstrained Optimization
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Lagrange multipliers incorporate constraints into the objective scaled by ; at optimality, the objective gradient is collinear with constraint gradients, eliminating directional descent along the constraint manifold.
📌 Key Takeaways
- •Geometric condition: At the constrained optimum , , meaning no descent direction remains within the tangent space.
- •Lagrangian function: ; setting reproduces the optimality and constraint equations.
- •Shadow price: The optimal multiplier quantifies the rate of improvement in objective value per unit relaxation of constraint .
📐 Mathematical Derivations
Consider minimizing subject to equality constraint . The tangent space of the constraint manifold at is . Any feasible perturbation along the manifold must satisfy . If , can be decreased while remaining on . Thus, optimality strictly requires . Since spans the normal space to the constraint surface, must be collinear with : . Defining , the stationary conditions and transform the -variable constrained problem into an -variable unconstrained root-finding system.
🏭 Production Trade-offs
Engineering implications: (1) Shadow price $\lambda^*$: In ad auctions and cloud scheduling, represents the marginal value of budget or compute capacity. If relaxing a budget constraint by \Delta \text{Revenue} = \lambda^* > 1\frac{\rho}{2}\|g(x)\|^2$ to convexify non-convex constraints, accelerating numerical convergence in modern solvers.
⚠️ Common Interview Pitfalls
- ✕Forgetting constraint qualification conditions (e.g. LICQ): if , the Lagrange multiplier formulation fails.
- ✕Assuming the saddle point of is a local minimum of in both variables (it is a min in but max in ).
🎯 Interviewer Follow-up Inquiries
- ?How does the method of Lagrange multipliers extend to inequality constraints via the KKT conditions?
- ?Why is the Lagrangian dual function always concave, even when is non-convex?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚
Associated Knowledge Base Guides & Mindmaps
Explore the comprehensive technical article, exam cards, and global architecture tree.
中文速览与面试要点
解释拉格朗日乘子法,说明它如何把约束优化转为无约束。
把约束乘上 λ 加入目标;最优解处目标梯度与约束梯度共线。
核心要点
- 拉格朗日乘子法的几何直觉:在约束曲面 g(x)=0 上移动时,若目标 f 的梯度 ∇f 与约束的梯度 ∇g 不平行 ,则 ∇f 必有一个沿约束曲面的切向分量,说明还能沿该方向继续下降 f——故极值点处必须有 ∇f=−λ∇g,即两者共线。构造拉格朗日函数 L(x,λ)=f(x)+λg(x) 后,对其求无约束驻点(∂L/∂x=0 给出 ∇f+λ∇g=0,∂L/∂λ=0 给出 g(x)=0)即同时满足最优性与可行性。多个等式约束时用向量乘子:L=f+Σᵢλᵢgᵢ,最优性条件为 ∇f=−Σᵢλᵢ∇gᵢ,即 ∇f 落在约束梯度的张成空间中。
- 工程含义:① λ 是影子价格 ——λ* 表示'若把约束放松一个单位,最优值能改善多少'(∂f*/∂c=λ*),这在资源分配、预算约束、SVM 的对偶中都有直接解释:SVM 中 λᵢ>0 的样本正是 支持向量 ,λᵢ=0 的样本不影响决策边界(KKT 互补松弛);② 对偶问题 ——拉格朗日函数关于 x 取最小、关于 λ 取最大,得到对偶问题,其最优值给出原问题的下界(弱对偶),凸问题下相等(强对偶,Slater 条件保证),对偶常把难解的原问题转为更易解的形式(SVM 的对偶形式使核技巧成为可能);③ 与正则化的联系 ——带约束的 min f s.t. ‖w‖≤c 等价于无约束的 min f+λ‖w‖(正则化),λ 与 c 一一对应,这就是为什么'正则化'与'约束'是同一件事的两种视角。
- 等式约束用拉格朗日;不等式约束用 KKT
- λ 的经济含义是'约束的影子价格'
常见陷阱
- 认为 λ 必须为正(等式约束的 λ 可正可负,不等式约束才要求 λ≥0)
- 混淆拉格朗日(等式约束)与 KKT(含不等式约束)