Steply

Calculate gcd(210, 154) 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(210, 154) by Euclid's algorithm.

gcd(210, 154)

1 Divide the bigger by the smaller

Divide the bigger number by the smaller: 154 goes into 210 once, and 56 is left over.

210 = 1 × 154 + 56

Here is the trick.

A number that goes into 210 and 154 also goes into 56, because 56 is 210 minus 1 × 154.

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

gcd(210, 154) = gcd(154, 56)

2 Keep going

Now the same with 154 and 56: the divisor moves left, the remainder becomes the new divisor.

154 = 2 × 56 + 42

56 = 1 × 42 + 14.

56 = 1 × 42 + 14

42 = 3 × 14, and the remainder is 0.

We stop.

42 = 3 × 14 + 0

3 The last remainder before 0

Careful!

0 only tells us to stop.

The answer is the last remainder before it: 14.

Careful: not gcd(210, 154) = 0 ✗

The last remainder that is not 0 is 14.

So gcd(210, 154) = 14.

gcd(210, 154) = 14

4 Check

14 goes into both: 210 ÷ 14 is 15, and 154 ÷ 14 is 11.

210 ÷ 14 = 15, 154 ÷ 14 = 11

And 15 and 11 have no common factor, so nothing bigger than 14 goes into both.

Right!

15 and 11: 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(210, 154) = 14

Your turn

Try this one yourself, then check:

gcd(210, 150)
Show the answer
gcd(210, 150) = 30

More from Euclid's algorithm

The whole lesson: Euclid's algorithm →