{
  "aliases": [
    "gauss-lemma"
  ],
  "backlinks": [
    {
      "field": "uses",
      "target": "0XSDBCP4RZ"
    }
  ],
  "body": "\n## Statement\n\nLet $p$ be an odd prime and let $a$ be an integer with $p \\nmid a$.\nReduce each of the integers $a, 2a, \\dots, \\frac{p-1}{2} a$ to its least positive residue modulo $p$.\nLet $n$ be the number of these residues that are greater than $p/2$.\nThen $\\left(\\frac{a}{p}\\right) = (-1)^n$, where the left side is the [[Legendre symbol|01J8AMV9RS]].\n\n## Remarks\n\nFor example, take $p = 7$ and $a = 3$. The residues of $3, 6, 9$ are $3, 6, 2$, and only $6$ is greater than $7/2$. So $\\left(\\frac{3}{7}\\right) = -1$.\nWith $a = 2$, the lemma gives the [[second supplement to quadratic reciprocity|0ZXW95S44M]].\nGauss used the lemma in one of his proofs of the [[law of quadratic reciprocity|085MJS6907]].\n\n## Explanations\n\n### L1 human\n\nWrite the first half of the multiples of $a$ modulo $p$, and count how many land in the upper half of $1, \\dots, p - 1$.\nAn even count means that $a$ is a square modulo $p$, and an odd count means that it is not.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "aliases": [
      "gauss-lemma"
    ],
    "kind": "statement",
    "msc": [
      "11A15"
    ],
    "name": "Gauss's lemma on quadratic residues",
    "role": "lemma",
    "same_as": {
      "wikidata": "Q2526246",
      "wikipedia": "Gauss's lemma (number theory)"
    },
    "sources": [
      {
        "locator": "Statement of the lemma",
        "url": "https://en.wikipedia.org/wiki/Gauss%27s_lemma_(number_theory)"
      }
    ],
    "tag": "037ACYXB5Z",
    "uses": [
      "01J8AMV9RS"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/037ACYXB5Z/",
  "links": [
    {
      "field": "uses",
      "target": "01J8AMV9RS"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/037ACYXB5Z.md",
  "msc": [
    "11A15"
  ],
  "name": "Gauss's lemma on quadratic residues",
  "prov": null,
  "role": "lemma",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/037/037ACYXB5Z.md",
  "status": null,
  "tag": "037ACYXB5Z",
  "uri": "m2://037ACYXB5Z",
  "url": "https://math2.tamnd.com/wiki/gausss-lemma-on-quadratic-residues/",
  "writing": {
    "tag": "037ACYXB5Z",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
