Meaning and direct answer
The Euclidean algorithm finds the greatest common divisor through repeated division with remainder. For positive integers it also gives the least common multiple and, by back substitution, integer coefficients representing the gcd.[1]
The Euclidean algorithm finds the greatest common divisor through repeated division with remainder. For positive integers it also gives the least common multiple and, by back substitution, integer coefficients representing the gcd.
Assumptions and limits
a and b are integers, not both zero. The lcm formula here uses positive a and b. A modular inverse of a modulo m>1 exists exactly when gcd(a,m)=1. Modular equations are not ordinary division.[1]
Why the relation holds
From a=qb+r, every common divisor of a,b divides r=a−qb. Conversely every common divisor of b,r divides a. The gcd is unchanged at each step, and decreasing nonnegative remainders reach zero. The final nonzero remainder is the gcd. Back substitution writes it as ua+vb.[1]
Two fully worked examples
Gcd and common denominator
- Given
- a=84, b=30.
- Find
- Answer the stated question using valid steps and verify the result.
From a=qb+r, every common divisor of a,b divides r=a−qb. Conversely every common divisor of b,r divides a. The gcd is unchanged at each step, and decreasing nonnegative remainders reach zero. The final nonzero remainder is the gcd. Back substitution writes it as ua+vb.
Substitute the stated data or evaluate the defining relation.
Result: gcd=6 and lcm=420.
Check: 84·5=420 and 30·14=420; a common denominator can use these multiples.
A modular inverse
- Given
- Find the inverse of 7 modulo 26.
- Find
- Answer the stated question using valid steps and verify the result.
From a=qb+r, every common divisor of a,b divides r=a−qb. Conversely every common divisor of b,r divides a. The gcd is unchanged at each step, and decreasing nonnegative remainders reach zero. The final nonzero remainder is the gcd. Back substitution writes it as ua+vb.
Substitute the stated data or evaluate the defining relation.
Result: −11≡15 modulo 26 is the inverse.
Check: 7·15=105=4·26+1.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Foundation
Find gcd(48,18).
Show hint
a and b are integers, not both zero. The lcm formula here uses positive a and b. A modular inverse of a modulo m>1 exists exactly when gcd(a,m)=1. Modular equations are not ordinary division.
Learning goal: Find gcd(48,18).
Show solution and calculation
48=2·18+12, 18=12+6, 12=2·6, so gcd=6.
Rearrange · Foundation
Find lcm for a=12,b=18.
Show hint
a and b are integers, not both zero. The lcm formula here uses positive a and b. A modular inverse of a modulo m>1 exists exactly when gcd(a,m)=1. Modular equations are not ordinary division.
Learning goal: Find lcm for a=12,b=18.
Show solution and calculation
gcd=6, so lcm=12·18/6=36.
Interpret · Application
Does 6 have an inverse modulo 15?
Show hint
a and b are integers, not both zero. The lcm formula here uses positive a and b. A modular inverse of a modulo m>1 exists exactly when gcd(a,m)=1. Modular equations are not ordinary division.
Learning goal: Does 6 have an inverse modulo 15?
Show solution and calculation
No, gcd(6,15)=3≠1.
Error analysis · Application
Why is the last remainder 0 not the gcd?
Show hint
a and b are integers, not both zero. The lcm formula here uses positive a and b. A modular inverse of a modulo m>1 exists exactly when gcd(a,m)=1. Modular equations are not ordinary division.
Learning goal: Why is the last remainder 0 not the gcd?
Show solution and calculation
Use the last nonzero remainder, which divides the preceding one.
Transfer · Application
Add 1/12+1/18 using the least common denominator.
Show hint
a and b are integers, not both zero. The lcm formula here uses positive a and b. A modular inverse of a modulo m>1 exists exactly when gcd(a,m)=1. Modular equations are not ordinary division.
Learning goal: Add 1/12+1/18 using the least common denominator.
Show solution and calculation
lcm=36, giving 3/36+2/36=5/36.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Related next learning steps
Sources for this explanation
Quanta · Updated November 6, 2026
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Authored a German-English topic with assumptions, reasoning, original examples and five solved exercises.
Cite this reference page
Quanta. Euclidean algorithm and modular inverse. Updated November 6, 2026. https://quanta-study.de/en/formula-sheet/euklidischer-algorithmus-modulares-inverses
When citing a specific scientific statement, also cite the specialist source linked to that statement.