GCFs and LCMs

by Shelley Walsh ©2000

GCF stands for greatest common factor and LCM stands for least common multiple. In order to understand either of these we have to understand the individual words greatest, least, common, factor, and multiple. You probably sort of understand the first three of these, but what about factor and multiple?

Factors

A factor of a number is a number that divides evenly into the number.

The factors of 2 are 1 and 2. The factors of 5 and 5 and 1. 2 and 5 aren't very interesting from the standpoint of factors, because they are primes. (See How to Prime Factor a Number for more about primes.) In terms of factors we can say that a number larger than 1 is a prime if its only factors are 1 and itself. Composites are more interesting with respect for factors. The factors of 12 are 1, 2, 3, 4, 6, and 12. The factors of 250 are 1, 2, 5, 10, 25, 50, 125, and 250.

Multiples

A multiple of a number is a number that you can get by multiplying it by something. 

So, the multiples of 2 are 2,4,6,8,10,12,..., and the multiples of 5 are 5,10,15,20, 25,.... The multiples are the numbers that you get when you count by the number.

Factors and Multiples

Factors and multiples are sort of opposites. If one number is a factor of another number, then the other number is a multiple of it and vice versa.
 
'A is a factor of B' means the same thing as 'B is a multiple of A'.

For example, 2 is a factor of 12 and 12 is a multiple of 2. 125 is a multiple of 5 and 5 is a factor of 125. 9 is a factor of 900 and 900 is a multiple of 9. 70 is a multiple of both 7 and 10, and both 7 and 10 are factors of 70.

It is important to not get confused which one is which. The multiples are the big ones, and the factors are the little ones. Perhaps it will help if you remember that the multiple is the result of a multiplication and the factor isn't. Or associate multiple with multitudes so that it will just sound big, so that you can remember that it is the big one, and the factor is the other one, so it must be the little one.

Common

Common in this setting means something that two or more numbers share. For example a common multiple of 4 and 6 would be a number that is both a multiple of 4 and a multiple of 6. A common factor of 4 and 6 would be a number that is a factor of both 4 and 6. 12 is a common multiple of 4 and 6, because 12 is the result of multiplying 3 times 4 and also the result of multiplying 2 times 6. 2 is a common factor of 4 and 6, because 2 divides evenly into 4, and it also divides evenly into 6, 2x2=4 and 2x3=6. It is easy to find small common factors and big common multiples, because 1 is always a common factor of any collection of numbers and if you multiply all of the numbers together you will always get a common multiple. But small common multiples and large common factors are harder to find.

Relative Primes

Two numbers are called relative prime if their only common factor is 1.

If the numbers themselves are prime they will always be relative prime, so 3 and 5 are relative prime, but they don't have to be prime to be relative prime. For example, 8 and 27 are relative prime, but definitely not primes themselves. Even a number with lots of factors like 60 can be relatively prime with respect to another number, for example 60 and 121 are relatively prime. Perhaps you can think of some other interesting examples of relative primes that are not primes.

Finding GCFs and LCMs by Guessing

Now that we know what factors and multiples and common factors and common multiples are, we are ready to understand what LCMs and GCFs are. They mean exactly what their words say. The LCM of a collection of numbers is the least or smallest number that is a common multiple of them. So if we took all of the common multiples of the numbers and lined them up and asked which one was the smallest, then that would be the least common multiple. Similarly the GCF of a collection of numbers is the greatest or largest number that is a common factor of the numbers. If we took all of the common factors of those numbers and lined them up and then took that largest one, that would be the greatest common factor. As I mentioned earlier, it is easy to find large common multiples and small common factors, so this is the more interesting task, finding a common factor that isn't any smaller than necessary and a common multiple that isn't any larger than necessary. For many collections of numbers, particularly when they aren't too large, you can do this by guessing and playing around with the numbers.

To find GCFs this way, if you don't see a large common factor right away, try looking for primes that divide the numbers evenly, and then if you find more than one of them try multiplying them together and see if that is still a common factor. For example if you have 12 and 18, you could see that both 2 and 3 are common factors, so maybe 6 will also be a common factor, and it is. Is there a larger one? Not too likely because 6 is a pretty large factor just for 12 alone, and in fact the only larger factor that 12 alone has is 12, which is clearly not a factor of 18.

For LCMs there are a couple of techniques you can use. You can always find a common multiple by multiplying the numbers, so for example 15 is a common multiple of 3 and 5, because it is 5x3 and 3x5. 12x18=216, so 216 is a common multiple of 12 and 18, since it is 18x12 and 12x18. If you are dealing with only two numbers, this will be the smallest one, so the LCM, whenever the two numbers are relatively prime, but if the numbers have a common factor larger than 1, there should be a smaller number that will work. 15 is the LCM of 3 and 5, but 216 is not the LCM of 12 and 18, but at least you know from this that the LCM for them can be no larger than 216.

On the other end of the scale, if one of your numbers is a multiple of the other, then it is easy to find the LCM, it is just the bigger number. So the LCM of 8 and 4 is 8, and the LCM of 5 and 15 is 15. For numbers like 12 and 18, you might just think of it without even knowing how you do it. Often times when I ask someone for a common multiple of two numbers without even specifying that I want the LCM, they tend to instinctively give me the LCM, so if you can do it that way, that's fine. Think of a common multiple of 12 and 18, and perhaps 36 just comes to mind, and then you make sure you can't think of a smaller one, and since 18 is the only smaller multiple of just 18, and it is not a multiple of 12, it must be the answer.

But if that doesn't work for you, there is a more systematic way you can go about the task in a problem like this. What you can do is you can take the largest of the numbers, and start listing successive multiples of it, by multiplying it by 2, 3, 4, etc., until you come up with one that is a multiple of the other numbers. So in this case it would work in just one step, since 2x18=36, and 36 is indeed a multiple of 12, but if that didn't work you could go on to 3x18, 4x18, until one of them was a multiple of 12. The reason to use the largest number when doing this is that if you do that, you won't have to go as far. In this case if you used 12 instead, you would say 2x12=24, no 24 is not a multiple of 18, 3x12=36, 36 is, so that works, and you still get the right answer but it takes one more step.

For another example, let's say we want to find the LCM of 50 and 60. Write down successive multiples of 60 until you get one that is also a multiple of 50. 60x2=120, no, 60x3=180, no, 60x4=240, no, 60x5=300, yes, we've got it, so 300 is the LCM of 50 and 60. Notice if you simply multiplied the two numbers together you would get 3000, which is much bigger. That is because 50 and 60 have a common factor of 10. Now here is something interesting. If you divide 3000 by the common factor 10, you get 300, the LCM. Actually for two numbers, this is a trick that will always work, and it might be useful in a case like this where it is easy to see what the GCF is. 10 is not just any old common factor of 50 and 60, it is the greatest common factor, and it turns out that if you divide the product by the GCF, that will always give you the LCM. If you want to use that trick, use it, but do realize that it is only a good trick for problems where the numbers are easy to multiply and the GCF is easy to find. For 12 and 18, you could do it too, 12x18=216, 216/6=36, but here is it probably easier to just multiply 18 by 2.

For finding LCMs and GCFs of larger numbers and more than 2 numbers there is a more systematic method that is also important to learn for when you later learn to do this sort of thing with algebraic expressions. This method involves prime factoring. To learn how to prime factor numbers, see my article How to Prime Factor a Number. But since too many people learn these method without understanding them, before I talk about them I want to talk a little about the relationships between the prime factorization of factors and multiples.

Factors and Multiples in Prime Factored Form

Here's the game. Let's say we have our numbers in prime factored form and we want to tell whether one number is a multiple or a factor of the other. How can we do it? Is there a good way to tell this from the prime factored form? For example, here are two numbers prime factored.

24x3x5, 3x5x7

Without multiplying out to see what the numbers are, can we tell if the first is a multiple or a factor of the second?  How about these two numbers?

3x5, 3x5x7

For these two we can see something interesting. The factorization of the first one is contained in that of the second one, which makes the first one a factor of the second one and the second one a multiple of the first one. 3x5 divides 3x5x7 evenly, namely when you divide 3x5x7 by 3x5, you get 7, and since 3x5x7=(3x5)x7, 3x5x7 can be obtained by multiplying something by 3x5, namely 7, so it is a multiple of it. In general this test will always work.
 
In prime factored form one number is a multiple of another number if its factorization contains the factorization of the other number.

In prime factored form one number is a factor of another number if its factorization is contained in the factorization of the other number.

So for the first example I gave, 24x3x5, 3x5x7, since there is no containment, the 3 and 5 from the first one are in the second one, but not the 24, and the 7 in the second one is not in the first one, neither are multiples or factors of the other.

Let's look at some more examples and see if we can tell from the prime factorization if one of the numbers is a factor or a multiple of the other number.

Example 1:

2x3x7, 3x7

Solution:

Here the second number is a factor of the first and the first is a multiple of the second, because 3x7 is contained in 2x3x7.

Example 2:

3x11, 32x113

Solution:

Here the first is a factor of the second and the second is a multiple of the first. If you write out the second in longhand it is 3x3x11x11x11, which contains 3x11. It is (3x11)x(3x11x11), so you can get the second one from the first one by multiplying by 3x11x11.

Example 3:

3x73, 32x72x17

Solution:

In this one neither is a multiple or a factor of the other. It almost looks like the factorization of the first one is contained in the other, but it doesn't work, because the 7 is raised to a higher power, so all three 7's of the first one are not in the second one, so there is no way of writing the second one as something times the first one, because any such thing would have at least three 7's in its factorization.

Finding GCFs and LCMs by Prime Factoring

Now we are ready to use prime factorizations to find GCFs and LCMs. Using the condition that we just obtained, what are trying to do for the GCF is put together the largest collection of factors in a prime factorization so that it is contained in both of the prime factorizations, and for the LCM we want the smallest prime factorization that both of them are contained in. If you have heard of intersections and unions, it is sort of like the intersection for the GCF and the union for the LCM. If you haven't heard of such things, it looks sort of like this
GCF
for the GCF and this
LCM
for the LCM, that is we want to put together everything they have in common for the GCF and throw everything together, but without duplication for the LCM. You might find that it helps you remember the methods for these simply to have these pictures in mind. I tend to have pictures sort of like this in my mind when I am thinking about them.

To make things simplest, let's first just look at an example where the factorizations with no repeated factors, that is no powers.

Example 4:

Find the GCF and the LCM of 2x3x5 and 3x5x7x11.

Solution:

To write down the GCF we just write down all of the factors that they have in common. That would be the 3 and the 5. So the GCF is

3x5.

Notice that these are the only factors that we can include if we want it to be contained in both of the factorizations. If we included a 2, it wouldn't be contained in the second factorization, so it wouldn't be a factor of the second number. If we included a 7 or an 11, it wouldn't be contained in the first factorization, so it wouldn't be a factor of the first number. If we included anything else, it wouldn't be contained in either of them, so it would be a factor of either of them and very definitely wouldn't be a common factor. As is 3x5 is indeed contained in both of the factorization. The first number is 2x(3x5), so it is a factor of it, and the second number is (3x5)x(7x11), so it is a factor of it, so it is indeed a common factor of the numbers, and since we can't put any more factors in and have it still be a factor of both of them, it must be the greatest common factor, the GCF. Of course you know what this numbers is, it is 15, and eventually in these problems is it a good idea to give a number to our answers, but for now, to avoid unnecessary computation and concentrate on the method, we won't worry about multiplying out.

Now to the LCM. For the LCM we throw everything together, but without duplication. Instead of using just the numbers that they have in common, we use every number than occurs in at least one of them. So that's 2, 3, 5, 7, and 11. So the LCM of the numbers is

2x3x5x7x11.

We can see that this is a multiple of the two numbers, because each of the factorizations are contained in it. It is (2x3x5)x(7x11) and (3x5x7x11)x2, so you can get it by multiplying 7x11 by the first number and also by multiplying 2 times the second number, making it a multiple of each of them. And you don't even have to figure out what either of these numbers are to see that. Furthermore if any one of those numbers wasn't in its factorization, it couldn't be a multiple of at least one of these numbers. If the 2 wasn't there, it wouldn't be a multiple of the first number, and if the 7 or 11 weren't there it wouldn't be a multiple of the second number. If the 3 or 5 weren't there it wouldn't be a multiple of either of them. So there is nothing smaller that we could have used and still have it be a multiple of both numbers, so it is the least common multiple, the LCM.

But notice that being the least common multiple doesn't make it very small, because it still has to be a multiple of both of the numbers, and remember multiples are the big ones. By the way, I think that sometimes the everyday use of the expression lowest common denominator an in 'appealing to the lowest common denominator', which you will find when you deal with fractions is the same as the least common multiple, tends to be misleading in this, because it tends to mean something mean and low and below everything, which is actually opposite of the way we use the expression in mathematics. It really corresponds closer to the greatest common factor.

Getting back to our method, now let's look at the slightly more complicated case when there are repeated factors.

Example 5:

Find the GCF and the LCM of 2x34x13 and 32x5x132x172.

Solution:

For the GCF we want it to be contained in both of these, so like before we only use primes that occur in both factorizations. In this case that would be only 3 and 13. But the answer isn't

3x13,

because we can find a bigger common factor than that, namely 32x13, because that is contained in both of them too. The first one is (32x13)x(2x32), and the second one is (32x13)x(5x13x172). We can use 32 instead of just 3, because since both numbers have at least 2 for their powers of 3, so 32 will be contained in both factorizations, but if we used any larger power of 3, it wouldn't be contained in the second number, so it wouldn't be a factor of the second number. The rule to use for this is, like before use only numbers that occur in both factorizations, and for powers use the smallest power, because smaller powers are contained in bigger powers. So here the two common prime factors are 3 and 13. For 3, the power in the first number is 4, and the power in the second number is 2, so the smallest of these is 2. For 13, the power in the first number is 1 and the power in the second number is 2, so we use 1 and the GCF is

32x13.

For the LCM we want something that contains each of these factorizations. That means like before we want to include all of the prime numbers that occur in either factorization, so that is 2, 3, 5, 13, and 17. But now what powers do we use? Now I said before that we do this without duplication, but that is not quite true, because

2x3x5x13x17

wouldn't be a multiple of either of these numbers, because it would have to have a 34 to be a multiple of the first one, and it would have to have a 32 and a 132 and a 172 in it for the second number to be included in it. But we don't need both a 32 and a 34, because once it has a 34 in it, 32 will be included in that. What we need here is to just use the highest powers, and the lower ones will be okay, because they will be contained in the higher ones. So for 2 we have a 1 power from the first number and nothing from the second number. For the 3 we have a 4 power from the first and a 2 power from the second, so we use the 4. For the 5, we have nothing from the first and a 1 power from the second. For the 13 we have a 1 power for the first and a 2 power from the second, so we use 2, and for the 17, we have nothing from the first and a 2 power from the second. So putting all of this together we get an LCM of

2x34x5x132x172.

And now we have enough stuff so that each of the factorizations are contained in it, since it is (2x34x13)x(5x13x172) and (32x132x172)x(2x32).

Summary

More Examples--Putting it all Together

For these examples we'll again be using numbers and getting numbers for our answers by multiplying out the prime factorization. I will be assuming that you already know how to prime factor numbers and not showing the work for that, so if you need some review with it, please read How to Prime Factor a Number. For the following problems the instruction is to find the GCF and the LCM by prime factoring.

Example 6:

12, 18

Solution:

We already know the answer to this one. It is 36, but here is how to do it by prime factoring. First we prime factor the two numbers.

12=22x3, 18=2x32

The factors that they both have are 2 and 3, and the lowest powers for both of them are 1, so the GCF is

2x3=6.

2 and 3 are also the only numbers occurring in any of the factorizations, so they are also the numbers we use for the LCM, but for the LCM we use the highest powers, which in this case are both 2. So the LCM is

22x32=4x9=36,

the same as what we got before. In this case it probably would have been quicker just to do the successive multiples of 18 or even to just guess it, but doing it  this way is good practice for more complicated problems where that wouldn't be so easy to do. It is also good to remember problems like this for when you later do this with algebraic expressions, because you will see similar problems to this one then, and you will have to use this method for those.

Example 7:

50, 125

Solution:

First we prime factor the numbers.

50=2x52, 125=53

For the GCF the only prime factor they have in common is the 5, and its smallest power is 2, so the GCF is

52=25.

We could have probably guessed this one, but again it is is good practice to see how to get it by prime factoring.

For the LCM we have factors of 2 and 5, and this time we use the highest powers, so that gives us

2x53=2x125=250.

Example 8:

72, 108

Solution:

The prime factorizations are

72=23x32 , 108= 22x33

Like in example 1, the factors in both are the same, so we will use 2 and 3 for both the GCF and the LCM. The only difference will be the powers. In the GCF we will use the lowest powers, 2 and 2, and in the LCM we will use the highest powers, 3 and 3. So the GCF is

22x32=4x9=36

and the LCM is

23x33=8x27=216.

Example 9:

24, 60, 45

Solution:

So far we have only dealt with two numbers, but we can do this all perfectly well with any number of numbers that we want, and the same method works. First we prime factor the numbers.

24=23x3, 60=22x3x5, 45=32x5

The only number that occurs in all three of them is 3, and its lowest power is 1, so the GCF is just

3.

For the LCM we have 2, 3, and 5. The highest power of 2 is 3, the highest power of 3 is 2, and the highest power of 5 is 1, so the LCM is

23x32x5=8x9x5=360.

360, hmm..., does that make sense? Thinking aloud here, yes it looks like a multiple of each of them. It is 6x60, 8x45 (I know that because of angles, the circle is 360°, and 45° is an eighth of the way around.) What about 24, it looks sort of related, but 36 is not a multiple of 24, it is one and a half times it, but 360 is a multiple of it since it is 10 times one and a half times it, which would be 15 times it, so 360 must be 15x24. So 360 is indeed a multiple of all of them, and I can't think of any smaller ones.

Example 10:

3, 5, 35

Solution:

Well, the first two are easy to factor, since they are prime, and 35 isn't too difficult either, so the prime factorizations here are

3, 5, 5x7.

There are no primes that they all share, so the GCF is

1.

This kind of makes sense with the first two being prime.

For the LCM, the factors are 3, 5, and 7, and there are no power higher than 1, so the LCM is

3x5x7=105.

And again this makes sense. Clearly 105 is divisible by both 3 and 5. It ends in a 5, so it is divisible by 5, and the fact that the sum of the digits is 6 makes it divisible by 3. (See How to Prime Factor a Number for these divisibility tests.) Is it divisible by 35? Yes, it is 35x3. It must be if I have done the multiplying right, because it should be 3x(5x7).

Example 11:

27, 64

Solution:

These two numbers are relative prime, so the GCF should be 1 and the LCM 27x64=1728. Let's see how this works out with the prime factoring method. The prime factorizations are

27=33, 64=26.

There are no common prime factors, so the GCF is indeed

1.

The factors that occur in one of the other of them are 2 and 3, and we use their highest powers, which are 6 and 3 respectively, so the LCM is

26x33=64x27=1728,

just like we thought it would be.

Example 12:

50, 100, 200

Solution:

Here it is pretty easy to see that 50 is the GCF and 200 is the LCM, since the smallest number 50 is a factor of the other two and the largest number 200 is a multiple of the others, but again let's see how prime factoring gives that to us. Here are the prime factorizations.

50=2x52, 100=22x52, 200=23x52

These contain all the same prime factors. The only difference is the powers, so both for the GCF and the LCM we use the same factors, 2 and 5. The only difference is with the power of 2. For the GCF it will be 1 and for the LCM it will be 3. So the GCF is

2x52=50

and the LCM is

23x52=200,

again nothing unexpected.

Example 8:

4, 9, 12, 21

Solution:

In this one there are four numbers, but like I said before, the method is the same no matter how many you have, so we should be able to do this one. 4 and 9 on their own are relatively prime, so it is clear that the GCF is going to be 1, so let's just do the LCM for this one.

Here are the prime factorizations.

4=22, 9=33, 12=22x3, 21=3x7

The prime factors are 2, 3, and 7, with highest powers of 2, 3, and 1 respectively. So the LCM is

22x33x7=4x8x7=224.

Shelley's Math Articles