Finding the Greatest Common Divisor of Two Numbers by Factoring

​
number 1
200
number 2
20
2
×
2
×
2
×
5
×
5
2
×
2
×
5
the common factors of200and20are
2
,
2
,
5
gcd(200, 20) =
2
×
2
×
5
=20
You can find the greatest common divisor (GCD) of two numbers by multiplying together all the prime factors they have in common.

Details

A much more efficient way of computing GCDs has been known for the past 2300 years. Named the Euclidean Algorithm, it is one of the oldest mathematical procedures known, appearing in Euclid's Elements around 300 BC.

External Links

Divisor (Wolfram MathWorld)
Greatest Common Divisor (Wolfram MathWorld)
Euclidean Algorithm (Wolfram MathWorld)

Permanent Citation

Jesse Nochella
​
​"Finding the Greatest Common Divisor of Two Numbers by Factoring"​
​http://demonstrations.wolfram.com/FindingTheGreatestCommonDivisorOfTwoNumbersByFactoring/​
​Wolfram Demonstrations Project​
​Published: March 7, 2011