{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $(X, d)$ be a [[metric space|0VKD1TP7F3]], let $A \\subseteq X$ be nonempty, and let $L \\ge 0$.\nLet $f \\colon A \\to \\R$ satisfy $\\abs{f(a) - f(b)} \\le L \\, d(a, b)$ for all $a, b \\in A$.\nFor $x \\in X$ set\n$$F(x) = \\inf_{a \\in A} \\bigl( f(a) + L \\, d(x, a) \\bigr), \\qquad G(x) = \\sup_{a \\in A} \\bigl( f(a) - L \\, d(x, a) \\bigr).$$\nThen:\n\n1. $F$ and $G$ are real-valued, equal $f$ on $A$, and satisfy the [[Lipschitz condition|0AW1E6YTJY]] with constant $L$ on $X$.\n2. Every function $h \\colon X \\to \\R$ that equals $f$ on $A$ and is Lipschitz with constant $L$ satisfies $G \\le h \\le F$ on $X$.\n\n## Remarks\n\nProof idea: fix $a_0 \\in A$; for $a \\in A$, $f(a) + L d(x, a) \\ge f(a_0) - L d(a, a_0) + L d(x, a) \\ge f(a_0) - L d(x, a_0)$, so the [[infimum|0QF1MZ9FRG]] is finite.\nFor $x \\in A$ the same inequality with $a_0 = x$ shows $F(x) \\ge f(x)$, and the choice $a = x$ gives $F(x) \\le f(x)$.\nEach function $x \\mapsto f(a) + L d(x, a)$ is $L$-Lipschitz, and an infimum of $L$-Lipschitz functions that is finite is $L$-Lipschitz.\nExample: on $X = \\R$ with $A = \\set{0, 1}$, $f(0) = 0$, $f(1) = 1$ and $L = 1$, both $F$ and $G$ equal $x$ on $[0, 1]$, while $F(x) = \\abs{x}$ and $G(x) = x$ for $x \\le 0$, and $F(x) = x$ and $G(x) = 1 - \\abs{x - 1}$ for $x \\ge 1$.\nFor maps into $\\R^m$ with $m \\ge 2$, the same constant needs the [[Kirszbraun theorem|2ZM39HSFTQ]].\n\n## Explanations\n\n### L1 human\n\nA real function that is Lipschitz on part of a metric space extends to the whole space with the same Lipschitz constant.\nThe formula is explicit: take the lowest of the cones $f(a) + L d(x, a)$ that sit on the graph of $f$.\nThe highest of the downward cones $f(a) - L d(x, a)$ gives a second extension.\nThese two extensions are the largest and the smallest possible ones.\n\n### L2 human\n\nThe result needs no structure on $X$ beyond the metric, unlike the vector-valued [[Kirszbraun theorem|2ZM39HSFTQ]].\nIt shows, for example, that every Lipschitz function on a closed set of $\\R^n$ extends to $\\R^n$, which is useful before applying [[Rademacher's theorem|QEY26RT19R]].",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "about": [
      "0AW1E6YTJY"
    ],
    "kind": "statement",
    "msc": [
      "26B35",
      "54C20",
      "54E40"
    ],
    "name": "McShane–Whitney extension",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Lipschitz_continuity"
      }
    ],
    "tag": "MV7ADC2DEH",
    "uses": [
      "0AW1E6YTJY",
      "0VKD1TP7F3",
      "0QF1MZ9FRG",
      "0R3H5PANRQ"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/MV7ADC2DEH/",
  "links": [
    {
      "field": "about",
      "target": "0AW1E6YTJY"
    },
    {
      "field": "uses",
      "target": "0AW1E6YTJY"
    },
    {
      "field": "uses",
      "target": "0VKD1TP7F3"
    },
    {
      "field": "uses",
      "target": "0QF1MZ9FRG"
    },
    {
      "field": "uses",
      "target": "0R3H5PANRQ"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/MV7ADC2DEH.md",
  "msc": [
    "26B35",
    "54C20",
    "54E40"
  ],
  "name": "McShane–Whitney extension",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/MV7/MV7ADC2DEH.md",
  "status": null,
  "tag": "MV7ADC2DEH",
  "uri": "m2://MV7ADC2DEH",
  "url": "https://math2.tamnd.com/wiki/mcshane-whitney-extension/",
  "writing": {
    "tag": "MV7ADC2DEH",
    "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
      }
    ]
  }
}
