{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $A$ be a real $m \\times n$ [[matrix|0VD9ZSWWJG]] and let $b \\in \\R^m$.\nFor vectors, write $v \\ge 0$ when every coordinate of $v$ is nonnegative, and let $A^T$ be the [[transpose|09DXWYRD43]] of $A$.\nThen exactly one of the following two systems has a solution:\n\n1. $x \\in \\R^n$ with $A x = b$ and $x \\ge 0$;\n2. $y \\in \\R^m$ with $A^T y \\ge 0$ and $b^T y \u003c 0$.\n\n## Remarks\n\nBoth cannot hold: if $Ax = b$ with $x \\ge 0$ and $A^T y \\ge 0$, then $b^T y = x^T (A^T y) \\ge 0$.\nFor the other direction, the set $C = \\set{Ax : x \\ge 0}$ is the [[convex cone|6VE4KA12VD]] generated by the columns of $A$, and it is closed because it is finitely generated.\nIf $b \\notin C$, the hyperplane separation theorem gives a hyperplane through the origin that separates $b$ from $C$; its normal vector $y$ solves the second system.\nExample: for $A = \\begin{pmatrix} 1 \u0026 0 \\\\ 0 \u0026 1 \\end{pmatrix}$ and $b = (1, -1)^T$, the first system has no solution, and $y = (0, 1)^T$ solves the second, since $A^T y = (0, 1)^T \\ge 0$ and $b^T y = -1 \u003c 0$.\n\n## Explanations\n\n### L1 human\n\nEither a vector $b$ can be built from the columns of $A$ with nonnegative weights, or there is a simple certificate that it cannot.\nThe certificate is a direction $y$ in which all columns point \"forward\" while $b$ points \"backward\".\nGeometrically, a point outside a cone can be cut off from the cone by a flat wall through the apex.\n\n### L2 human\n\nFarkas' lemma is a theorem of the alternative, and it is the basis of the duality theory of [[linear programming|VNMXB0J2KA]].\nMany variants follow from it by adding slack variables, for example the version with $Ax \\le b$.\n[[Gordan's lemma|HEKDP2TDNZ]] and the Minkowski–Weyl theorem belong to the same circle of ideas about finitely generated cones.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "6VE4KA12VD"
    ],
    "kind": "statement",
    "msc": [
      "90C05",
      "52A20",
      "15A39"
    ],
    "name": "Farkas' lemma",
    "role": "lemma",
    "same_as": {
      "wikidata": "Q606254",
      "wikipedia": "Farkas' lemma"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Farkas'_lemma"
      }
    ],
    "tag": "FYZC634H2D",
    "uses": [
      "0VD9ZSWWJG",
      "09DXWYRD43",
      "6VE4KA12VD"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/FYZC634H2D/",
  "links": [
    {
      "field": "about",
      "target": "6VE4KA12VD"
    },
    {
      "field": "uses",
      "target": "0VD9ZSWWJG"
    },
    {
      "field": "uses",
      "target": "09DXWYRD43"
    },
    {
      "field": "uses",
      "target": "6VE4KA12VD"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/FYZC634H2D.md",
  "msc": [
    "90C05",
    "52A20",
    "15A39"
  ],
  "name": "Farkas' lemma",
  "prov": null,
  "role": "lemma",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/FYZ/FYZC634H2D.md",
  "status": null,
  "tag": "FYZC634H2D",
  "uri": "m2://FYZC634H2D",
  "url": "https://tamnd.github.io/math2/wiki/farkas-lemma/",
  "writing": {
    "tag": "FYZC634H2D",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
