{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\n1. Let $p$ be a [[prime number|0SN0MAEKYX]]. If $p = 2$, then $x = 1$ gives $x^2 = 1 \\equiv -1 \\pmod 2$. Also $2 \\not\\equiv 3 \\pmod 4$. So the statement holds for $p = 2$.\n2. Let $p$ be odd. Then $p \\equiv 1$ or $p \\equiv 3 \\pmod 4$.\n3. There is an integer $x$ with $x^2 \\equiv -1 \\pmod p$ exactly when $-1$ is a [[quadratic residue|0SQDB87Z3T]] modulo $p$.\n4. Since $p \\nmid -1$, this holds exactly when the [[Legendre symbol|01J8AMV9RS]] $\\left(\\frac{-1}{p}\\right)$ equals $1$.\n5. By the [[first supplement|0PHBS78HKT]], $\\left(\\frac{-1}{p}\\right) = (-1)^{(p-1)/2}$. This is $1$ exactly when $(p-1)/2$ is even, that is, when $4 \\mid p - 1$.\n6. So for odd $p$, a solution exists exactly when $p \\equiv 1 \\pmod 4$. By step 2, this means $p \\not\\equiv 3 \\pmod 4$.\n\n## Idea\n\nFor odd $p$, the first supplement gives the answer as the sign $(-1)^{(p-1)/2}$, which is $+1$ exactly for $p \\equiv 1 \\pmod 4$. The prime $2$ is checked by hand.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11A15"
    ],
    "name": "Proof that −1 is a square modulo p if and only if p is not 3 modulo 4",
    "proves": "00DW862T78",
    "sources": [
      {
        "locator": "Proofs of the supplements",
        "url": "https://en.wikipedia.org/wiki/Quadratic_reciprocity"
      }
    ],
    "tag": "DZ5NDRMMGR",
    "uses": [
      "0PHBS78HKT",
      "01J8AMV9RS",
      "0SQDB87Z3T",
      "0SN0MAEKYX"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/DZ5NDRMMGR/",
  "links": [
    {
      "field": "proves",
      "target": "00DW862T78"
    },
    {
      "field": "uses",
      "target": "0PHBS78HKT"
    },
    {
      "field": "uses",
      "target": "01J8AMV9RS"
    },
    {
      "field": "uses",
      "target": "0SQDB87Z3T"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/DZ5NDRMMGR.md",
  "msc": [
    "11A15"
  ],
  "name": "Proof that −1 is a square modulo p if and only if p is not 3 modulo 4",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/DZ5/DZ5NDRMMGR.md",
  "status": null,
  "tag": "DZ5NDRMMGR",
  "uri": "m2://DZ5NDRMMGR",
  "url": "https://math2.tamnd.com/wiki/proof-that-1-is-a-square-modulo-p-if-and-only-if-p-is-not-3-modulo-4/",
  "writing": {
    "tag": "DZ5NDRMMGR",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
