Hubbry Logo
Farkas' lemmaFarkas' lemmaMain
Open search
Farkas' lemma
Community hub
Farkas' lemma
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Farkas' lemma
Farkas' lemma
from Wikipedia

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).[citation needed] 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.[2]

Generalizations of the Farkas' lemma are about the solvability theorem for convex inequalities,[3] 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.[4]

Statement of the lemma

[edit]

There are a number of slightly different (but equivalent) formulations of the lemma in the literature. The one given here is due to Gale, Kuhn and Tucker (1951).[5]

Farkas' lemma Let and Then exactly one of the following two assertions is true:

  1. There exists an such that and
  2. There exists a such that and

Here, the notation means that all components of the vector are nonnegative.

Example

[edit]

Let m, n = 2, and The lemma says that exactly one of the following two statements must be true (depending on b1 and b2):

  1. There exist x1 ≥ 0, x2 ≥ 0 such that 6x1 + 4x2 = b1 and 3x1 = b2, or
  2. There exist y1, y2 such that 6y1 + 3y2 ≥ 0, 4y1 ≥ 0, and b1 y1 + b2 y2 < 0.

Here is a proof of the lemma in this special case:

  • If b2 ≥ 0 and b1 − 2b2 ≥ 0, then option 1 is true, since the solution of the linear equations is and Option 2 is false, since so if the right-hand side is positive, the left-hand side must be positive too.
  • Otherwise, option 1 is false, since the unique solution of the linear equations is not weakly positive. But in this case, option 2 is true:
    • If b2 < 0, then we can take e.g. y1 = 0 and y2 = 1.
    • If b1 − 2b2 < 0, then, for some number B > 0, b1 = 2b2B, so: Thus we can take, for example, y1 = 1, y2 = −2.

Geometric interpretation

[edit]

Consider the closed convex cone spanned by the columns of A; that is,

Observe that 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 The lemma follows from the observation that b belongs to if and only if there is no hyperplane that separates it from

More precisely, let denote the columns of A. In terms of these vectors, Farkas' lemma states that exactly one of the following two statements is true:

  1. There exist non-negative coefficients such that
  2. There exists a vector such that for and

The sums with nonnegative coefficients form the cone spanned by the columns of A. Therefore, the first statement tells that b belongs to

The second statement tells that there exists a vector y such that the angle of y with the vectors ai is at most 90°, while the angle of y with the vector b is more than 90°. The hyperplane normal to this vector has the vectors ai on one side and the vector b on the other side. Hence, this hyperplane separates the cone spanned by from the vector b.

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. Now, suppose b = (0, 1). Certainly, b is not in the convex cone a1x1 + a2x2. Hence, there must be a separating hyperplane. Let y = (1, −1)T. We can see that a1 · y = 1, a2 · y = 0, and b · y = −1. Hence, the hyperplane with normal y indeed separates the convex cone a1x1 + a2x2 from b.

Logic interpretation

[edit]

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. In formulas: if is unsolvable then has a solution.[6] Note that is a combination of the left-hand sides, a combination of the right-hand side of the inequalities. 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.[7]: 92–94 

Implications in complexity theory

[edit]

Farkas' lemma implies that the decision problem "Given a system of linear equations, does it have a non-negative solution?" is in the intersection of NP and co-NP. This is because, according to the lemma, both a "yes" answer and a "no" answer have a proof that can be verified in polynomial time. The problems in the intersection are also called well-characterized problems. It is a long-standing open question whether 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.[8]: 25 

Variants

[edit]

The Farkas Lemma has several variants with different sign constraints (the first one is the original version):[7]: 92 

  • Either has a solution or has a solution with
  • Either has a solution or has a solution with
  • Either has a solution or has a solution with .
  • Either has a solution or has a solution with

The latter variant is mentioned for completeness; it is not actually a "Farkas lemma" since it contains only equalities. Its proof is an exercise in linear algebra.

There are also Farkas-like lemmas for integer programs.[8]: 12--14  For systems of equations, the lemma is simple:

  • Assume that A and b have rational coefficients. Then either has an integral solution or there exists such that is integral and is not integral.

For system of inequalities, the lemma is much more complicated. It is based on the following two rules of inference:

  1. Given inequalities and coefficients , infer the inequality .
  2. Given an inequality , infer the inequality .

The lemma says that:

  • Assume that A and b have rational coefficients. Then either has an integral solution , or it is possible to infer from using finitely many applications of inference rules 1,2 the inequality .

The variants are summarized in the table below.

System Constraints on x Alternative system Constraints on y
,
, ,
, ,
,
integral, not integral
can be inferred from

Generalizations

[edit]

Generalized Farkas' lemma Let is a closed convex cone in and the dual cone of is If convex cone is closed, then exactly one of the following two statements is true:

  1. There exists an such that and
  2. There exists a such that and

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. The closedness condition is necessary, see Separation theorem I in Hyperplane separation theorem. For original Farkas' lemma, is the nonnegative orthant hence the closedness condition holds automatically. Indeed, for polyhedral convex cone, i.e., there exists a such that the closedness condition holds automatically. In convex optimization, various kinds of constraint qualification, e.g. Slater's condition, are responsible for closedness of the underlying convex cone

By setting and in generalized Farkas' lemma, we obtain the following corollary about the solvability for a finite system of linear equalities:

Corollary Let and Then exactly one of the following two statements is true:

  1. There exists an such that
  2. There exists a such that and

Further implications

[edit]

Farkas' lemma can be varied to many further theorems of alternative by simple modifications,[4] such as Gordan's theorem: Either has a solution x, or has a nonzero solution y with y ≥ 0.

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.

See also

[edit]

Notes

[edit]

Further reading

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Farkas' lemma is a fundamental result in linear algebra and that characterizes the infeasibility of systems of linear inequalities by providing an alternative system whose solvability certifies the original's inconsistency. Specifically, given a matrix ARm×nA \in \mathbb{R}^{m \times n} and a vector bRmb \in \mathbb{R}^m, the lemma states that exactly one of the following holds: there exists a nonnegative vector xRnx \in \mathbb{R}^n such that Ax=bAx = b and x0x \geq 0, or there exists a vector yRmy \in \mathbb{R}^m such that ATy0A^T y \geq 0 and bTy<0b^T y < 0. This duality of alternatives forms the cornerstone of feasibility criteria in optimization. Proved by the Hungarian mathematician Gyula Farkas in 1902, the lemma originated from his work on formulating mechanical equilibrium conditions using linear inequalities, building on 's 1798 principle of virtual work. In his seminal paper, Farkas addressed homogeneous systems, showing that an inequality gTx0g^T x \leq 0 follows from a set of inequalities giTx0g_i^T x \leq 0 (for i=1,,mi = 1, \dots, m) if and only if gg can be expressed as a nonnegative linear combination of the gig_i's. This result, initially motivated by physics, laid the groundwork for modern mathematical optimization despite predating linear programming by decades. Farkas' lemma plays a pivotal role in linear programming duality, enabling proofs of strong duality theorems that equate primal and dual optimal values when both problems are feasible. Geometrically, it equates to the separating hyperplane theorem for polyhedral cones, certifying that a point lies outside a convex cone via a supporting hyperplane. The lemma's influence extends to nonlinear programming through the Karush-Kuhn-Tucker conditions, where it underpins constraint qualifications and optimality certificates, and to broader fields like operations research and computer science for verifying unsatisfiability in constraint systems. Variants, such as those for mixed integer or infinite-dimensional settings, further generalize its applications in contemporary optimization.

Introduction and Statement

Historical Background

Gyula Farkas (1847–1930) was a Hungarian mathematician and physicist whose work bridged analytical mechanics, thermodynamics, and linear algebra. Born on March 28, 1847, in Sárosd, Fejér County, he initially studied law and philosophy in Pest before turning to engineering and natural sciences, where he studied physics and chemistry and earning a Ph.D. in mathematics. Farkas held teaching positions, including as a dozent in function theory at the University of Budapest in 1880, and later became an ordinary professor of mathematics and physics at the University of Kolozsvár (now Cluj-Napoca, Romania), where he served as dean and rector. His career also involved practical engineering, such as hydraulic projects, and he retired in 1915 due to deteriorating eyesight, spending his later years in Budapest. Farkas' lemma originated in his efforts to formalize principles of mechanical equilibrium under inequality constraints, building on 19th-century foundations in statics. The result first appeared in his 1902 paper "Theorie der einfachen Ungleichungen," published in the Journal für die reine und angewandte Mathematik (volume 124, pages 1–27), where he proved a key theorem on the consistency of finite systems of linear inequalities. This work was directly inspired by Joseph Fourier's 1826 paper "Solution d’une question particulière du calcul des inégalités," which introduced methods for handling linear inequalities in the context of mechanics and probability, though Fourier's treatment remained incomplete and algorithmic rather than theorem-based. Earlier 19th-century contributions, such as those by Cauchy and others on polyhedral geometry, also influenced the evolving understanding of feasible regions defined by inequalities. Initially applied to problems in analytical mechanics and statics—such as decomposing reaction forces in rigid body systems or ensuring equilibrium conditions—Farkas' theorem provided a mathematical foundation for inequality-based stability analysis that extended Fourier's qualitative principles. For instance, it enabled precise derivations of necessary and sufficient conditions for mechanical systems with friction or unilateral constraints. The lemma's broader significance emerged post-1940s with the rise of optimization theory; it became central to linear programming duality after George Dantzig's 1947 simplex method and John von Neumann's recognition of its role in proving strong duality theorems, marking its transition from mechanics to operations research.

Formal Statement

Farkas' lemma provides a fundamental condition for the solvability of systems of linear equations with non-negativity constraints. Consider an m×nm \times n matrix AA and a vector bRmb \in \mathbb{R}^m. The system Ax=bAx = b, x0x \geq 0 has a solution if and only if for every yRmy \in \mathbb{R}^m satisfying Ay0A^\top y \geq 0, it holds that by0b^\top y \geq 0. Here, x0x \geq 0 means that the vector xRnx \in \mathbb{R}^n belongs to the non-negative orthant R+n\mathbb{R}^n_+, defined as {xRnxi0 i=1,,n}\{x \in \mathbb{R}^n \mid x_i \geq 0 \ \forall i = 1, \dots, n\}, and similarly for vectors in Rm\mathbb{R}^m. The transpose AA^\top is the n×mn \times m matrix obtained by interchanging rows and columns of AA. This formulation ensures the consistency of the system, meaning it has at least one feasible solution in the non-negative orthant. Equivalently, the two alternatives are mutually exclusive and exhaustive: either there exists xRnx \in \mathbb{R}^n with Ax=bAx = b and x0x \geq 0, or there exists yRmy \in \mathbb{R}^m with Ay0A^\top y \geq 0 and by<0b^\top y < 0, but not both. The mutual exclusivity follows from the fact that if both held, then by=(Ax)y=x(Ay)0b^\top y = (Ax)^\top y = x^\top (A^\top y) \geq 0 (since x0x \geq 0 and Ay0A^\top y \geq 0), contradicting by<0b^\top y < 0. Exhaustiveness is established via the separating hyperplane theorem applied to the convex cone generated by the columns of AA. An alternative equivalent form concerns systems of linear inequalities without non-negativity constraints on the variables. The system AxbAx \leq b (with xRnx \in \mathbb{R}^n unrestricted) has no solution if and only if there exists y0y \geq 0 such that Ay=0A^\top y = 0 and by<0b^\top y < 0. In this context, y0y \geq 0 again refers to the non-negative orthant R+m\mathbb{R}^m_+, and the equality Ay=0A^\top y = 0 indicates that yy lies in the orthogonal complement of the range of AA. This version characterizes inconsistency by the existence of a non-trivial non-negative certificate violating the right-hand side. The alternatives are also mutually exclusive and exhaustive, with proofs relying on duality in linear programming or Farkas' lemma in its primary form.

Interpretations

Geometric Interpretation

Farkas' lemma provides a geometric perspective on the feasibility of the system AxbA \mathbf{x} \leq \mathbf{b}, x0\mathbf{x} \geq \mathbf{0}, where AA is an m×nm \times n matrix and bRm\mathbf{b} \in \mathbb{R}^m. The feasible set is a polyhedron, defined as the intersection of the half-spaces corresponding to the inequalities. This polyhedron is nonempty precisely when b\mathbf{b} lies in the Minkowski sum of the convex cone generated by the columns of AA and the nonnegative orthant, that is, b\cone(\col(A))+R+m\mathbf{b} \in \cone(\col(A)) + \mathbb{R}^m_+. The lemma asserts that the system is inconsistent if and only if there exists y0\mathbf{y} \geq \mathbf{0} satisfying ATy0A^T \mathbf{y} \geq \mathbf{0} and bTy<0\mathbf{b}^T \mathbf{y} < 0. Geometrically, such a y\mathbf{y} serves as the normal vector to a separating hyperplane {zRmyTz=0}\{\mathbf{z} \in \mathbb{R}^m \mid \mathbf{y}^T \mathbf{z} = 0 \}, which strictly separates b\mathbf{b} from the convex set C=\cone(\col(A))+R+mC = \cone(\col(A)) + \mathbb{R}^m_+: yTb<0\mathbf{y}^T \mathbf{b} < 0, while yTc0\mathbf{y}^T \mathbf{c} \geq 0 for all cC\mathbf{c} \in C, since yT(Ax)=xT(ATy)0\mathbf{y}^T (A \mathbf{x}) = \mathbf{x}^T (A^T \mathbf{y}) \geq 0 for x0\mathbf{x} \geq \mathbf{0} and yTu0\mathbf{y}^T \mathbf{u} \geq 0 for u0\mathbf{u} \geq \mathbf{0}. This certificate y\mathbf{y} lies in the dual cone of CC, given by C={y0ATy0}C^* = \{ \mathbf{y} \geq \mathbf{0} \mid A^T \mathbf{y} \geq \mathbf{0} \}, highlighting the role of cone duality in certifying infeasibility. In terms of recession cones, the recession cone of the polyhedron is {d0Ad0}\{ \mathbf{d} \geq \mathbf{0} \mid A \mathbf{d} \leq \mathbf{0} \}; inconsistency occurs when no recession direction or bounded shift allows the polyhedron to contain a point, with the separating hyperplane providing the geometric proof of emptiness. Farkas' lemma is a finite-dimensional specialization of Minkowski's separating hyperplane theorem, which states that for two disjoint nonempty convex sets in Euclidean space, with at least one compact, there exists a hyperplane strictly separating them; here, the polyhedral structure of CC and the singleton {b}\{\mathbf{b}\} ensures the existence of the linear certificate y\mathbf{y}. The lemma further connects to the duality of polyhedral cones, where the dual cone A={yyTA0}A^* = \{ \mathbf{y} \mid \mathbf{y}^T A \geq \mathbf{0} \} of \cone(\col(A))\cone(\col(A)) plays a central role: the alternative condition equates to b\mathbf{b} being separated from the cone by an element of the dual, underscoring the self-duality of polyhedral cones under Farkas' framework.

Logical Interpretation

Farkas' lemma serves as a completeness result for the first-order theory of linear arithmetic over the real numbers, asserting that a system of linear inequalities AxbAx \leq b (with ARm×nA \in \mathbb{R}^{m \times n} and bRmb \in \mathbb{R}^m) is inconsistent if and only if there exists a vector yRmy \in \mathbb{R}^m with y0y \geq 0, ATy=0A^T y = 0, and yTb<0y^T b < 0. This vector yy constitutes a Farkas certificate, a refuting witness that certifies the unsatisfiability of the system by deriving a strict contradiction through a non-negative linear combination of the inequalities. Over the rationals, the lemma is complete and decidable in polynomial time via linear programming techniques, such as the simplex method, which generate such certificates efficiently. In contrast, over the integers, the lemma is incomplete due to the discrete nature of the domain, as some systems solvable over the rationals lack integer solutions. The lemma's statement embodies a proof by cases in first-order logic with linear arithmetic, establishing an exhaustive disjunction: either the primal system AxbAx \leq b has a solution, or the dual certificate system admits a non-negative refutation. This dichotomy ensures that every formula in the theory—expressed as a quantifier-free conjunction of linear inequalities—is either satisfiable or has a short refuting proof via the Farkas certificate, mirroring completeness in proof systems where every inconsistency yields a verifiable derivation. The two alternatives are logically complementary, as their simultaneous satisfaction leads to a contradiction: if xx solves the primal and yy the dual, then yTb=yTAx=0y^T b = y^T A x = 0, contradicting yTb<0y^T b < 0. Farkas' lemma contributes to the decidability of linear arithmetic over the reals, providing a foundational tool for algorithms that resolve satisfiability of linear inequalities, in line with on determining the solvability of mathematical problems. While highlighted the undecidability of general Diophantine equations, the linear case over ordered fields like the reals or rationals is decidable, with the lemma enabling certificate-based verification of infeasibility to support automated theorem proving. The lemma extends to quantifier elimination procedures for linear real arithmetic by facilitating the certification of emptiness in projected solution sets. In algorithms like Fourier-Motzkin elimination or SMT solvers, Farkas' lemma is invoked to check unsatisfiability after variable elimination: if a quantified system x(Axb)\exists x \, (Ax \leq b) reduces to an inconsistent quantifier-free formula, the certificate confirms the non-existence of solutions, allowing refinement of the propositional skeleton. This integration supports efficient decision procedures, such as those combining SAT solving with linear programming, where Farkas certificates propagate contradictions back through quantifiers.

Examples and Illustrations

Simple Example

To illustrate Farkas' lemma, consider the system of linear inequalities AxbAx \leq b in R2\mathbb{R}^2, where A=(1111),b=(12).A = \begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix}, \quad b = \begin{pmatrix} 1 \\ -2 \end{pmatrix}. This yields the inequalities x1x21x_1 - x_2 \leq 1 and x1+x22-x_1 + x_2 \leq -2.
Adding these inequalities produces 010 \leq -1, which is impossible, confirming that no solution xx exists.
According to Farkas' lemma, since the system is inconsistent, there must exist a certificate y0y \geq 0 such that ATy=0A^T y = 0 and bTy<0b^T y < 0. One such vector is y=(11)y = \begin{pmatrix} 1 \\ 1 \end{pmatrix}.
Verify the conditions: ATy=(1111)(11)=(00)A^T y = \begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix} \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}, and y0y \geq 0 holds componentwise. Moreover, bTy=11+(2)1=1<0b^T y = 1 \cdot 1 + (-2) \cdot 1 = -1 < 0.
This certificate proves inconsistency because if a solution xx existed, then yT(Ax)yTby^T (Ax) \leq y^T b would imply (ATy)TxbTy(A^T y)^T x \leq b^T y, or 0Tx10^T x \leq -1, i.e., 010 \leq -1, a contradiction. Thus, yy represents nonnegative weights whose linear combination of the inequalities yields the absurd strict inequality 0<00 < 0. In contrast, adjust bb to (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix}. The system now has a solution, such as x=(00)x = \begin{pmatrix} 0 \\ 0 \end{pmatrix}, since 00=010 - 0 = 0 \leq 1 and 0+0=01-0 + 0 = 0 \leq 1. No such certificate yy exists in this feasible case, aligning with the lemma's alternatives.

Example in Linear Programming

Farkas' lemma plays a key role in determining the feasibility of linear programs in standard form. Consider the primal problem of minimizing cTx\mathbf{c}^T \mathbf{x} subject to Ax=bA \mathbf{x} = \mathbf{b}, x0\mathbf{x} \geq \mathbf{0}, where AA is an m×nm \times n matrix, bRm\mathbf{b} \in \mathbb{R}^m, and cRn\mathbf{c} \in \mathbb{R}^n. By , this system is infeasible if and only if there exists a vector yRm\mathbf{y} \in \mathbb{R}^m such that yTA0T\mathbf{y}^T A \geq \mathbf{0}^T and yTb<0\mathbf{y}^T \mathbf{b} < 0. To illustrate, take a three-variable linear program: minimize x1+x2+x3x_1 + x_2 + x_3 subject to x1+x2+x3=1,x1+x2+x3=2,x1,x2,x30.\begin{align*} x_1 + x_2 + x_3 &= 1, \\ x_1 + x_2 + x_3 &= 2, \\ x_1, x_2, x_3 &\geq 0. \end{align*} Here, A=(111111)A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \end{pmatrix}, b=(12)\mathbf{b} = \begin{pmatrix} 1 \\ 2 \end{pmatrix}, and c=(111)\mathbf{c} = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}
Add your contribution
Related Hubs
User Avatar
No comments yet.