{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $K$ be a field, let $d \\ge 0$ be an integer, and let $c_0, \\dots, c_{d-1} \\in K$.\nLet $E$ be the [[linear recurrence with constant coefficients|081THG13JZ]] $u_{n+d} = c_0 u_n + c_1 u_{n+1} + \\dots + c_{d-1} u_{n+d-1}$ $(n \\ge 0)$.\nThen the [[space of solutions|05BDYVQQ0T]] of $E$ is a $K$-vector space of [[dimension|05G2G0P224]] $d$.\n\n## Remarks\n\nThe map $u \\mapsto (u_0, \\dots, u_{d-1})$ from the space of solutions to $K^d$ is linear.\nIt is injective, because the recurrence computes every later term from the first $d$ terms, and surjective, because any choice of first terms extends to a solution.\nSo it is an isomorphism, and the dimension is $d$.\nExample: for the Fibonacci recurrence $u_{n+2} = u_{n+1} + u_n$ over $\\R$, the space has dimension $2$.\nA basis is given by the solutions that start $(1, 0)$ and $(0, 1)$, or by $\\varphi^n$ and $\\psi^n$ with $\\varphi, \\psi = \\frac{1 \\pm \\sqrt{5}}{2}$.\nThe same argument works for a linear difference equation with variable coefficients $a_k(n) u_{n+k} + \\dots + a_0(n) u_n = 0$, provided $a_k(n) \\ne 0$ for all $n$.\n\n## Explanations\n\n### L1 human\n\nA linear recurrence of order $d$ has as many independent solutions as it has starting values.\nAny solution is a combination of $d$ basic solutions.\nSo to solve such a recurrence completely, it is enough to find $d$ solutions that are independent.\n\n### L2 human\n\nThe theorem is the discrete analogue of the fact that a linear differential equation of order $d$ has a $d$-dimensional space of solutions.\nIn practice, one finds a basis from the roots of the [[characteristic polynomial|0BWDJGQYST]].\nBy the theorem on [[geometric solutions|096SD4ERQH]], each root $q$ gives the solution $q^n$.\nIn characteristic $0$, a nonzero root $q$ of multiplicity $m$ gives the solutions $n^j q^n$ for $j \u003c m$.\nWhen $c_0 \\ne 0$ and the characteristic polynomial splits over $K$, these $d$ sequences are independent, so the dimension count shows they form a basis.\nThe general solution of an inhomogeneous equation is one particular solution plus an element of this space.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "099GXMHV40"
    ],
    "kind": "statement",
    "msc": [
      "39A06",
      "15A03"
    ],
    "name": "Dimension of the solution space of a linear recurrence",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Linear_recurrence_with_constant_coefficients"
      }
    ],
    "tag": "K00NJY6C33",
    "uses": [
      "081THG13JZ",
      "05BDYVQQ0T",
      "05G2G0P224"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/K00NJY6C33/",
  "links": [
    {
      "field": "about",
      "target": "099GXMHV40"
    },
    {
      "field": "uses",
      "target": "081THG13JZ"
    },
    {
      "field": "uses",
      "target": "05BDYVQQ0T"
    },
    {
      "field": "uses",
      "target": "05G2G0P224"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/K00NJY6C33.md",
  "msc": [
    "39A06",
    "15A03"
  ],
  "name": "Dimension of the solution space of a linear recurrence",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/K00/K00NJY6C33.md",
  "status": null,
  "tag": "K00NJY6C33",
  "uri": "m2://K00NJY6C33",
  "url": "https://tamnd.github.io/math2/wiki/dimension-of-the-solution-space-of-a-linear-recurrence/",
  "writing": {
    "tag": "K00NJY6C33",
    "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
      }
    ]
  }
}
