Working backwards
Theorem 22
Bézout
If gcd(a,b)=d, then a⋅x+b⋅y=d for some integers x, y.
Run Euclid’s algorithm, then substitute the remainders back from the bottom up.
- 0112=2⋅5+2, so 2=12−2⋅5.Step 1
- 025=2⋅2+1, so 1=5−2⋅2.Step 2
- 03Substitute: 1=5−2⋅(12−2⋅5)=5⋅5−2⋅12.Back-substitute
- 04So gcd(12,5)=1=12⋅(−2)+5⋅5.Conclusion