How to use this tool
- Enter integer a, integer b.
- Select Calculate to view the result.
- Check the method and assumptions below before using the result.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| Integer a | Enter text using the format shown in the sample. | 240 |
| Integer b | Enter text using the format shown in the sample. | 46 |
Result for these sample inputs
2
- Coefficient x
- -9
- Coefficient y
- 47
- Verification
- 240 × (-9) + 46 × (47) = 2
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
Track the coefficients of each remainder in the Euclidean algorithm until the remainder becomes zero. The final nonzero remainder is the greatest common divisor.
Using integer a = 240, integer b = 46, the result is 2. Change these example inputs to match your task; use the method above to check each step.
What to keep in mind
Returns one pair of integer coefficients; infinitely many equivalent pairs may exist. Finite-precision arithmetic is used. Check the domain and the stated convention before using an approximation.
Common questions
Are Bézout coefficients unique?
Generally no. Adding b/g to x and subtracting a/g from y preserves the identity when g is the greatest common divisor.
How can I check the result?
Track the coefficients of each remainder in the Euclidean algorithm until the remainder becomes zero. The final nonzero remainder is the greatest common divisor. The worked example uses editable inputs. Calculations run on your device; no external API or account is required.
Methodology maintained by ClarityKit. How these tools are built and checked.