{
  "aliases": [
    "gcd",
    "greatest-common-factor",
    "highest-common-factor"
  ],
  "backlinks": [
    {
      "field": "uses",
      "target": "01G1WY1GVX"
    },
    {
      "field": "uses",
      "target": "04SJTX9P4N"
    },
    {
      "field": "uses",
      "target": "09RDZZGJZ9"
    },
    {
      "field": "uses",
      "target": "0D3PFXEAKF"
    },
    {
      "field": "uses",
      "target": "0DQVHMYAGA"
    },
    {
      "field": "uses",
      "target": "0GFKP8F8AG"
    },
    {
      "field": "uses",
      "target": "0PN4QJE969"
    },
    {
      "field": "uses",
      "target": "0TDY6JZHKS"
    }
  ],
  "body": "\n## Definition\n\nLet $a$ and $b$ be integers that are not both $0$.\nA common divisor of $a$ and $b$ is an integer $d$ such that $d \\mid a$ and $d \\mid b$.\nThe greatest common divisor $\\gcd(a, b)$ is the largest common divisor of $a$ and $b$.\nBy convention, $\\gcd(0, 0) = 0$.\n\n## Remarks\n\nThe number $\\gcd(a, b)$ is positive when $a$ and $b$ are not both $0$, because $1$ is a common divisor.\nAn equivalent definition: $\\gcd(a, b)$ is the unique nonnegative common divisor of $a$ and $b$ that each common divisor [[divides|096PW7Q014]]. This form also gives $\\gcd(0, 0) = 0$.\nFor all integers $a$, $\\gcd(a, 0) = |a|$.\nThe [[Euclidean algorithm|0TRNT4X7J0]] computes $\\gcd(a, b)$.\n\n## Explanations\n\n### L1 human\n\nList the positive divisors of each number, and take the largest number that is in both lists.\nThe divisors of $12$ are $1, 2, 3, 4, 6, 12$, and the divisors of $18$ are $1, 2, 3, 6, 9, 18$.\nThus $\\gcd(12, 18) = 6$.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "aliases": [
      "gcd",
      "greatest-common-factor",
      "highest-common-factor"
    ],
    "defines": "0C8WYW4KYQ",
    "kind": "definition",
    "msc": [
      "11A05"
    ],
    "name": "Greatest common divisor",
    "sources": [
      {
        "locator": "Definition",
        "url": "https://en.wikipedia.org/wiki/Greatest_common_divisor"
      }
    ],
    "tag": "02WF878BH1",
    "uses": [
      "096PW7Q014"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/02WF878BH1/",
  "links": [
    {
      "field": "defines",
      "target": "0C8WYW4KYQ"
    },
    {
      "field": "uses",
      "target": "096PW7Q014"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/02WF878BH1.md",
  "msc": [
    "11A05"
  ],
  "name": "Greatest common divisor",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/02W/02WF878BH1.md",
  "status": null,
  "tag": "02WF878BH1",
  "uri": "m2://02WF878BH1",
  "url": "https://math2.tamnd.com/wiki/greatest-common-divisor-definition/",
  "writing": {
    "tag": "02WF878BH1",
    "kind": "definition",
    "level": "W1",
    "next": [
      {
        "what": "edge instance_of in",
        "note": "one example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge not_instance_of in",
        "note": "one non-example that fails one clause",
        "have": 0,
        "want": 1
      }
    ]
  }
}
