d' = gcd(b, a mod b)

= bx' + (a mod b)y' ; Euclid's Theorem

= d = gcd(a, b) ; Euclid's Algorithm

= bx' + (a mod b)y' ; Euclid's Theorem

= d = gcd(a, b) ; Euclid's Algorithm

d = bx' + (a -
b) y'
; Division Theorem

= ay' + b(x' - y') ; Rearrange terms

d = d' = ax + by

x = y'

y = x' - y'

= ay' + b(x' - y') ; Rearrange terms

d = d' = ax + by

x = y'

y = x' - y'