{
  "id": "bezouts-identity",
  "title": "Bézout's Identity",
  "lang": "en",
  "source_lang": "en",
  "summary": "Bézout's identity expresses the greatest common divisor of integers as an integer linear combination of them, connecting divisibility, Diophantine equations, and modular inverses.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Bézout identity",
    "Bézout's lemma",
    "Bézout's relation"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/bezouts-identity/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/bezouts-identity/",
      "json": "https://aiwiki.page/zh/bezouts-identity.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Bézout's identity states that, for any two integers \\(a\\) and \\(b\\) that are not both zero, there exist integers \\(x\\) and \\(y\\) such that\n\n\\[ax+by=\\gcd(a,b).\\]\n\nHere \\(\\gcd(a,b)\\) is the positive greatest common divisor of \\(a\\) and \\(b\\). The integers \\(x\\) and \\(y\\) are called Bézout coefficients. A foundational result in number theory, the identity connects divisibility with integer linear combinations and provides a constructive basis for solving linear Diophantine equations and finding modular inverses."
    },
    {
      "heading": "Statement and interpretation",
      "text": "Let \\(d=\\gcd(a,b)\\). Bézout's identity asserts that \\(d\\) can be obtained by adding an integer multiple of \\(a\\) to an integer multiple of \\(b\\). More strongly, the set of all such combinations is exactly the set of multiples of \\(d\\):\n\n\\[\\{ax+by:x,y\\in\\mathbb Z\\}=d\\mathbb Z.\\]\n\nThis statement has two parts:\n\n- Every integer combination \\(ax+by\\) is divisible by \\(d\\), because \\(d\\) divides both \\(a\\) and \\(b\\).\n- Every multiple of \\(d\\) is an integer combination of \\(a\\) and \\(b\\), because an identity \\(ax_0+by_0=d\\) can be multiplied by any integer.\n\nConsequently, \\(d\\) is the least positive integer combination of \\(a\\) and \\(b\\).\n\nFor example,\n\n\\[54(-1)+24(2)=-6,\\]\n\nwhereas\n\n\\[54(1)+24(-2)=6=\\gcd(54,24).\\]\n\nThus \\(1\\) and \\(-2\\) are Bézout coefficients for \\(54\\) and \\(24\\).\n\nThe coefficients need not be positive and are not unique. Indeed, restricting both coefficients to nonnegative integers generally makes the identity impossible.\n\nCoprime integers\n\nTwo integers are coprime if their greatest common divisor is \\(1\\). Bézout's identity gives the equivalence\n\n\\[\\gcd(a,b)=1 \\quad\\Longleftrightarrow\\quad ax+by=1 \\text{ for some }x,y\\in\\mathbb Z.\\]\n\nThe reverse implication follows immediately: any common divisor of \\(a\\) and \\(b\\) must divide \\(ax+by=1\\).\n\nIf exactly one of \\(a,b\\) is zero, the identity still holds. For example, if \\(a\\ne0\\) and \\(b=0\\), choose \\(x=a/|a|\\) and \\(y=0\\). Under the convention \\(\\gcd(0,0)=0\\), the equation also holds trivially for \\(a=b=0\\), although the least-positive-combination interpretation no longer applies."
    },
    {
      "heading": "Proof by the least positive combination",
      "text": "Consider\n\n\\[S=\\{ax+by:x,y\\in\\mathbb Z,\\ ax+by>0\\}.\\]\n\nBecause \\(a\\) and \\(b\\) are not both zero, \\(S\\) is nonempty. The well-ordering property of the positive integers ensures that it has a least element, say\n\n\\[m=ax_0+by_0.\\]\n\nDivide \\(a\\) by \\(m\\):\n\n\\[a=qm+r,\\qquad 0\\le r<m.\\]\n\nThen\n\n\\[r=a-qm =a(1-qx_0)+b(-qy_0).\\]\n\nIf \\(r>0\\), it would be an element of \\(S\\) smaller than \\(m\\), contradicting the choice of \\(m\\). Therefore \\(r=0\\), so \\(m\\mid a\\). The same argument shows that \\(m\\mid b\\).\n\nEvery common divisor of \\(a\\) and \\(b\\) divides \\(m=ax_0+by_0\\). Since \\(m\\) is itself a positive common divisor, it follows that\n\n\\[m=\\gcd(a,b).\\]\n\nThis proof establishes existence without first specifying an algorithm for finding the coefficients."
    },
    {
      "heading": "Computation with the extended Euclidean algorithm",
      "text": "The Euclidean algorithm computes the greatest common divisor by repeated division. Its extended form also computes Bézout coefficients, either by back-substitution or by tracking coefficients during the divisions.\n\nFor \\(a=240\\) and \\(b=46\\), the divisions are\n\n\\[\\begin{aligned} 240&=5\\cdot46+10,\\\\ 46&=4\\cdot10+6,\\\\ 10&=1\\cdot6+4,\\\\ 6&=1\\cdot4+2,\\\\ 4&=2\\cdot2. \\end{aligned}\\]\n\nThe last nonzero remainder is \\(2\\). Back-substitution gives\n\n\\[\\begin{aligned} 2&=6-4\\\\ &=2\\cdot6-10\\\\ &=2\\cdot46-9\\cdot10\\\\ &=47\\cdot46-9\\cdot240. \\end{aligned}\\]\n\nHence\n\n\\[240(-9)+46(47)=2.\\]\n\nA forward implementation maintains representations\n\n\\[r_i=s_i a+t_i b.\\]\n\nStarting from\n\n\\[(r_0,s_0,t_0)=(a,1,0),\\qquad (r_1,s_1,t_1)=(b,0,1),\\]\n\neach division step updates\n\n\\[\\begin{aligned} r_{i+1}&=r_{i-1}-q_i r_i,\\\\ s_{i+1}&=s_{i-1}-q_i s_i,\\\\ t_{i+1}&=t_{i-1}-q_i t_i. \\end{aligned}\\]\n\nThe coefficient pair attached to the last nonzero remainder gives the required identity, with a sign adjustment if the remainder is negative."
    },
    {
      "heading": "Nonuniqueness and all coefficient pairs",
      "text": "Suppose\n\n\\[ax_0+by_0=d,\\qquad d=\\gcd(a,b)>0.\\]\n\nThen all integer solutions of \\(ax+by=d\\) are\n\n\\[x=x_0+\\frac{b}{d}t,\\qquad y=y_0-\\frac{a}{d}t, \\qquad t\\in\\mathbb Z.\\]\n\nSubstitution shows that these pairs preserve the value of \\(ax+by\\). Conversely, subtracting two solutions gives\n\n\\[\\frac{a}{d}(x-x_0) =-\\frac{b}{d}(y-y_0).\\]\n\nBecause \\(a/d\\) and \\(b/d\\) are coprime, their divisibility properties force the stated parametrization.\n\nFor \\(240x+46y=2\\), this becomes\n\n\\[x=-9+23t,\\qquad y=47-120t.\\]\n\nThus Bézout coefficients are not intrinsically a single distinguished pair; different computational conventions can return different valid pairs."
    },
    {
      "heading": "Applications",
      "text": "Linear Diophantine equations\n\nA linear Diophantine equation\n\n\\[ax+by=c\\]\n\nhas an integer solution if and only if\n\n\\[\\gcd(a,b)\\mid c.\\]\n\nNecessity follows because every common divisor of \\(a,b\\) divides the left-hand side. For sufficiency, write \\(c=kd\\) and multiply a Bézout identity by \\(k\\):\n\n\\[a(kx_0)+b(ky_0)=c.\\]\n\nAll solutions are therefore\n\n\\[x=kx_0+\\frac{b}{d}t,\\qquad y=ky_0-\\frac{a}{d}t, \\qquad t\\in\\mathbb Z.\\]\n\nModular inverses\n\nIn modular arithmetic, a multiplicative inverse of \\(a\\) modulo an integer \\(m\\ge2\\) is an integer \\(u\\) satisfying\n\n\\[au\\equiv1\\pmod m.\\]\n\nSuch an inverse exists exactly when \\(\\gcd(a,m)=1\\).\n\nA Bézout identity\n\n\\[au+mv=1\\]\n\nimmediately supplies the inverse \\(u\\) modulo \\(m\\). For example,\n\n\\[3(5)+7(-2)=1\\]\n\nshows that \\(5\\) is the inverse of \\(3\\) modulo \\(7\\).\n\nCoprime cancellation and prime divisibility\n\nIf \\(\\gcd(a,b)=1\\) and \\(a\\mid bc\\), then \\(a\\mid c\\). To see this, multiply \\(ax+by=1\\) by \\(c\\):\n\n\\[acx+bcy=c.\\]\n\nBoth terms on the left are divisible by \\(a\\).\n\nFor a prime number \\(p\\), this yields Euclid's lemma:\n\n\\[p\\mid ab\\quad\\Longrightarrow\\quad p\\mid a\\ \\text{or}\\ p\\mid b.\\]\n\nThis divisibility principle is central to the uniqueness assertion in the fundamental theorem of arithmetic.\n\nChinese remainder theorem\n\nBézout coefficients provide an explicit construction for the Chinese remainder theorem. If \\(\\gcd(m,n)=1\\) and\n\n\\[um+vn=1,\\]\n\nthen the simultaneous congruences\n\n\\[z\\equiv r\\pmod m,\\qquad z\\equiv s\\pmod n\\]\n\nare satisfied by\n\n\\[z=rvn+sum.\\]\n\nThe solution is unique modulo \\(mn\\)."
    },
    {
      "heading": "Generalizations",
      "text": "More than two integers\n\nFor integers \\(a_1,\\ldots,a_n\\), not all zero, there exist integers \\(x_1,\\ldots,x_n\\) such that\n\n\\[a_1x_1+\\cdots+a_nx_n=\\gcd(a_1,\\ldots,a_n).\\]\n\nThis follows by repeatedly applying the two-integer identity, using\n\n\\[\\gcd(a_1,a_2,a_3)=\\gcd(\\gcd(a_1,a_2),a_3).\\]\n\nIn particular, the integers collectively have greatest common divisor \\(1\\) exactly when an integer combination of them equals \\(1\\). Collective coprimality does not require pairwise coprimality: \\(6,10,15\\) have greatest common divisor \\(1\\), and\n\n\\[6+10-15=1,\\]\n\nalthough every pair has a common divisor greater than \\(1\\).\n\nPolynomials over a field\n\nIf \\(f,g\\) are polynomials in one variable over a field \\(F\\), and are not both zero, then there exist \\(u,v\\in F[x]\\) such that\n\n\\[uf+vg=\\gcd(f,g).\\]\n\nThe greatest common divisor is conventionally normalized to be monic. Polynomial division and the extended Euclidean algorithm establish the identity just as in the integer case.\n\nFor example, in \\(\\mathbb Q[x]\\),\n\n\\[(x^2+1)-x(x)=1,\\]\n\nso \\(x^2+1\\) and \\(x\\) are relatively prime.\n\nIdeals and Bézout domains\n\nIn the language of abstract algebra, the integer identity says\n\n\\[(a,b)=(d),\\]\n\nwhere \\((a,b)\\) is the ideal generated by \\(a,b\\), and \\((d)\\) consists of the multiples of their greatest common divisor.\n\nThe same property holds in every principal ideal domain. More generally, a Bézout domain is an integral domain in which every finitely generated ideal is principal. Every principal ideal domain is a Bézout domain, but the converse need not hold.\n\nThe existence of greatest common divisors alone does not guarantee Bézout's identity. In the polynomial ring \\(\\mathbb Q[s,t]\\), the polynomials \\(s\\) and \\(t\\) have greatest common divisor \\(1\\), but no polynomials \\(u,v\\) satisfy\n\n\\[su+tv=1.\\]\n\nEvaluating at \\(s=t=0\\) would give \\(0=1\\). This distinguishes the one-variable polynomial setting over a field from the multivariable setting."
    },
    {
      "heading": "Naming and historical context",
      "text": "The identity is named after the French mathematician Étienne Bézout, whose work included polynomial forms of the result. Its integer form predates him and is closely connected with the ancient Euclidean algorithm. It is distinct from Bézout's theorem in algebraic geometry, which concerns the intersections of algebraic curves."
    }
  ],
  "links": [
    "integer",
    "greatest-common-divisor",
    "number-theory",
    "linear-combination",
    "coprime-integers",
    "mathematical-proof",
    "euclidean-algorithm",
    "diophantine-equation",
    "modular-arithmetic",
    "modular-multiplicative-inverse",
    "prime-number",
    "fundamental-theorem-of-arithmetic",
    "chinese-remainder-theorem",
    "polynomial",
    "field-mathematics",
    "abstract-algebra",
    "ideal-ring-theory",
    "principal-ideal-domain",
    "ring-mathematics",
    "algebraic-geometry"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}