Let be an matrix and be an -vector. Then Farkas's lemma states that exactly one of the systems
and
is solvable, where is an -vector and is an -vector. Prove Farkas's lemma.
Suppose that both systems are solvable, let denote a solution to the first system, and denote a solution to the second. Taking transposes we have . Right multiplying by gives , which is a contradiction to the fact that . Thus, both systems cannot be simultaneously solved. Now suppose that the second system fails. Consider the following linear program:
and its corresponding dual program
Since the second system fails, the primal is infeasible. However, the dual is always feasible by taking . If there were a finite solution to the dual, then duality says there would also be a finite solution to the primal. Thus, the dual must be unbounded. Thus, there must exist a vector which makes arbitrarily small, implying that there exist vectors for which is strictly greater than . Thus, there is always at least one solution.