The Dual Problem
Every optimization can be viewed in two ways: the primal or the dual. For example, if the primal LP is
then it’s dual is
The variables and switch places with each other; the coefficients become the right-hand side of the dual and right-hand side of the primal () becomes the coefficients of the dual.
In summary:
Properties
As you choose values of or that come closer to the optimal solution, the optimal values and for the primal and dual, respectively converge towards the shared optimal solution from opposite directions.
Weak Duality
Let be any feasible solution to the primal and be any feasible solution to the dual. Then
In other words, the primal problem converges from below and the dual problem converges from above.
Strong Duality
Let be a feasible solution to the primal and a feasible solution to the dual. Then if
then is optimal for the primal and is optimal for the dual.
As a result, if the primal has an optimal solution and the dual has an optimal solution , then .
Example
Consider the following LP:
Rewriting the constraints in the form has the matrix
Therefore, the dual LP is