Understanding the Identity
The expression am + bn = gcd(m, n) is called Bezout's identity. It says that the greatest common divisor of two integers can be written as a linear combination of those integers. The numbers a and b are Bezout coefficients. They are not usually unique. Once one pair is known, infinitely many pairs can be created.
Why This Calculator Helps
Manual Euclidean work is simple for small values, yet it can become long. This calculator uses the extended Euclidean algorithm. It finds the gcd first. Then it traces backward through the same divisions to find valid coefficients. The tool also checks the final identity. That check is useful when the input numbers are negative, large, or mixed with zero.
Advanced Uses
Bezout coefficients are important in number theory. They support modular inverses, congruence solving, Diophantine equations, and cryptography lessons. When gcd(m, n) equals one, the coefficient of m gives the inverse of m modulo n. The coefficient of n gives the inverse of n modulo m. This calculator reports those inverses when they exist.
Target Values
The normal identity equals the gcd. Sometimes you may want am + bn to equal another target value. An integer solution exists only when the target is divisible by the gcd. The calculator can scale the base coefficients when that condition is true. It also lets you choose a parameter k. That parameter creates another valid pair from the infinite solution family.
Reading the Results
The result card shows the gcd, one coefficient pair, the selected k pair, the identity check, the lcm, and optional inverses. The Euclidean table lists quotient and remainder steps. These rows explain how the gcd was produced. The solution family shows how every integer coefficient pair is related to the first pair.
Best Practice
Use whole numbers for m and n. Negative values are allowed. Avoid entering both values as zero for meaningful number theory work. After calculating, download the CSV for spreadsheet records. Use the PDF button for a printable report. The example table gives starter pairs for testing. Compare those examples with your own inputs to build confidence. For teaching, copy the step rows into notes and explain each quotient slowly before checking answers carefully.