{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $V$ be a real [[Hilbert space|HM2HHE3J51]], let $a \\colon V \\times V \\to \\R$ be a bounded [[bilinear form|0SQZMXB6GP]], and let $\\ell \\colon V \\to \\R$ be a bounded linear functional.\nLet $V_h \\subseteq V$ be a finite-dimensional subspace with a basis $\\varphi_1, \\ldots, \\varphi_N$, as in the [[Galerkin method|Y5B0PEBKE8]] or the [[finite element method|98GZ9DVHTA]].\nThe *stiffness matrix* is the $N \\times N$ matrix $K$ with entries\n$$K_{ij} = a(\\varphi_j, \\varphi_i), \\qquad 1 \\le i, j \\le N.$$\nThe vector $F$ with $F_i = \\ell(\\varphi_i)$ is the *load vector*.\n\n## Remarks\n\nThe function $u_h = \\sum_j c_j \\varphi_j$ satisfies $a(u_h, v) = \\ell(v)$ for all $v \\in V_h$ exactly when $K c = F$.\nIf $a$ is symmetric, then $K$ is symmetric.\nIf $a$ is coercive, $a(v, v) \\ge \\alpha \\norm{v}^2$ with $\\alpha \u003e 0$, then $c^T K c = a(v, v) \u003e 0$ for $v = \\sum_j c_j \\varphi_j \\ne 0$, so $K$ is positive definite in the symmetric case and invertible in general.\nIf $\\varphi_i$ and $\\varphi_j$ have disjoint supports and $a$ is an integral of local terms, then $K_{ij} = 0$.\n\nExample: for $-u'' = f$ on $(0, 1)$ with $u(0) = u(1) = 0$, take $a(u, v) = \\int_0^1 u' v' \\, dx$, nodes $x_i = ih$ with $h = 1/(N + 1)$, and hat functions $\\varphi_i$ with $\\varphi_i(x_j) = \\delta_{ij}$.\nOn each of its two intervals $\\varphi_i'$ equals $\\pm 1/h$, so $K_{ii} = 2/h$, $K_{i, i \\pm 1} = -1/h$, and all other entries are $0$.\nSo $K = h^{-1} \\operatorname{tridiag}(-1, 2, -1)$.\n\nNon-example: the matrix $M_{ij} = \\int_0^1 \\varphi_j \\varphi_i \\, dx$ is built from the $L^2$ inner product, not from the form $a$ of the problem.\nIt is the mass matrix, which has $M_{ii} = 2h/3$ and $M_{i, i \\pm 1} = h/6$ for the hat functions above.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "G8ZTW9JVX1",
    "kind": "definition",
    "msc": [
      "65N30",
      "74S05"
    ],
    "name": "Stiffness matrix",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Stiffness_matrix"
      }
    ],
    "tag": "DPR9DJRPAF",
    "uses": [
      "HM2HHE3J51",
      "0SQZMXB6GP",
      "Y5B0PEBKE8",
      "98GZ9DVHTA"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/DPR9DJRPAF/",
  "links": [
    {
      "field": "defines",
      "target": "G8ZTW9JVX1"
    },
    {
      "field": "uses",
      "target": "HM2HHE3J51"
    },
    {
      "field": "uses",
      "target": "0SQZMXB6GP"
    },
    {
      "field": "uses",
      "target": "Y5B0PEBKE8"
    },
    {
      "field": "uses",
      "target": "98GZ9DVHTA"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/DPR9DJRPAF.md",
  "msc": [
    "65N30",
    "74S05"
  ],
  "name": "Stiffness matrix",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/DPR/DPR9DJRPAF.md",
  "status": null,
  "tag": "DPR9DJRPAF",
  "uri": "m2://DPR9DJRPAF",
  "url": "https://tamnd.github.io/math2/wiki/stiffness-matrix-definition/",
  "writing": {
    "tag": "DPR9DJRPAF",
    "kind": "definition",
    "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
      }
    ]
  }
}
