Farkas certificate for linear inequalities Created 2026-10-07 Updated 2026-10-14
Let and . For unrestricted , the system of linear inequalities has no feasible point if and only if there is a vector with
The entries are nonnegative Lagrange multipliers for the rows. Multiplying inequalities by them preserves their direction; the condition cancels every variable, leaving the contradiction
This is a Farkas' lemma alternative for non-strict inequalities; no strict-feasibility assumption is needed. See Boyd and Vandenberghe, Convex Optimization (2004), §5.8.3, pp. 261–262.
Three individually possible requirements, jointly impossible. Suppose two unrestricted real coordinates , drawn as in the diagram, must satisfy
Write every row in the same direction:
Then and . The nonnegative weighted sum, with Lagrange multipliers , is visibly
Each individual requirement defines a half-space in the plane. Even every pair has a feasible point: satisfies the first two, the first and third, and the second and third. Their common intersection is empty, because the first two force , while the third demands at most .
Figure 1.
Each half-plane is nonempty, but their three constraints add to the contradiction
. The first three panels shade each half-space separately. The final panel compares the simultaneous requirements with ; the two regions are disjoint. The points , and satisfy only pairs of constraints. Details.
Why cancellation is necessary for unrestricted variables. A nonzero linear functional can be made arbitrarily positive or negative by varying unrestricted , so alone would not yield a contradiction. Equality is essential here. If is also imposed, the sufficient certificate becomes , , , because then . This is the sign convention used in robust infeasibility under uniform constraint relaxation. One can instead append the rows and use the equality certificate on the enlarged system. Reversing all constraints to reverses the scalar sign to , as in the normalized integer Farkas infeasibility gap.
Checking a solver's infeasibility claim. A returned Farkas certificate for linear inequalities gives a short verification procedure: compute and , and check the three displayed conditions against the original constraints. Any positive multiple is another certificate; division by normalizes to . With rational numbers as data and certificate, the tests can be exact. With floating-point arithmetic, a small residual is a diagnostic rather than an exact cancellation: unrestricted can amplify a nonzero residual without bound. A rigorous certificate therefore needs exact cancellation or justified error bounds and additional bounds on the variables. The strict negative scalar is the margin of contradiction.
The same weighted sums give dual bounds. For the linear program maximizing over unrestricted with , any satisfying gives
for every feasible point. Minimizing over these multipliers is the dual linear program; the bound itself is weak duality. For example, maximize subject to , , . The multipliers give the upper bound , attained at . The infeasibility example above uses the same row directions, but lower bounds of on both coordinates. Its multipliers cancel the objective function as well as the variables: with would bound zero by a negative number. Thus impossibility and linear programming optimality certificates use the same arithmetic. See Boyd and Vandenberghe, Convex Optimization slides, §§5.32–5.35 for infeasibility as a dual alternative.
Why every inconsistent system has such a certificate. Introduce a slack variable vector and write . Split the unrestricted vector as with . Applying Farkas' lemma to the column matrix gives , , and . The first two conditions together are exactly . This reduction explains both the equality and the nonnegative row multipliers.
The dual linear program is the minimization problem
Indeed, for the optimization Lagrangian bounds the primal objective above on its feasible points. Its supremum over is finite precisely when , and then equals . The two labelled parts below establish the relevant weak duality and strong duality conclusions.
For the subsequent infeasibility argument, introduce nonnegative slack variables and the convex cone
This is generated by the columns of and the coordinate vectors. Here is why this finitely generated cone is closed. Any representation with a minimal number of positive coefficients uses linearly independent generators: otherwise subtract a suitable multiple of a dependence until one positive coefficient vanishes, preserving nonnegativity. For each fixed independent selection of generators, its nonnegative combinations form a closed set, because the inverse coordinate map on its span is continuous. There are finitely many selections, so their union is closed. This is the closedness of finitely generated cones used in Farkas' lemma.
When the primal linear program is infeasible, . Let be the nearest point of to , and set . The minimizing property gives for every . Taking gives . Consequently
In particular and . Rescaling by the positive number produces the requested Farkas' lemma certificate:
Now a feasible point of the relaxed inequalities would satisfy
Since , the sum of the nonnegative is positive. Thus robust infeasibility under uniform constraint relaxation gives
The ellipsoid method makes progress by reducing the volume of a containing ellipsoid. A nonempty linear polyhedron may have empty interior, so small volume alone cannot certify that the original system is infeasible. Relaxing the inequalities remedies this difficulty, but must not make an infeasible system appear feasible. The displayed positive gap proves exactly that sufficiently small relaxations preserve infeasibility. For rational input, determinant bounds give a Farkas' lemma certificate of polynomial encoding length, so a sufficiently small rational relaxation can be chosen from the input encoding length. Together with a bounding box and bounds on the volume of a relaxed feasible system, this lets the ellipsoid method distinguish infeasibility from a feasible system of very small or zero original volume in polynomial time. The certificate argument alone does not assert a polynomial precision bound for arbitrary unencoded real coefficients.