If a and b are any integers, not both zero, then gcd(a,b) is the smallest positive element of the set {ax + by: x,y Z} of linear combinations of a and b.
Example: gcd(9,15) = 3 9x + 15y = 3 x = 2, y = -1