Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Pricing a rule instead of enforcing it
Suppose a rover may use at most 10 Wh. Instead of forbidding more, charge a price for every Wh used beyond the budget, and pay a rebate for every Wh saved. Now the rover can do whatever it likes, and the price nudges it. Set the price too low and it overspends; too high and it underspends. At just the right price, its free choice exactly matches the best plan within the budget.
The price is a Lagrange multiplier. The problem of finding the best price is the dual problem.
Duality gives certificates (a dual value proves how good your solution is), sensitivities (how much better you’d do with one more unit of fuel, power or bandwidth), and decomposition: big problems split into pieces coordinated by prices. That’s how power is allocated across satellite channels and how distributed robots share resources.
- 1. A Lagrange multiplier can be read as…
- 2. For a minimization problem, the dual gives a…
- 3. At the right price, the unconstrained choice…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.The Lagrangian
For s.t. , :
The dual function and the dual problem
is always concave, even if the original problem isn’t, because it’s a pointwise infimum of affine functions of . The dual problem is .
Example
s.t. . Then , minimized at , so . The maximum is at with .
- 1. The dual function g is always…
- 2. Multipliers of inequality constraints must be…
- 3. For min x² s.t. x ≥ 1, λ* =
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Weak duality
For any feasible and any , . Hence . The duality gap is . Any feasible pair gives a bound: if , then is -optimal. That’s a stopping certificate.
Strong duality and Slater’s condition
If the problem is convex and Slater’s condition holds (some has for all non-affine inequalities), then and the dual optimum is attained. Non-convex problems can have a positive gap. The demo’s double well shows one.
Standard duals
- Equality-constrained QP s.t. : .
- LP: s.t. has the dual s.t. . LP strong duality holds whenever either problem is feasible and bounded.
Multipliers as sensitivities
Perturb a constraint to . Then . The multiplier is the marginal value of loosening the constraint, the shadow price. For s.t. , and .
Dual ascent
, the constraint violation at the Lagrangian minimizer. Gradient ascent on the dual raises prices where constraints are violated. This is the basis of decomposition methods and ADMM (A6.2-8).
- 1. Weak duality says d* ≤ p* for…
- 2. Slater's condition requires…
- 3. The dual gradient ∇_ν g equals…
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Proof of weak duality
For feasible and : and , so . Then . Take the inf over feasible and the sup over . ∎
Deriving the QP dual
gives . Substituting gives . Setting recovers the KKT system. ∎
Why Slater gives strong duality (sketch)
Consider the set . It’s convex for convex problems. The point lies outside it, so a separating hyperplane exists. Slater rules out a vertical hyperplane, and normalizing the hyperplane’s coefficients gives multipliers achieving (Boyd and Vandenberghe, §5.3). ∎
Exercise 3.1: Dual of min ‖x‖² s.t. aᵀx = b
gives and . Then and , the squared distance from the origin to the hyperplane.
- 1. Weak duality's proof uses that, for feasible x, Σλᵢfᵢ(x) is…
- 2. Strong duality's proof uses…
- 3. For min x² s.t. x ≥ a (a > 0), dp*/da equals…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Water-filling a satellite’s transmit power
A satellite has 3 W to spread across 5 downlink sub-channels with different noise-to-gain ratios . Maximize the total capacity s.t. and . The KKT/dual analysis gives : pour “water” to a common level over a floor of noise levels. Noisy channels stay dry. A 1-D bisection on the dual variable solves the whole problem, and the dual value certifies optimality.
Duality in AI, robotics and aerospace
- Communications: water-filling and its multi-user generalizations allocate power and bandwidth on satellites and in networks (Cover and Thomas, 2006; Palomar and Chiang, 2006, network utility maximization).
- Support vector machines are solved in the dual, where the kernel trick appears (Cortes and Vapnik, 1995).
- Distributed multi-robot coordination: dual decomposition lets robots plan independently while prices enforce shared constraints (Bertsekas and Tsitsiklis, 1989).
- Constrained RL and safe learning: Lagrangian methods add cost constraints to policy optimization (Altman, 1999; Achiam et al., 2017).
References
- S. Boyd, L. Vandenberghe (2004). Convex Optimization. Cambridge University Press. Ch. 5.
- D. Bertsekas (2016). Nonlinear Programming, 3rd ed. Athena Scientific. Ch. 5–6.
- R. T. Rockafellar (1970). Convex Analysis. Princeton University Press.
- T. Cover, J. Thomas (2006). Elements of Information Theory, 2nd ed. Wiley. §9.4 (water-filling).
- D. Palomar, M. Chiang (2006). “A tutorial on decomposition methods for network utility maximization.” IEEE JSAC, 24(8).
- C. Cortes, V. Vapnik (1995). “Support-vector networks.” Machine Learning, 20.
- D. Bertsekas, J. Tsitsiklis (1989). Parallel and Distributed Computation. Prentice-Hall.
- E. Altman (1999). Constrained Markov Decision Processes. Chapman & Hall/CRC.
- J. Achiam, D. Held, A. Tamar, P. Abbeel (2017). “Constrained policy optimization.” ICML.
- M. Slater (1950). “Lagrange multipliers revisited.” Cowles Commission Discussion Paper, Math. 403.