{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "06RJWZCG95"
    }
  ],
  "body": "\n## Statement\n\nLet $n$ be a positive integer and let $a$ be an integer.\nThen $a$ has a [[modular multiplicative inverse|00GXTQMY8Z]] modulo $n$ if and only if $a$ and $n$ are [[coprime|0GFKP8F8AG]].\n\n## Remarks\n\nIf $\\gcd(a, n) = 1$, [[Bézout's identity|0DQVHMYAGA]] gives integers $x$ and $y$ with $a x + n y = 1$. Then $a x \\equiv 1 \\pmod n$.\nConversely, if $a x \\equiv 1 \\pmod n$, then $a x + n y = 1$ for some integer $y$, so each common divisor of $a$ and $n$ divides $1$.\nThe [[extended Euclidean algorithm|0964YQFSA8]] computes the inverse.\nFor example, $4$ has no inverse modulo $6$, because $\\gcd(4, 6) = 2$.\n\n## Explanations\n\n### L1 human\n\nYou can \"divide by $a$\" modulo $n$ exactly when $a$ and $n$ have no common factor.\nModulo $10$, the numbers $1, 3, 7, 9$ have inverses, since $1 \\cdot 1$, $3 \\cdot 7$ and $9 \\cdot 9$ all end with the digit $1$.\nThe numbers $2, 4, 5, 6, 8$ have no inverse modulo $10$.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "kind": "statement",
    "msc": [
      "11A07"
    ],
    "name": "Existence of inverses modulo n",
    "role": "theorem",
    "sources": [
      {
        "locator": "Integers modulo m",
        "url": "https://en.wikipedia.org/wiki/Modular_multiplicative_inverse"
      }
    ],
    "tag": "0M67FWZWPQ",
    "uses": [
      "00GXTQMY8Z",
      "0GFKP8F8AG",
      "0DQVHMYAGA"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0M67FWZWPQ/",
  "links": [
    {
      "field": "uses",
      "target": "00GXTQMY8Z"
    },
    {
      "field": "uses",
      "target": "0GFKP8F8AG"
    },
    {
      "field": "uses",
      "target": "0DQVHMYAGA"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0M67FWZWPQ.md",
  "msc": [
    "11A07"
  ],
  "name": "Existence of inverses modulo n",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0M6/0M67FWZWPQ.md",
  "status": null,
  "tag": "0M67FWZWPQ",
  "uri": "m2://0M67FWZWPQ",
  "url": "https://math2.tamnd.com/wiki/existence-of-inverses-modulo-n/",
  "writing": {
    "tag": "0M67FWZWPQ",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
