{
  "aliases": [
    "ring-of-integers-modulo-n",
    "residue-class-ring"
  ],
  "backlinks": [
    {
      "field": "uses",
      "target": "06RJWZCG95"
    },
    {
      "field": "uses",
      "target": "0R8YXRC9AJ"
    }
  ],
  "body": "\n## Definition\n\nLet $n$ be a positive integer.\nThe integers modulo $n$ form the set $\\mathbb{Z}/n\\mathbb{Z} = \\{ \\overline{0}, \\overline{1}, \\dots, \\overline{n - 1} \\}$ of the [[residue classes|0QRV8FPK5M]] modulo $n$.\nAddition and multiplication on $\\mathbb{Z}/n\\mathbb{Z}$ are $\\overline{a} + \\overline{b} = \\overline{a + b}$ and $\\overline{a} \\cdot \\overline{b} = \\overline{a b}$.\n\n## Remarks\n\nThe operations are well defined: the result does not depend on the choice of $a$ and $b$ in their classes. This follows from [[compatibility with addition|00FWBN7F0Y]] and [[compatibility with multiplication|072D5G4SK6]].\nWith these operations, $\\mathbb{Z}/n\\mathbb{Z}$ is a commutative ring with $n$ elements, with zero $\\overline{0}$ and identity $\\overline{1}$.\nOther notations are $\\mathbb{Z}_n$ and $\\mathbb{Z}/(n)$. The Lean library Mathlib writes `ZMod n`, and it sets `ZMod 0` to be $\\mathbb{Z}$.\nThe ring is a field if and only if $n$ is prime. See [[integers modulo a prime form a field|0R8YXRC9AJ]].\n\n## Explanations\n\n### L1 human\n\nIn $\\mathbb{Z}/12\\mathbb{Z}$ you compute as on a clock: $\\overline{9} + \\overline{5} = \\overline{14} = \\overline{2}$.\nProducts work the same way: $\\overline{5} \\cdot \\overline{7} = \\overline{35} = \\overline{11}$.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "aliases": [
      "ring-of-integers-modulo-n",
      "residue-class-ring"
    ],
    "defines": "03VFZ2WETT",
    "kind": "definition",
    "msc": [
      "11A07"
    ],
    "name": "Integers modulo n",
    "sources": [
      {
        "locator": "Integers modulo m",
        "url": "https://en.wikipedia.org/wiki/Modular_arithmetic"
      }
    ],
    "tag": "01N3AYAA6N",
    "uses": [
      "0QRV8FPK5M",
      "00FWBN7F0Y",
      "072D5G4SK6"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/01N3AYAA6N/",
  "links": [
    {
      "field": "defines",
      "target": "03VFZ2WETT"
    },
    {
      "field": "uses",
      "target": "0QRV8FPK5M"
    },
    {
      "field": "uses",
      "target": "00FWBN7F0Y"
    },
    {
      "field": "uses",
      "target": "072D5G4SK6"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/01N3AYAA6N.md",
  "msc": [
    "11A07"
  ],
  "name": "Integers modulo n",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/01N/01N3AYAA6N.md",
  "status": null,
  "tag": "01N3AYAA6N",
  "uri": "m2://01N3AYAA6N",
  "url": "https://math2.tamnd.com/wiki/integers-modulo-n-definition/",
  "writing": {
    "tag": "01N3AYAA6N",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
