{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "0NW1JP7TBR"
    },
    {
      "field": "uses",
      "target": "0PHBS78HKT"
    }
  ],
  "body": "\n## Statement\n\nLet $p$ be an odd prime and let $a$ be an integer.\nThen\n$$a^{(p-1)/2} \\equiv \\left(\\frac{a}{p}\\right) \\pmod p,$$\nwhere $\\left(\\frac{a}{p}\\right)$ is the [[Legendre symbol|01J8AMV9RS]].\n\n## Remarks\n\nSo for $p \\nmid a$, the integer $a$ is a quadratic residue modulo $p$ if and only if $a^{(p-1)/2} \\equiv 1 \\pmod p$.\nFor example, $3^3 = 27 \\equiv -1 \\pmod 7$, so $3$ is a quadratic nonresidue modulo $7$.\nThe proof uses [[Fermat's little theorem|0M25PRN3WQ]]: $x = a^{(p-1)/2}$ satisfies $x^2 \\equiv 1$, so $x \\equiv \\pm 1 \\pmod p$.\nA consequence is the [[multiplicativity of the Legendre symbol|0NW1JP7TBR]].\n\n## History\n\nLeonhard Euler found the criterion.\n\n## Explanations\n\n### L1 human\n\nTo test whether $a$ is a square modulo $p$, raise $a$ to the power $(p-1)/2$.\nThe result is $1$ for a square and $-1$ for a non-square, modulo $p$.\nWith [[fast modular exponentiation|04DR5PM25N]], this test is quick even for large $p$.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "kind": "statement",
    "msc": [
      "11A15"
    ],
    "name": "Euler's criterion",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q2346904",
      "wikipedia": "Euler's criterion"
    },
    "sources": [
      {
        "locator": "lead section",
        "url": "https://en.wikipedia.org/wiki/Euler%27s_criterion"
      }
    ],
    "tag": "0M7DEDKSYB",
    "uses": [
      "01J8AMV9RS",
      "0M25PRN3WQ"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0M7DEDKSYB/",
  "links": [
    {
      "field": "uses",
      "target": "01J8AMV9RS"
    },
    {
      "field": "uses",
      "target": "0M25PRN3WQ"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0M7DEDKSYB.md",
  "msc": [
    "11A15"
  ],
  "name": "Euler's criterion",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0M7/0M7DEDKSYB.md",
  "status": null,
  "tag": "0M7DEDKSYB",
  "uri": "m2://0M7DEDKSYB",
  "url": "https://math2.tamnd.com/wiki/eulers-criterion/",
  "writing": {
    "tag": "0M7DEDKSYB",
    "kind": "statement",
    "level": "W1",
    "next": [
      {
        "what": "edge about out",
        "note": "the concepts that the statement is about",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge proves in",
        "note": "at least one proof node",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of or illustrates in",
        "note": "one example that shows the statement at work",
        "have": 0,
        "want": 1
      },
      {
        "what": "explanation L2",
        "have": 0,
        "want": 1
      }
    ]
  }
}
