{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "0VY3WPP9Y3"
    }
  ],
  "body": "\n## Summary\n\nLet $R$ be a [[Euclidean domain|0GJ2HRG95T]] with Euclidean function $\\delta$ and let $a, b \\in R$.\nThe Euclidean algorithm sets $r_0 = a$ and $r_1 = b$. While $r_k \\neq 0$, it divides $r_{k-1}$ by $r_k$ and lets $r_{k+1}$ be the remainder.\nThe values $\\delta(r_k)$ decrease strictly, so the algorithm stops with some $r_{n+1} = 0$.\nThe last nonzero remainder $r_n$ is a [[greatest common divisor|0F7KNJ1ZYN]] of $a$ and $b$, if $b \\neq 0$.\n\n## Remarks\n\nThe algorithm works because the common divisors of $r_{k-1}$ and $r_k$ are the common divisors of $r_k$ and $r_{k+1}$.\nIn $\\mathbb{Z}$: $252 = 1 \\cdot 198 + 54$, $198 = 3 \\cdot 54 + 36$, $54 = 1 \\cdot 36 + 18$, $36 = 2 \\cdot 18$. So $\\gcd(252, 198) = 18$.\nThe extended algorithm also gives the coefficients of [[Bézout's identity|0VY3WPP9Y3]].\n\n## Explanations\n\n### L1 human\n\nTo find the gcd of two numbers, replace the larger one by its remainder modulo the smaller one, and repeat.\nWhen the remainder is zero, the last divisor is the gcd.\nThe same steps work in every Euclidean domain, for example for polynomials over a field.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "kind": "concept",
    "msc": [
      "13F07"
    ],
    "name": "Euclidean algorithm in a Euclidean domain",
    "sources": [
      {
        "locator": "Euclidean domains",
        "url": "https://en.wikipedia.org/wiki/Euclidean_algorithm"
      }
    ],
    "tag": "023VY493K0",
    "uses": [
      "0GJ2HRG95T",
      "0F7KNJ1ZYN"
    ]
  },
  "kind": "concept",
  "link": "https://math2.tamnd.com/node/023VY493K0/",
  "links": [
    {
      "field": "uses",
      "target": "0GJ2HRG95T"
    },
    {
      "field": "uses",
      "target": "0F7KNJ1ZYN"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/023VY493K0.md",
  "msc": [
    "13F07"
  ],
  "name": "Euclidean algorithm in a Euclidean domain",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/023/023VY493K0.md",
  "status": null,
  "tag": "023VY493K0",
  "uri": "m2://023VY493K0",
  "url": "https://math2.tamnd.com/wiki/euclidean-algorithm-in-a-euclidean-domain/",
  "writing": {
    "tag": "023VY493K0",
    "kind": "concept",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
