{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $t_0 \\le t_1 \\le \\cdots \\le t_m$ be real numbers, called *knots*.\nThe *B-splines* $B_{i,p}$ of degree $p \\ge 0$ for these knots are the functions $\\R \\to \\R$ defined by recursion on $p$:\n\n1. for $0 \\le i \\le m - 1$, $B_{i,0}(x) = 1$ if $t_i \\le x \u003c t_{i+1}$ and $B_{i,0}(x) = 0$ otherwise;\n2. for $p \\ge 1$ and $0 \\le i \\le m - p - 1$,\n$$B_{i,p}(x) = \\frac{x - t_i}{t_{i+p} - t_i} \\, B_{i,p-1}(x) + \\frac{t_{i+p+1} - x}{t_{i+p+1} - t_{i+1}} \\, B_{i+1,p-1}(x),$$\nwhere a term whose denominator is $0$ is taken to be $0$.\n\n## Remarks\n\n$B_{i,p}$ is a [[spline|84TJ8KQ926]] of degree $p$ with knots $t_i, \\dots, t_{i+p+1}$; if $t_i \u003c t_{i+p+1}$, it is positive on $(t_i, t_{i+p+1})$ and zero outside $[t_i, t_{i+p+1})$.\nOn $[t_p, t_{m-p})$ the B-splines of degree $p$ sum to $1$, so they form a [[partition of unity|NH739XXVXK]] there.\nAt a knot of multiplicity $r \\le p$, the B-splines of degree $p$ have $p - r$ continuous derivatives.\nAn equivalent definition writes $B_{i,p}$ as $(t_{i+p+1} - t_i)$ times a divided difference of the truncated power $(\\cdot - x)_+^p$ at $t_i, \\dots, t_{i+p+1}$.\n\nExample: knots $0, 1, 2$ and $p = 1$.\nThen $B_{0,1}(x) = x \\, B_{0,0}(x) + (2 - x) \\, B_{1,0}(x)$, which is $x$ on $[0, 1)$, $2 - x$ on $[1, 2)$ and $0$ elsewhere: the hat function.\n\nNon-example: let $g$ be $x$ on $[0, 1)$, $1$ on $[1, 2)$ and $0$ elsewhere.\nIt is piecewise linear on the same knots, but it is not $B_{0,1}$.\nIt differs from the hat function on $(1, 2)$, and it jumps at $2$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "62AFX32JGT",
    "kind": "definition",
    "msc": [
      "41A15",
      "65D07",
      "65D17"
    ],
    "name": "B-spline",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/B-spline"
      }
    ],
    "tag": "8R4CVVV8WT",
    "uses": [
      "84TJ8KQ926",
      "NH739XXVXK"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/8R4CVVV8WT/",
  "links": [
    {
      "field": "defines",
      "target": "62AFX32JGT"
    },
    {
      "field": "uses",
      "target": "84TJ8KQ926"
    },
    {
      "field": "uses",
      "target": "NH739XXVXK"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/8R4CVVV8WT.md",
  "msc": [
    "41A15",
    "65D07",
    "65D17"
  ],
  "name": "B-spline",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/8R4/8R4CVVV8WT.md",
  "status": null,
  "tag": "8R4CVVV8WT",
  "uri": "m2://8R4CVVV8WT",
  "url": "https://tamnd.github.io/math2/wiki/b-spline-definition/",
  "writing": {
    "tag": "8R4CVVV8WT",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
