{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $K$ be a [[commutative ring|0310REJJY8]], let $n \\ge 1$, and let $A = (a_{ij})$ be a $2n \\times 2n$ matrix over $K$.\nAssume that $A$ is alternating: $a_{ji} = -a_{ij}$ and $a_{ii} = 0$ for all $i, j$.\nLet $\\Pi$ be the set of [[perfect matchings|0NHK9MFFW9]] of $\\set{1, \\dots, 2n}$, that is, partitions into $n$ pairs.\nWrite $M \\in \\Pi$ as $\\set{\\set{i_1, j_1}, \\dots, \\set{i_n, j_n}}$ with $i_k \u003c j_k$, and let $\\pi_M$ be the permutation $1 \\mapsto i_1, 2 \\mapsto j_1, \\dots, 2n-1 \\mapsto i_n, 2n \\mapsto j_n$.\nThe *Pfaffian* of $A$ is\n$$\\operatorname{pf}(A) = \\sum_{M \\in \\Pi} \\sgn(\\pi_M) \\prod_{k=1}^{n} a_{i_k j_k},$$\nwhere $\\sgn$ is the [[sign of a permutation|02DKV69ZH0]].\n\n## Remarks\n\nThe term of $M$ does not depend on the order in which the pairs are listed, because exchanging two pairs is an even permutation.\nFor an alternating matrix of odd size, the Pfaffian is set to $0$.\n\nExample: for $n = 2$ there are three matchings, and\n$$\\operatorname{pf}(A) = a_{12} a_{34} - a_{13} a_{24} + a_{14} a_{23}.$$\nFor the matching $\\set{\\set{1,3}, \\set{2,4}}$, the permutation $\\pi_M$ is $1 \\mapsto 1, 2 \\mapsto 3, 3 \\mapsto 2, 4 \\mapsto 4$, a transposition, so its sign is $-1$.\n\nNon-example: the symmetric matrix $\\begin{pmatrix} 0 \u0026 1 \\\\ 1 \u0026 0 \\end{pmatrix}$ is not alternating, because $a_{21} \\ne -a_{12}$ unless $2 = 0$ in $K$, so it has no Pfaffian in this sense.\n\nThe main facts are $\\operatorname{pf}(A)^2 = \\det A$ and $\\operatorname{pf}(B A B^T) = \\det(B) \\operatorname{pf}(A)$ for every $2n \\times 2n$ matrix $B$, where $\\det$ is the [[determinant|00KDZRW4C0]].\nAlternating matrices over a field are the same as [[skew-symmetric matrices|0PBY4E9GQF]] when the characteristic is not $2$.\n\n## Explanations\n\n### L1 human\n\nThe Pfaffian adds up, with signs, one product for each way to split the indices into pairs.\nIt plays for skew-symmetric matrices the role that the determinant plays for all square matrices.\n",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "defines": "NH5HWBPWS9",
    "kind": "definition",
    "msc": [
      "15A15"
    ],
    "name": "Pfaffian",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Pfaffian"
      }
    ],
    "tag": "C9JJD2AVJR",
    "uses": [
      "0PBY4E9GQF",
      "0NHK9MFFW9",
      "02DKV69ZH0",
      "0310REJJY8",
      "00KDZRW4C0"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/C9JJD2AVJR/",
  "links": [
    {
      "field": "defines",
      "target": "NH5HWBPWS9"
    },
    {
      "field": "uses",
      "target": "0PBY4E9GQF"
    },
    {
      "field": "uses",
      "target": "0NHK9MFFW9"
    },
    {
      "field": "uses",
      "target": "02DKV69ZH0"
    },
    {
      "field": "uses",
      "target": "0310REJJY8"
    },
    {
      "field": "uses",
      "target": "00KDZRW4C0"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/C9JJD2AVJR.md",
  "msc": [
    "15A15"
  ],
  "name": "Pfaffian",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/C9J/C9JJD2AVJR.md",
  "status": null,
  "tag": "C9JJD2AVJR",
  "uri": "m2://C9JJD2AVJR",
  "url": "https://math2.tamnd.com/wiki/pfaffian-definition/",
  "writing": {
    "tag": "C9JJD2AVJR",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
