We prove strong duality of linear program by Farkas Lemma.
Let A∈Rm×n, b∈Rm, and c,x∈Rn.
Consider the primal program defined as
maxs.t.cTxAx=b,x≥0.
Let y∈Rm. The dual program of the primal is given by
mins.t.yTbyTA≥cT.
Theorem. If both primal and dual are feasible, then max=min.
Proof 1. Note that
cTx≤(yTA)x=yT(Ax)=yTb.
The first inequality follows from that yTA≥0 and that x≥0.
The last equality follows from that Ax=b.
This is know as weak duality.
It is left to prove the reverse direction.
Assume that the dual is feasible and min=α.
The goal is to prove that max≥α.
It suffices to find an x∈Rn satisfying
x≥0,
Ax=b and,
cTx≥α.
Consider the convex and closed set
P≐{(z1,z2)∈Rm×R:z1=Ax,z2≤cTx,x∈Rn,x≥0}.
Let bˉ≐(b,α).
If bˉ∈P, we have done.
Otherwise, we are going to prove that ∃y∈Rm, such that
yTA≥cT,and yTb<α.
Let zˉ∈Rm×R be the projection of bˉ to P, i.e., the point in P that minimizes its distance to bˉ.
Denote v=zˉ−bˉ=(v1,v2)∈Rm×R.
Consider the supporting plane
ℓ(z)≐vT(z−zˉ).
We have ℓ(bˉ)<0 and ℓ(z)≥0 for all z∈P.
As 0∈P and 2zˉ∈P, it holds that
ℓ(0)=vT(−zˉ)≥0,ℓ(2zˉ)=vT(zˉ)≥0.
It follows that vTzˉ=0.
Hence vTz≥0 for all z∈P and
vTbˉ=v1Tb+v2⋅α<0.
We will prove that
v1TA+v2⋅cT≥0.
If we can further prove that v2<0, then y=v21⋅v1 satisfies yTA≥cT and yTb<α, which leads to a contradiction.
Lemma: vTz≥0∀z∈P then v1TA+v2⋅cT≥0.
Proof. For all x≥0, it holds that (Ax,cTx)∈P.
Hence, v1TAx+v2⋅cTx≥0, which implies that
v1TA+v2⋅cT≥0.
□
Finally, we prove that v2<0. To see this, observe that (0,−1)∈P, since 0=A0, and −1≤cT0.
Now vT(0,−1)=−v2>0.
■
Proof 2. We can convert the primal into an equivalent one:
AxcTx−zx,z=b,=α,≥0.
or in matrix form:
Aˉxˉxˉ=bˉ,≥0.
where
Aˉ=[A,cT,0−1],xˉ=[xz],bˉ=[bα].
No feasible solution implies that bˉ lies outside the conic combination of columns of Aˉ.
Let zˉ∈Rm×R be the projection of bˉ to the cone formed by columns of Aˉ and let v=zˉ−bˉ=(v1,v2)∈Rm×R.
It holds that vTAˉ≥0.
Then
vT[AcT]=v1TA+v2⋅cT≥0,vT[0−1]=−v2≥0.
It is left to verify that v2<0.
Note that
vTv=vT(zˉ−bˉ)=−vTbˉ=−v1Tb−v2⋅α>0.
If v2=0, then v1TA≥0 and v1Tb<0.
Replacing y with v1, and scaling it by positive real number, we can obtain a feasible dual solution such that yTb is arbitrary small.
However, this contradicts the weak duality
cTx≤yTb.
See the following example in 2 dimensions.
In this example, A[:,1]=(−2,1), A[:,2]=(−1,2), c=(1,1), Aˉ[:,1]=(−2,1,1),Aˉ[:,2]=(−1,2,1). {Ax=b,x≥0} is feasible implies that b is inside the cone spanned by A[:,1],A[:,2]. {Aˉxˉ=bˉ,x≥0} implies that bˉ=(b,α) is outside the cone formed by Aˉ[:,1],Aˉ[:,2],[0,0,−1]. The z-dimension of vector y must be negative.