{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nA *binary quadratic form* (with integer coefficients) is a polynomial\n$$f(x, y) = ax^2 + bxy + cy^2$$\nin two variables $x, y$, with coefficients $a, b, c$ in the [[integers|0C4JS9RF5M]].\nIts *discriminant* is $D = b^2 - 4ac$.\nThe form is *primitive* if the [[greatest common divisor|0C8WYW4KYQ]] of $a$, $b$, $c$ is $1$.\nTwo forms $f$ and $g$ are *properly equivalent* if $g(x, y) = f(\\alpha x + \\beta y, \\gamma x + \\delta y)$ for some matrix $\\begin{pmatrix} \\alpha \u0026 \\beta \\\\ \\gamma \u0026 \\delta \\end{pmatrix}$ in the [[special linear group|0V9PMN0RBH]] $\\mathrm{SL}_2(\\Z)$.\n\n## Remarks\n\nProperly equivalent forms have the same discriminant and represent the same integers.\nThe discriminant always satisfies $D \\equiv 0$ or $1 \\pmod 4$.\nThe form is positive definite if and only if $D \u003c 0$ and $a \u003e 0$.\nSome authors write the form as $ax^2 + 2bxy + cy^2$ and require $a, b, c$ to be integers; this is Gauss's convention.\n\nExample: $x^2 + y^2$ has $a = 1$, $b = 0$, $c = 1$, so it is a primitive binary quadratic form of discriminant $-4$.\n\nNon-example: $x^2 + y^2 + z^2$ is a quadratic form with integer coefficients, but it has three variables, so it is not binary.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "SBDSYA037Q",
    "kind": "definition",
    "msc": [
      "11E16"
    ],
    "name": "Binary quadratic form",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Binary_quadratic_form"
      }
    ],
    "tag": "PQV6DNE0CW",
    "uses": [
      "2FQVQCTV88",
      "0C4JS9RF5M",
      "0C8WYW4KYQ",
      "0V9PMN0RBH"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/PQV6DNE0CW/",
  "links": [
    {
      "field": "defines",
      "target": "SBDSYA037Q"
    },
    {
      "field": "uses",
      "target": "2FQVQCTV88"
    },
    {
      "field": "uses",
      "target": "0C4JS9RF5M"
    },
    {
      "field": "uses",
      "target": "0C8WYW4KYQ"
    },
    {
      "field": "uses",
      "target": "0V9PMN0RBH"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/PQV6DNE0CW.md",
  "msc": [
    "11E16"
  ],
  "name": "Binary quadratic form",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/PQV/PQV6DNE0CW.md",
  "status": null,
  "tag": "PQV6DNE0CW",
  "uri": "m2://PQV6DNE0CW",
  "url": "https://math2.tamnd.com/wiki/binary-quadratic-form-definition/",
  "writing": {
    "tag": "PQV6DNE0CW",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
