Chapter 3 · Number system fluency

Prime Numbers and Prime Factorization

Sort numbers into prime and composite, find every factor pair of a number, and break a number down into a product of primes.

17 min read

Picture 1212 counters. You can set them out in equal rows in several ways: 11 row of 1212, 22 rows of 66, or 33 rows of 44. Turning a layout sideways, such as 44 rows of 33, uses the same two numbers. Each layout matches a multiplication: 1×12=121 \times 12 = 12, 2×6=122 \times 6 = 12 and 3×4=123 \times 4 = 12.

Now picture 77 counters. The only layout with equal rows is 11 row of 77, or that same layout turned sideways.

The numbers being multiplied are called factors. A factor of a whole number is a whole number that divides it exactly, with no remainder. So 33 is a factor of 1212, because 12÷3=412 \div 3 = 4 with nothing left over. But 55 is not a factor of 1212, because 12÷5=212 \div 5 = 2 remainder 22.

Every number in this lesson is a whole number greater than 00. You will sort numbers by how many factors they have, find every pair of factors a number has, and then break a number down into its smallest building blocks.

Counting factors sorts the whole numbers greater than 11 into two groups.

  • A prime number is a whole number greater than 11 that has exactly two factors: 11 and itself. For example, 77 is prime because its only factors are 11 and 77.
  • A composite number is a whole number greater than 11 that has more than two factors. For example, 1212 is composite because its factors are 11, 22, 33, 44, 66 and 1212.

The number 11 is a special case. Its only factor is 11, so it is neither prime nor composite.

Factors of the whole numbers from 1 to 12
NumberFactorsHow many factorsPrime or composite?
11
11
11
neither
22
11, 22
22
prime
33
11, 33
22
prime
44
11, 22, 44
33
composite
55
11, 55
22
prime
66
11, 22, 33, 66
44
composite
77
11, 77
22
prime
88
11, 22, 44, 88
44
composite
99
11, 33, 99
33
composite
1010
11, 22, 55, 1010
44
composite
1111
11, 1111
22
prime
1212
11, 22, 33, 44, 66, 1212
66
composite

Two rows of the table are worth a second look. The number 22 is prime even though it is even, and 99 is composite even though it is odd. What matters is how many factors a number has, not whether it is even or odd. In fact, 22 is the only even prime, because every even number greater than 22 has 22 as a factor besides 11 and itself.

For a larger number, you may not know the factors by heart. Instead, hunt for a factor other than 11 and the number itself. Your divisibility rules are the quickest tools for the hunt. If you find even one such factor, the number has more than two factors, so it is composite.

Worked example

Prime or composite?

Is 5151 prime or composite?

  1. Hunt for a factor other than 1 and 51. Start with 2. The number 51 is odd, so it is not divisible by 2. That means 2 is not a factor.

  2. Try 3 next. Add the digits: 5 plus 1 is 6. Because 6 is divisible by 3, the number 51 is divisible by 3 too. Divide to find the number that pairs with 3.

    51÷3=1751 \div 3 = 17
  3. Division undoes multiplication, so you can rewrite the division fact as a multiplication fact. It shows that 3 and 17 are both factors of 51.

    3×17=513 \times 17 = 51
  4. List the factors you have found: 1, 3, 17 and 51. That is more than two factors, so 51 fits the definition of a composite number.

Answer

The number 5151 is composite, because it has the factors 33 and 1717 as well as 11 and 5151.

With 5151, the hunt ended quickly. But what if you test a number and find nothing? You need to know when it is safe to stop. Factor pairs tell you.

A factor pair of a number is two whole numbers that multiply to give that number. For example, 33 and 44 are a factor pair of 1212, written 3×43 \times 4. With the counters, that was the layout with 33 rows of 44. Order does not matter, so 4×34 \times 3 is the same pair.

To find all the factor pairs of a number:

  1. Test 11, 22, 33 and so on, in order.
  2. Each time the number you test is a factor, divide to find its partner, the other number in the pair. Write the pair down.
  3. Stop when the number you are testing, multiplied by itself, is greater than the number you started with.

Why is it safe to stop there? Take 3636. If both numbers in a pair were 77 or more, they would multiply to at least 7×7=497 \times 7 = 49, which is more than 3636. So every factor pair of 3636 contains a number that is 66 or less, and you will already have tested all of those. The same reasoning works for any starting number.

Worked example

All the factor pairs of 36

Find all the factor pairs of 3636.

  1. Start with 1. It is a factor of every whole number, and its partner is the number itself.

    1×36=361 \times 36 = 36
  2. Test 2. The number 36 is even, so 2 is a factor. Divide 36 by 2 to find its partner, 18.

    2×18=362 \times 18 = 36
  3. Test 3. The digits 3 and 6 add to 9, which is divisible by 3, so 3 is a factor. Divide 36 by 3 to find its partner, 12.

    3×12=363 \times 12 = 36
  4. Test 4 and 5. Dividing 36 by 4 gives 9 with no remainder, so 4 is a factor. But 36 does not end in 0 or 5, so 5 is not a factor.

    4×9=364 \times 9 = 36
  5. Test 6. Dividing 36 by 6 gives 6 with no remainder, so 6 is a factor. Its partner is also 6, so this pair gives just one new factor.

    6×6=366 \times 6 = 36
  6. Next would be 7, but 7 times 7 is 49, which is greater than 36. Two numbers that are both 7 or more multiply to at least 49, so no new pair can exist. Stop here.

    7×7=49>367 \times 7 = 49 > 36

Answer

The factor pairs of 3636 are 1×361 \times 36, 2×182 \times 18, 3×123 \times 12, 4×94 \times 9 and 6×66 \times 6. So the factors of 3636 are 11, 22, 33, 44, 66, 99, 1212, 1818 and 3636.

The same search tells you when a number is prime. Take 2929. Like every number, it has the pair 1×291 \times 29. Now keep testing.

  • 22 is not a factor, because 2929 is odd.
  • 33 is not a factor, because the digits add to 2+9=112 + 9 = 11, and 1111 is not divisible by 33.
  • 44 is not a factor, because 29÷4=729 \div 4 = 7 remainder 11.
  • 55 is not a factor, because 2929 does not end in 00 or 55.
  • Next would be 66, but 6×6=366 \times 6 = 36, which is greater than 2929. Stop.

The only factor pair of 2929 is 1×291 \times 29. So 2929 has exactly two factors, and it is prime. In general, a whole number greater than 11 is prime exactly when its only factor pair is 11 times the number itself.

A composite number can be broken down into primes. Take 1212. One of its factor pairs is 2×62 \times 6. The 22 is prime, but the 66 is composite, so you can swap the 66 for its own factor pair, 2×32 \times 3. Because 2×32 \times 3 equals 66, the swap does not change the total. It is still 1212.

12=2×6=2×2×312 = 2 \times 6 = 2 \times 2 \times 3

Now every number being multiplied is prime, so nothing can be split again. You have found the prime factorization of 1212. The prime factorization of a number is that number written as a product of prime numbers only. A product is what you get when you multiply numbers together. A prime is written once for each time it is used, so 22 appears twice in 2×2×32 \times 2 \times 3. The number 11 never appears, because 11 is not prime.

To find the prime factorization of any composite number, start with a factor pair that does not use 11. Then keep swapping each composite number for a factor pair of its own, again without using 11, until only primes are left. If you are not sure whether a number is prime, search for its factor pairs to find out.

Worked example

From a factor pair to primes

Write the prime factorization of 3636.

  1. Start with a factor pair of 36 that does not use 1. From the last example, 4 and 9 work.

    36=4×936 = 4 \times 9
  2. Look at the 4. It is composite, because 2 times 2 is 4. Swap the 4 for 2 times 2. You are putting in something equal to 4, so the total is still 36.

    36=2×2×936 = 2 \times 2 \times 9
  3. Look at the 9. It is composite, because 3 times 3 is 9. Swap the 9 for 3 times 3. Again the total is still 36.

    36=2×2×3×336 = 2 \times 2 \times 3 \times 3
  4. Check every number. 2 and 3 are both prime, so nothing can be split further. Multiply back to confirm: 2 times 2 is 4, 4 times 3 is 12, and 12 times 3 is 36.

    2×2×3×3=362 \times 2 \times 3 \times 3 = 36

Answer

The prime factorization of 3636 is 2×2×3×32 \times 2 \times 3 \times 3.

Every starting factor pair of 36 ends with the same primes
First factor pairKeep splitting composite numbersPrimes from smallest to largest
2×182 \times 18
2×2×92 \times 2 \times 9, then 2×2×3×32 \times 2 \times 3 \times 3
2×2×3×32 \times 2 \times 3 \times 3
3×123 \times 12
3×3×43 \times 3 \times 4, then 3×3×2×23 \times 3 \times 2 \times 2
2×2×3×32 \times 2 \times 3 \times 3
4×94 \times 9
2×2×92 \times 2 \times 9, then 2×2×3×32 \times 2 \times 3 \times 3
2×2×3×32 \times 2 \times 3 \times 3
6×66 \times 6
2×3×62 \times 3 \times 6, then 2×3×2×32 \times 3 \times 2 \times 3
2×2×3×32 \times 2 \times 3 \times 3

Key concept

Every whole number above 1 has one prime factorization

Every whole number greater than 11 is either prime or a product of primes. However you split a composite number, you always finish with the same primes, each used the same number of times. Only the order can differ, and multiplying in a different order does not change the value. That is why you can say the prime factorization of a number. It is usual to write the primes from smallest to largest. A prime number cannot be split, so its prime factorization is just the number itself.

Worked example

Smallest prime first

Write the prime factorization of 8484. Any way of splitting works, but here is a steady routine: keep dividing by the smallest prime that is a factor, until the result is prime.

  1. 84 is even, so the smallest prime that is a factor is 2. Divide by 2. Because division undoes multiplication, the result tells you that 84 equals 2 times 42.

    84÷2=4284 \div 2 = 42
  2. 42 is even too, so divide by 2 again. This tells you that 42 equals 2 times 21, so 84 equals 2 times 2 times 21.

    42÷2=2142 \div 2 = 21
  3. 21 is odd, so 2 is not a factor. Try the next prime, 3. The digits 2 and 1 add to 3, so 21 is divisible by 3. This tells you that 21 equals 3 times 7.

    21÷3=721 \div 3 = 7
  4. 7 is prime, because its only factors are 1 and 7. So stop dividing. Put the pieces together: in 2 times 2 times 21, swap the 21 for 3 times 7.

    84=2×2×3×784 = 2 \times 2 \times 3 \times 7
  5. Multiply back to check: 2 times 2 is 4, 4 times 3 is 12, and 12 times 7 is 84.

    2×2×3×7=842 \times 2 \times 3 \times 7 = 84

Answer

The prime factorization of 8484 is 2×2×3×72 \times 2 \times 3 \times 7.

Here is the idea to take with you. A whole number greater than 11 is prime when it has exactly two factors, and composite when it has more. Testing numbers in order finds every factor pair of a number. And every composite number breaks down into primes, always the same primes, however you split it.

Next, you will use these skills to find the greatest common factor and the least common multiple of two numbers.