GCD and LCM Example

The greatest common divisor (GCD) is the largest positive integer that divides both numbers. The least common multiple (LCM) is the smallest positive number that is a multiple of both. Find both for 84 and 30, then verify the results.

Find the GCD and LCM of 84 and 30.

Use the Euclidean algorithm to find the GCD. Then use prime factorization to build the LCM from the highest powers of all primes present.

gcd⁡(84,30),lcm⁡(84,30)\gcd(84,30),\qquad\operatorname{lcm}(84,30)
Key facts used in this example
Prime factorization of 842² × 3 × 7
Prime factorization of 302 × 3 × 5
GCD6
LCM420

Step-by-step solution

  1. 1

    Apply the Euclidean algorithm

    Divide 84 by 30 and keep the remainder. Repeat using the previous divisor and remainder until the remainder is zero.

    84=2⋅30+24,30=1⋅24+6,24=4⋅6+084=2\cdot30+24,\quad30=1\cdot24+6,\quad24=4\cdot6+0
  2. 2

    Read the GCD

    The last nonzero remainder is 6, so 6 is the greatest common divisor of 84 and 30.

    gcd⁡(84,30)=6\gcd(84,30)=6
  3. 3

    Compare prime factorizations

    For the LCM, take the greatest exponent of each prime appearing in either number: 2², 3, 5, and 7.

    84=22⋅3⋅7,30=2⋅3⋅584=2^2\cdot3\cdot7,\qquad30=2\cdot3\cdot5
  4. 4

    Multiply the selected prime powers

    Multiplying the selected powers gives the least positive common multiple.

    lcm⁡(84,30)=22⋅3⋅5⋅7=420\operatorname{lcm}(84,30)=2^2\cdot3\cdot5\cdot7=420

ANSWER

GCD = 6; LCM = 420

The numbers share factors up to 6, and their smallest positive common multiple is 420.

gcd⁡(84,30)=6,lcm⁡(84,30)=420\gcd(84,30)=6,\qquad\operatorname{lcm}(84,30)=420

Verify both results

The GCD divides each input, and the LCM is divisible by each input. The product identity gives an additional check.

84÷6=14,30÷6=5,420÷84=5,420÷30=14,6⋅420=84⋅3084\div6=14,\quad30\div6=5,\quad420\div84=5,\quad420\div30=14,\quad6\cdot420=84\cdot30