Let a and b be any integer and g be its greatest common divisor of a and b. Then, there exists integers x and y such that ax + by = g …(1).
The pair (x, y) satisfying the above equation is not unique. However, all possible solutions can be calculated.
We can find x’ and y’ which satisfies (1) using Euclidean algorithms . All possible solutions of (1) is given by,
where k is any integer.
It is easy to see why this holds. Just plug in the solutions to (1) to have an intuition.
Also, it is important to see that for general equation of the form,
u=gcd(a, b) is the smallest positive integer for which ax+by=u has a solution with integral values of x and y.
Statement: If gcd(a, c)=1 and gcd(b, c)=1, then gcd(ab, c)=1.
Above can be easily proved using Bezout’s Identity.
ax+cy=1 and bu+cv=1
Multiply the above two equations,
The above implies,
1 is the only integer dividing L.H.S and R.H.S .
Hence, gcd(ab, c) = 1.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Introduction of Statistics and its Types
- Shearing in 2D Graphics
- Trigonometric Functions in Latex
- Relational Operators in LaTeX
- Logic Notations in LaTeX
- Brackets in Latex
- Set Notations in LaTeX
- Maths Commands in LaTeX
- Geometry Notations in LaTeX
- Volume of solid of revolution
- Gamma Function
- Beta Function
- Difference between Spline, B-Spline and Bezier Curves
- Indeterminate Forms
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.