ArticleslgStudy

science

Duality (optimization)

Duality (optimization) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Duality (optimization) rather than just read about it. In short: In mathematical optimization theory, duality or the duality principle is the principle that optimization problems may be viewed from either of two perspectives, the primal problem or the dual problem. If the primal is a minimization problem then the dual is a maximization problem (and vice versa).

Key takeaways

  • Duality (optimization) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Duality (optimization) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Duality (optimization) from memory before moving on to harder problems.

Reference excerpt

In mathematical optimization theory, duality or the duality principle is the principle that optimization problems may be viewed from either of two perspectives, the primal problem or the dual problem. If the primal is a minimization problem then the dual is a maximization problem (and vice versa). Any feasible solution to the primal (minimization) problem is at least as large as any feasible solution to the dual (maximization) problem. Therefore, the solution to the primal is an upper bound to the solution of the dual, and the solution of the dual is a lower bound to the solution of the primal. This fact is called weak duality. In general, the optimal values of the primal and dual problems need not be equal. Their difference is called the duality gap. For convex optimization problems, the duality gap is zero under a constraint qualification condition. This fact is called strong duality.

Dual problem Usually the term "dual problem" refers to the Lagrangian dual problem but other dual problems are used – for example, the Wolfe dual problem and the Fenchel dual problem. The Lagrangian dual problem is obtained by forming the Lagrangian of a minimization problem by using nonnegative Lagrange multipliers to add the constraints to the objective function, and then solving for the primal variable values that minimize the original objective function. This solution gives the primal variables as functions of the Lagrange multipliers, which are called dual variables, so that the new problem is to maximize the objective function with respect to the dual variables under the derived constraints on the dual variables (including at least the nonnegativity constraints). In general given two dual pairs of separated locally convex spaces (X,X∗) and (Y,Y∗) and the function f:X→ℝ∪{+∞}, we can define the primal problem as finding x̂ such that f(x̂)=infx∈Xf(x). In other words, if x̂ exists, f(x̂) is the minimum of the function f and the infimum (greatest lower bound) of the function is attained. If there are constraint conditions, these can be built into the function f by letting f~=f+Iconstraints where Iconstraints is a suitable function on X that has a minimum 0 on the constraints, and for which one can prove that infx∈Xf~(x)=infx constrainedf(x). The latter condition is trivially, but not always conveniently, satisfied for the characteristic function (i.e. Iconstraints(x)=0 for x satisfying the constraints and Iconstraints(x)=∞ otherwise). Then extend f~ to a perturbation function F:X×Y→ℝ∪{+∞} such that F(x,0)=f~(x). The duality gap is the difference of the right and left hand sides of the inequality

supy∗∈Y∗−F∗(0,y∗)≤infx∈XF(x,0), where F∗ is the convex conjugate in both variables and sup denotes the supremum (least upper bound).

Duality gap

The duality gap is the difference between the values of any primal solutions and any dual solutions. If d∗ is the optimal dual value and p∗ is the optimal primal value, then the duality gap is equal to p∗−d∗. This value is always greater than or equal to 0 (for minimization problems). The duality gap is zero if and only if strong duality holds. Otherwise the gap is strictly positive and weak duality holds. In computational optimization, another "duality gap" is often reported, which is the difference in value between any dual solution and the value of a feasible but suboptimal iterate for the primal problem. This alternative "duality gap" quantifies the discrepancy between the value of a current feasible but suboptimal iterate for the primal problem and the value of the dual problem; the value of the dual problem is, under regularity conditions, equal to the value of the convex relaxation of the primal problem: The convex relaxation is the problem arising replacing a non-convex feasible set with its closed convex hull and with replacing a non-convex function with its convex closure, that is the function that has the epigraph that is the closed convex hull of the original primal objective function.

Linear case

Linear programming problems are optimization problems in which the objective function and the constraints are all linear. In the primal problem, the objective function is a linear combination of n variables. There are m constraints, each of which places an upper bound on a linear combination of the n variables. The goal is to maximize the value of the objective function subject to the constraints. A solution is a vector (a list) of n values that achieves the maximum value for the objective function. In the dual problem, the objective function is a linear combination of the m values that are the limits in the m constraints from the primal problem. There are n dual constraints, each of which places a lower bound on a linear combination of m dual variables.

Relationship between the primal problem and the dual problem In the linear case, in the primal problem, from each sub-optimal point that satisfies all the constraints, there is a direction or subspace of directions to move that increases the objective function. Moving in any such direction is said to remove slack between the candidate solution and one or more constraints. An infeasible value of the candidate solution is one that exceeds one or more of the constraints. In the dual problem, the dual vector multiplies the constraints that determine the positions of the constraints in the primal. Varying the dual vector in the dual problem is equivalent to revising the upper bounds in the primal problem. The lowest upper bound is sought. That is, the dual vector is minimized in order to remove slack between the candidate positions of the constraints and the actual optimum. An infeasible value of the dual vector is one that is too low. It sets the candidate positions of one or more of the constraints in a position that excludes the actual optimum. This intuition is made formal by the equations in Linear programming: Duality.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Duality (optimization)

Start with the simplest possible case. Write down what Duality (optimization) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Duality (optimization) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Duality (optimization) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Duality (optimization)

In research
Duality (optimization) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Duality (optimization) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Duality (optimization) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Convex optimization, Linear programming, so understanding it makes those chapters shorter.
In everyday life
Look for Duality (optimization) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Duality (optimization)” →

How to study Duality (optimization) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Duality (optimization) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Duality (optimization) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Duality (optimization) in simple terms?

In mathematical optimization theory, duality or the duality principle is the principle that optimization problems may be viewed from either of two perspectives, the primal problem or the dual problem. If the primal is a minimization problem then the dual is a maximization problem (and vice versa).

Why does Duality (optimization) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Duality (optimization)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Duality (optimization).

Tags

  • Convex optimization
  • Linear programming

Keep exploring