Given A∈Rm×n and b∈Rn, the Farkas Lemma states that exactly one of the following holds:
∃x∈Rn:Ax=b, x≥0,
∃y∈Rm:yTA≤0, yTb>0.
Geometrically, the first statements says that b is a non-negative linear combination of columns of A. Denote the conic combination of columns of A as P={Ax:∀x≥0}⊂Rm. Note that it is a subset of the columns space of A.
If b∈/P, the second statement is equivalent to that
∃y∈Rm, such that yTb>0 and ∀z∈P, we have yTz≤0.
When (3) holds, clearly (2) holds, as columns of A belong to P. On the other hand, every element in P is conic combination of columns of A, then ∀z=Ax∈P, then yTz=yT(Ax)=(yTA)x≤0 by the fact that yTA≤0∧x≥0.
The existence of y is justified as follows: as P is convex and closed, the Separation Theorem states that we can find a point z∗=Ax∗ in P that satisfies
(b−z∗)T(z−z∗)≤0
Let y=(b−z∗)∈Rm. Note that y>0 as b∈/P and P is closed. Consider the plane yT(x−z∗)=0. It has the following properties:
Points in P lies on the negative side of the plane, that is z∈P, we have yT(z−z∗)≤0.
b is on the positive side of the plane. As yT(b−z∗)=yTy>0.
It holds that yTz∗=0, which implies that either z∗=0 or y is normal to z∗. To verify this, we move along the line that pass through the vector z∗ and note that for any k≥0, we have kz∗∈P, hence yT(kz∗−z∗)≤0. Replace k with 0 and 2 respectively, we have the desired result.
It concludes that z∈P, yTz≤0 and yTb>0.
An equivalent form states that
∃x∈Rn:Ax≤b
∃y∈Rm:yTA=0, yTb>0, y≤0.
We can prove this by converting statement (2) into an equivalent one:
∃y∈Rm:yTA=0, yTb=1, y≤0.
and hence
∃y∈Rm:(−y)T[A,b]=[0,−1], −y≥0.
If this doesn't hold, by previous result, we have ∃(x,λ)∈Rn+1, s,t., [A,b](x,λ)=Ax+λb≤0 and [0,1](x,−λ)=−λ>0, which implies thatA−λx≤b.
But this can also be verified via their geometrical meanings. We are not going to give all details here, just an example in R2:
Another equivalent form of Farkas Lemma is written as
∃x∈Rn:Ax≤b, x≥0.
∃y∈Rm:yTA≤0, yTb>0, y≤0.
Define P={z∣∃x∈Rn:z≥Ax,x≥0}⊂Rm.
Statement 1 says b∈Z.
Otherwise, as P is convex and closed
z1,z2∈P→∃x1,x2≥0,z1≥Ax1,z2≥Ax2, then μ1z1+μ2z2≥A(μ1x1+μ2x2),∀μ1,μ2≥0,μ1+μ2=1,
Closeness follows from ≥ in the definition of P.
There is a unique point z∗ that minimize ∣∣z−b∣∣ for z∈Z. Let y=(b−z∗)=0. Then it holds yT(b−z∗)=yTy>0 and yT(z−z∗)≤0 for any z∈Z.
Similarly, z∗∈P→∃x≥0,z∗≥Ax→k≥0,kz∗≥A(kx)→kz∈P. Then 0∈P and 2z∗∈P, which implies −yTz∗≤0 and yTz∗≤0. Hence yTz∗=0 and yTb=yTy+yTz∗>0.
Further, the fact z∗+ei∈Z gives yTei≤0 for arbitrary i. Therefore y≤0. The yTb<0 and yTA≤0 follow from the same proof given above.