{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "0S7495H4HM"
    }
  ],
  "body": "\n## Statement\n\nLet $n \\geq 1$ and $a$ be integers.\nThe residue class $[a]$ is a unit of the ring $\\mathbb{Z}/n\\mathbb{Z}$ if and only if $\\gcd(a, n) = 1$.\n\n## Remarks\n\nIf $\\gcd(a, n) = 1$, then Bézout's lemma gives integers $x$ and $y$ with $a x + n y = 1$. So $[a][x] = [1]$.\nIf $[a][x] = [1]$, then $a x - 1$ is a multiple of $n$, so each common divisor of $a$ and $n$ divides $1$.\nThe condition does not depend on the representative, because $a \\equiv b \\pmod{n}$ implies $\\gcd(a, n) = \\gcd(b, n)$.\nFor $n = 12$, the units are $[1]$, $[5]$, $[7]$ and $[11]$.\n\n## Explanations\n\n### L1 human\n\nA residue has a multiplicative inverse modulo $n$ exactly when it has no common factor with $n$.\nBézout's lemma gives the inverse.\nSo the [[group of units of Z/nZ|0F8X8ZRQ53]] is the set of residues coprime to $n$.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "kind": "statement",
    "msc": [
      "11A07",
      "20K01"
    ],
    "name": "Units of Z/nZ are the residues coprime to n",
    "role": "proposition",
    "sources": [
      {
        "locator": "Group axioms",
        "url": "https://en.wikipedia.org/wiki/Multiplicative_group_of_integers_modulo_n"
      }
    ],
    "tag": "0GXNHEHQNA",
    "uses": [
      "08FHNR8Z5D",
      "0F8X8ZRQ53"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0GXNHEHQNA/",
  "links": [
    {
      "field": "uses",
      "target": "08FHNR8Z5D"
    },
    {
      "field": "uses",
      "target": "0F8X8ZRQ53"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0GXNHEHQNA.md",
  "msc": [
    "11A07",
    "20K01"
  ],
  "name": "Units of Z/nZ are the residues coprime to n",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0GX/0GXNHEHQNA.md",
  "status": null,
  "tag": "0GXNHEHQNA",
  "uri": "m2://0GXNHEHQNA",
  "url": "https://math2.tamnd.com/wiki/units-of-z-nz-are-the-residues-coprime-to-n/",
  "writing": {
    "tag": "0GXNHEHQNA",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
