Skip to main content
Mathematics LibreTexts

10.2.1.3: Factors and Primes

  • Page ID
    113223
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives
    • Recognize (by using the divisibility rule) if a number is divisible by 2, 3, 4, 5, 6, 9, or 10.
    • Find the factors of a number.
    • Determine whether a number is prime, composite, or neither.
    • Find the prime factorization of a number.

    Introduction

    Natural numbers, also called counting numbers (1, 2, 3, and so on), can be expressed as a product of their factors. When working with a fraction, you often need to make the fraction as simple as possible. This means that the numerator and the denominator have no common factors other than . It will help to find factors, so that later you can simplify and compare fractions.

    Tests of Divisibility

    When a natural number is expressed as a product of two other natural numbers, those other numbers are factors of the original number. For example, two factors of 12 are 3 and 4, because \(\ 3 \cdot 4=12\).

    When one number can be divided by another number with no remainder, we say the first number is divisible by the other number. For example, 20 is divisible by \(\ 4(20 \div 4=5)\). If a number is divisible by another number, it is also a multiple of that number. For example, 20 is divisible by 4, so 20 is a multiple of 4.

    Divisibility tests are rules that let you quickly tell if one number is divisible by another. There are many divisibility tests. Here are some of the most useful and easy to remember:

    • A number is divisible by 2 if the last (ones) digit is divisible by 2. That is, the last digit is 0, 2, 4, 6, or 8. (We then say the number is an even number.) For example, in the number 236, the last digit is 6. Since 6 is divisible by \(\ 2(6 \div 2=3)\), 236 is divisible by 2.
    • A number is divisible by 3 if the sum of all the digits is divisible by 3. For example, the sum of the digits of 411 is 4+1+1=6. Since 6 is divisible by \(\ 3(6 \div 3=2)\), 411 is divisible by 3.
    • A number is divisible by 5 if the last digit is 0 or 5. For example, 275 and 1,340 are divisible by 5 because the last digits are 5 and 0.
    • A number is divisible by 10 if the last digit is 0. For example, 520 is divisible by 10 (last digit is 0).
    Other useful divisibility tests:
    1. : A number is divisible by 4 if the last two digits are divisible by 4.
    2. : A number is divisible by 6 if it is divisible by both 2 and 3.
    3. : A number is divisible by 9 if the sum of its digits is divisible by 9

    Here is a summary of the most commonly used divisibility rules.

    A number is divisible by Example
    2 if the last digit is even (0, 2, 4, 6, 8).

    426 yes

    273 no

    3 if the sum of the digits is divisible by 3.

    642 yes

    (6+4+2=12, 12 is divisible by 3)

    721 no

    (7+2+1=10, 10 is not divisible by 3)

    4 if the last two digits form a number that is divisible by 4.

    164 yes

    (64 is divisible by 4)

    135 no

    (35 is not divisible by 4)

    5 if the last digit is 0 or 5.

    685 yes

    432 no

    6 if the number is divisible by 2 and 3.

    324 yes

    (it is even and 3+2+4=9)

    411 no

    (although divisible by 3, it is not even)

    9 if the sum of the digits is divisible by 9.

    279 yes

    (2+7+9=18)

    512 no

    (5+1+2=8)

    10 if the last digit is a 0.

    620 yes.

    238 no

    If you need to check for divisibility of a number without a rule, divide (either using a calculator or by hand). If the result is a number without any fractional part or remainder, then the number is divisible by the divisor. If you forget a rule, you can also use this strategy.

    Exercise

    Determine whether 522 is divisible by 2, 3, 4, 5, 6, 9, or 10.

    1. 2 and 3 only
    2. 4 only
    3. 2, 3, 6, and 9 only
    4. 4, 5, and 10 only
    Answer
    1. Incorrect. Although 522 is divisible by 2 (the last digit is even) and 3 (5+2+2=9, which is a multiple of 3), it is also divisible by 6 and 9. The correct answer is 2, 3, 6, and 9 only.
    2. Incorrect. The last two digits (22) are not divisible by 4, so 522 is not divisible by 4. 522 has a last digit divisible by 2, so 522 is divisible by 2. The sum of the digits is divisible by 3 (5+2+2=9) and by 9, so 522 is divisible by 3 and 9. Since 522 is divisible by 2 and 3, it is divisible by 6. Since the last digit is not 0 or 5, 522 is not divisible by 5 or 10. The correct answer is 2, 3, 6, and 9 only.
    3. Correct. 522 is divisible by 2 (the last digit is even) and 3 (5+2+2=9, which is a multiple of 3). Since it is divisible by 2 and 3, it is also divisible by 6. Also, the sum of the digits is divisible by 9, so 522 is divisible by 9. Since the last digit is not 0 or 5, 522 is not divisible by 5 or 10. The number formed by the last two digits, 22, is not divisible by 4, so 522 is not divisible by 4.
    4. Incorrect. The last two digits are not divisible by 4, so 522 is not divisible by 4. The last digit is not 0 or 5 so 522 is not divisible by 5. The last digit is not 0, so 522 is not divisible by 10. However, 522 is divisible by 2 (the last digit is even) and 3 (5+2+2=9, which is a multiple of 3). Since it is divisible by 2 and 3, it is also divisible by 6. Also, the sum of the digits is divisible by 9, so 522 is divisible by 9. The correct answer is 2, 3, 6, and 9 only.

    Factoring Numbers

    To find all the factors of a number, you need to find all numbers that can divide into the original number without a remainder. The divisibility rules from above will be extremely useful!

    Suppose you need to find the factors of 30. Since 30 is a number you are familiar with, and small enough, you should know many of the factors without applying any rules. You can start by listing the factors as they come to mind:

    \(\ 2 \cdot 15\)

    \(\ 3 \cdot 10\)

    \(\ 5 \cdot 6\)

    Is that it? Not quite. All natural numbers except 1 also have 1 and the number itself as factors:

    \(\ 1 \cdot 30\)

    The factors of 30 are 1,2,3,5,6,10,15, and 30.

    When you find one factor of a number, you can easily find another factor: it is the quotient using that first factor as the divisor. For example, once you know 2 is a factor of 30, then \(\ 30 \div 2\) is another factor. A pair of factors whose product is a given number is a factor pair of the original number. So, 2 and 15 are a factor pair for 30.

    What do you do if you need to factor a greater number and you can’t easily see its factors? That’s where the divisibility rules will come in quite handy. Here is a general set of steps that you may follow:

    1. Begin with and check the numbers sequentially, using divisibility rules or division.
    2. When you find a factor, find the other number in the factor pair.
    3. Keep checking sequentially, until you reach the second number in the last factor pair you found, or until the result of dividing gives a number less than the divisor.

    Note that you can stop checking when the result of dividing is less than the number you’re checking. This means that you have already found all factor pairs, and continuing the process would find pairs that have been previously found.

    If a number has exactly two factors, 1 and itself, the number is a prime number. A number that has more factors than itself and 1 is called a composite number. The number 1 is considered neither prime nor composite, as its only factor is 1. To determine whether a number is prime, composite, or neither, check factors. Here are some examples.

    Number Composite, Prime, or Neither? Explanation
    1 Neither 1 does not have two different factors, so it is not prime.
    2 Prime 2 has only the factors 2 and 1.
    3 Prime 3 has only the factors 3 and 1.
    4 Composite 4 has more than two factors: 1, 2, and 4, so it is composite.
    5, 7, 11, 13 Prime Each number has only two factors: 1 and itself.
    6, 8, 9, 10, 50, 63 Composite Each number has more than two factors.
    Exercise

    Find all the factors of 48.

    Answer

    1, 2, 3, 4, 6, 8, 12, 16, 24, 48

    Prime Factorization

    A composite number written as a product of only prime numbers is called the prime factorization of the number. One way to find the prime factorization of a number is to begin with the prime numbers 2, 3, 5, 7, 11 and so on, and determine whether the number is divisible by the primes.

    For example, if you want to find the prime factorization of 20, start by checking if 20 is divisible by 2. Yes, \(\ 2 \cdot 10=20\).

    Then factor 10, which is also divisible by \(\ 2(2 \cdot 5=10)\).

    Both of those factors are prime, so you can stop. The prime factorization of 20 is \(\ 2 \cdot 2 \cdot 5\), which you can write using exponential notation as \(\ 2^{2} \cdot 5\).

    One way to find the prime factorization of a number is to use successive divisions.

    \(\ \begin{array}{r}
    10\ \\
    2 \longdiv { 2 0 }
    \end{array}\)
    Divide 20 by 2 to get 10. 2 is being used because it is a prime number and a factor of 20. You could also have started with 5.
    \(\ \begin{array}{r}
    5\ \\
    2 \longdiv { 1 0 } \\
    2 \longdiv { 2 0 }
    \end{array}\)
    Then divide 10 by 2 to get 5.
    \(\ 2 \cdot 2 \cdot 5\) Multiplying these divisors forms the prime factorization of 20.

    To help you organize the factoring process, you can create a factor tree. This is a diagram that shows a factor pair for a composite number. Then, each factor that isn’t prime is also shown as a factor pair. You can continue showing factor pairs for composite factors, until you have only prime factors. When a prime number is found as a factor, circle it so you can find it more easily later.

    Screen Shot 2021-04-20 at 12.58.36 PM.png

    Written using exponential notation, the prime factorization of 20 is again \(\ 2^{2} \cdot 5\).

    Notice that you don’t have to start checking the number using divisibility of prime numbers. You can factor 20 to \(\ 4 \cdot 5\), and then factor 4 to \(\ 2 \cdot 2\), giving the same prime factorization: \(\ 2 \cdot 2 \cdot 5\).

    Now look at a more complicated factorization.

    Screen Shot 2021-04-20 at 1.10.15 PM.png

    Notice that there are two different trees, but they both produce the same result: five 2s and one 3. Every number will only have one, unique prime factorization. You can use any sets of factor pairs you wish, as long as you keep factoring composite numbers.

    When you rewrite the prime factorization of \(\ 96(2 \cdot 2 \cdot 2 \cdot 2 \cdot 2 \cdot 3)\) in exponential notation, the five 2s can be written as \(\ 2^{5}\). So, \(\ 96=2^{5} \cdot 3\).

    Exercise

    When finding the prime factorization of 72, Marie began a tree diagram using the two factors 9 and 8. Which of the following statements are true?

    1. Marie started the diagram incorrectly and should have started the tree diagram using the factors 2 and 36.
    2. Marie’s next set of factor pairs could be 3, 3 and 2, 4.
    3. Marie’s next set of factor pairs could be 3, 3 and 9, 8.
    4. Marie didn’t have to use a tree diagram.
    1. 1 only
    2. 2 only
    3. 3 and 4 only
    4. 2 and 4 only
    Answer
    1. Incorrect. Marie could have started her tree diagram with the factors 2 and 36, but she does not have to start with those factors. Starting with 9 and 8 is fine. The correct answer is D.
    2. Incorrect. Yes, Marie’s next set of factor pairs could contain 3, 3, and 2, 4, but statement 4 is also correct. The correct answer is D.
    3. Incorrect. Statement 4 is correct: Marie does not have to use a tree diagram, but 3 is not true. When creating a prime factorization, the factors are not combined with the previous composite. The correct answer is D.
    4. Correct. Marie’s next set of factor pairs could read 3, 3, and 2, 4, as \(\ 3 \cdot 3\) is a factorization of 9 and \(\ 2 \cdot 4\) is a factorization of 8. Marie could also find the prime factorization by using successive divisions.

    Summary

    Finding the factors of a natural number means that you find all the possible numbers that will divide into the given number without a remainder. There are many rules of divisibility to help you to find factors more quickly. A prime number is a number that has exactly two factors. A composite number is a number that has more than two factors. The prime factorization of a number is the product of the number’s prime factors.


    This page titled 10.2.1.3: Factors and Primes is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by The NROC Project via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.