Steply

Calculate gcd(100, 75) by Euclid's algorithm

Step by step, with the reason for every step · Euclid's algorithm · Discrete Math

Step by step

The question

Question: find gcd(100, 75) by Euclid's algorithm.

gcd(100, 75)

1 Divide the bigger by the smaller

Divide the bigger number by the smaller: 75 goes into 100 once, and 25 is left over.

100 = 1 × 75 + 25

Here is the trick.

A number that goes into 100 and 75 also goes into 25, because 25 is 100 minus 1 × 75.

So the gcd does not change, and the numbers get smaller.

gcd(100, 75) = gcd(75, 25)

2 Keep going

Now the same with 75 and 25: the divisor moves left, the remainder becomes the new divisor.

75 = 3 × 25 + 0

3 The last remainder before 0

Careful!

0 only tells us to stop.

The answer is the last remainder before it: 25.

Careful: not gcd(100, 75) = 0 ✗

The last remainder that is not 0 is 25.

So gcd(100, 75) = 25.

gcd(100, 75) = 25

4 Check

25 goes into both: 100 ÷ 25 is 4, and 75 ÷ 25 is 3.

100 ÷ 25 = 4, 75 ÷ 25 = 3

And 4 and 3 have no common factor, so nothing bigger than 25 goes into both.

Right!

4 and 3: no common factor

Let's look back.

First: divide the bigger by the smaller.

Then: keep going.

Then: the last remainder before 0.

Last: check.

Answer
gcd(100, 75) = 25

Your turn

Try this one yourself, then check:

gcd(102, 74)
Show the answer
gcd(102, 74) = 2

More from Euclid's algorithm

The whole lesson: Euclid's algorithm →