Farkas' lemma is a result in mathematics stating that a vector is either in a given cone or that there exists a (hyper)plane separating the vector from the cone, but not both. It was originally proved by Farkas (1902). It is used amongst other things in the proof of the Karush-Kuhn-Tucker theorem in nonlinear programming.