Farkas' lemma

In mathematics, Farkas' lemma is a solvability theorem for a finite system of linear inequalities.

It was originally proven by the Hungarian mathematician Gyula Farkas.

[1] Farkas' lemma is the key result underpinning the linear programming duality and has played a central role in the development of mathematical optimization (alternatively, mathematical programming).

It is used amongst other things in the proof of the Karush–Kuhn–Tucker theorem in nonlinear programming.

[2] Remarkably, in the area of the foundations of quantum theory, the lemma also underlies the complete set of Bell inequalities in the form of necessary and sufficient conditions for the existence of a local hidden-variable theory, given data from any specific set of measurements.

[3] Generalizations of the Farkas' lemma are about the solvability theorem for convex inequalities,[4] i.e., infinite system of linear inequalities.

Farkas' lemma belongs to a class of statements called "theorems of the alternative": a theorem stating that exactly one of two systems has a solution.

[5] There are a number of slightly different (but equivalent) formulations of the lemma in the literature.

The lemma says that exactly one of the following two statements must be true (depending on b1 and b2): Here is a proof of the lemma in this special case: Consider the closed convex cone

is the set of the vectors b for which the first assertion in the statement of Farkas' lemma holds.

On the other hand, the vector y in the second assertion is orthogonal to a hyperplane that separates b and

In terms of these vectors, Farkas' lemma states that exactly one of the following two statements is true: The sums

For example, let n, m = 2, a1 = (1, 0)T, and a2 = (1, 1)T. The convex cone spanned by a1 and a2 can be seen as a wedge-shaped slice of the first quadrant in the xy plane.

Hence, the hyperplane with normal y indeed separates the convex cone a1x1 + a2x2 from b.

A particularly suggestive and easy-to-remember version is the following: if a set of linear inequalities has no solution, then a contradiction can be produced from it by linear combination with nonnegative coefficients.

Since the positive combination produces a zero vector on the left and a −1 on the right, the contradiction is apparent.

Thus, Farkas' lemma can be viewed as a theorem of logical completeness:

is a set of "axioms", the linear combinations are the "derivation rules", and the lemma says that, if the set of axioms is inconsistent, then it can be refuted using the derivation rules.

[8]: 92–94 Farkas' lemma implies that the decision problem "Given a system of linear equations, does it have a non-negative solution?"

is equal to P. In particular, the question of whether a system of linear equations has a non-negative solution was not known to be in P, until it was proved using the ellipsoid method.

[9]: 25 The Farkas Lemma has several variants with different sign constraints (the first one is the original version):[8]: 92 The latter variant is mentioned for completeness; it is not actually a "Farkas lemma" since it contains only equalities.

It is based on the following two rules of inference: The lemma says that: The variants are summarized in the table below.

is closed, then exactly one of the following two statements is true: Generalized Farkas' lemma can be interpreted geometrically as follows: either a vector is in a given closed convex cone, or there exists a hyperplane separating the vector from the cone; there are no other possibilities.

In convex optimization, various kinds of constraint qualification, e.g. Slater's condition, are responsible for closedness of the underlying convex cone

in generalized Farkas' lemma, we obtain the following corollary about the solvability for a finite system of linear equalities: Corollary —  Let

Then exactly one of the following two statements is true: Farkas's lemma can be varied to many further theorems of alternative by simple modifications,[5] such as Gordan's theorem: Either

Common applications of Farkas' lemma include proving the strong duality theorem associated with linear programming and the Karush–Kuhn–Tucker conditions.

An extension of Farkas' lemma can be used to analyze the strong duality conditions for and construct the dual of a semidefinite program.

It is sufficient to prove the existence of the Karush–Kuhn–Tucker conditions using the Fredholm alternative but for the condition to be necessary, one must apply von Neumann's minimax theorem to show the equations derived by Cauchy are not violated.

This is used for Dill's Reluplex method for verifying deep neural networks.