Given A∈Rm×nA \in R^{m \times n} and b∈Rnb \in R^n, the Farkas Lemma states that exactly one of the following holds:

  1. ∃x∈Rn:Ax=b\exists x \in R^n : Ax = b, x≥0x \ge 0,
  2. ∃y∈Rm:yTA≤0\exists y \in R^m : y^T A \le 0, yTb>0y^T b > 0.

Geometrically, the first statements says that bb is a non-negative linear combination of columns of AA. Denote the conic combination of columns of AA as P={Ax:∀x≥0}⊂RmP = \{ Ax: \forall x \ge 0\} \subset R^m. Note that it is a subset of the columns space of AA.

If b∉Pb \notin P, the second statement is equivalent to that

  1. ∃y∈Rm\exists y \in R^m, such that yTb>0y^T b > 0 and ∀z∈P\forall z \in P, we have yTz≤0y^T z \le 0.

When (3) holds, clearly (2) holds, as columns of AA belong to PP. On the other hand, every element in PP is conic combination of columns of AA, then ∀z=Ax∈P\forall z = Ax \in P, then yTz=yT(Ax)=(yTA)x≤0y^T z = y^T (A x) = (y^T A) x \le 0 by the fact that yTA≤0∧x≥0y^T A \le 0 \wedge x \ge 0.

Geometry Interpretation

The existence of yy is justified as follows: as PP is convex and closed, the Separation Theorem states that we can find a point z∗=Ax∗z^* = A x^* in PP that satisfies

(b−z∗)T(z−z∗)≤0 (b - z^*)^T(z - z^*) \le 0

Let y=(b−z∗)∈Rmy = (b - z^*) \in R^m. Note that y>0y > 0 as b∉Pb \notin P and PP is closed. Consider the plane yT(x−z∗)=0y^T (x - z^*) = 0. It has the following properties:

  1. Points in PP lies on the negative side of the plane, that is z∈Pz \in P, we have yT(z−z∗)≤0y^T (z - z^*) \le 0.
  2. bb is on the positive side of the plane. As yT(b−z∗)=yTy>0y^T (b - z^*) = y^T y > 0.
  3. It holds that yTz∗=0y^T z^* = 0, which implies that either z∗=0z^* = 0 or yy is normal to z∗z^*. To verify this, we move along the line that pass through the vector z∗z^* and note that for any k≥0k \ge 0, we have kz∗∈Pkz^* \in P, hence yT(kz∗−z∗)≤0y^T (kz^* - z^*) \le 0. Replace kk with 00 and 22 respectively, we have the desired result.
  4. It concludes that z∈Pz \in P, yTz≤0y^T z \le 0 and yTb>0y^T b > 0.

An equivalent form states that

  1. ∃x∈Rn:Ax≤b\exists x \in R^n : Ax \le b
  2. ∃y∈Rm:yTA=0\exists y \in R^m : y^T A = 0, yTb>0y^T b > 0, y≤0y \le 0.

We can prove this by converting statement (2) into an equivalent one:

  1. ∃y∈Rm:yTA=0\exists y \in R^m : y^T A = 0, yTb=1y^T b = 1, y≤0y \le 0.

and hence

  1. ∃y∈Rm:(−y)T[A,b]=[0,−1]\exists y \in R^m : (-y)^T [A, b] = [0, -1], −y≥0-y \ge 0.

If this doesn't hold, by previous result, we have ∃(x,λ)∈Rn+1\exists (x, \lambda) \in R^{n + 1}, s,t., [A,b](x,λ)=Ax+λb≤0[A, b] (x, \lambda) = Ax + \lambda b \le 0 and [0,1](x,−λ)=−λ>0[0, 1](x, -\lambda) = -\lambda > 0, which implies thatAx−λ≤bA \frac{x}{-\lambda} \le b.

But this can also be verified via their geometrical meanings. We are not going to give all details here, just an example in R2R^2:

Geometry Interpretation 2

Another equivalent form of Farkas Lemma is written as

  1. ∃x∈Rn:Ax≤b\exists x \in R^n : Ax \le b, x≥0x \ge 0.
  2. ∃y∈Rm:yTA≤0\exists y \in R^m : y^T A \le 0, yTb>0y^T b > 0, y≤0y \le 0.

Define P={z∣∃x∈Rn:z≥Ax,x≥0}⊂RmP = \{ z \mid \exists x \in R^n : z \ge Ax, x \ge 0\} \subset R^m.

  1. Statement 1 says b∈Zb \in Z.
  2. Otherwise, as PP is convex and closed
    • z1,z2∈P→∃x1,x2≥0,z1≥Ax1,z2≥Ax2z_1, z_2 \in P \rightarrow \exists x_1, x_2 \ge 0, z_1 \ge Ax_1, z_2 \ge Ax_2, then μ1z1+μ2z2≥A(μ1x1+μ2x2),∀μ1,μ2≥0,μ1+μ2=1\mu_1 z_1 + \mu_2 z_2 \ge A(\mu_1 x_1 + \mu_2 x_2), \forall \mu_1, \mu_2 \ge 0, \mu_1 + \mu_2 = 1,

    • Closeness follows from ≥\ge in the definition of PP. There is a unique point z∗z^* that minimize ∣∣z−b∣∣||z - b|| for z∈Zz \in Z. Let y=(b−z∗)≠0y = (b - z^*) \neq 0. Then it holds yT(b−z∗)=yTy>0y^T (b - z^*) = y^T y > 0 and yT(z−z∗)≤0y^T(z - z^*) \le 0 for any z∈Zz \in Z.

    • Similarly, z∗∈P→∃x≥0,z∗≥Ax→k≥0,kz∗≥A(kx)→kz∈Pz^* \in P \rightarrow \exists x \ge 0, z^* \ge Ax \rightarrow k \ge 0, k z^* \ge A (kx) \rightarrow kz \in P. Then 0∈P0 \in P and 2z∗∈P2z^* \in P, which implies −yTz∗≤0- y^T z^* \le 0 and yTz∗≤0y^T z^* \le 0. Hence yTz∗=0y^T z^* = 0 and yTb=yTy+yTz∗>0y^T b = y^T y + y^T z^* > 0.

    • Further, the fact z∗+ei∈Zz^* + e_i \in Z gives yTei≤0y^T e_i \le 0 for arbitrary ii. Therefore y≤0y \le 0. The yTb<0y^T b < 0 and yTA≤0y^T A \le 0 follow from the same proof given above.