Sitonce
Country: US
Show exams for United States Hong Kong
Sign in

Prime Factorization and Divisibility

Updated 6 min read
Key takeaway

Prime factorization writes a whole number greater than one as a product of prime numbers.

More key points
  • Divide by prime factors or build a factor tree until every factor is prime.
  • Divisibility tests help identify factors quickly, while multiplying the final factors checks that none were lost.
On this page8 sections
  1. Factors, primes, and composite numbers
  2. Build a factor tree without losing a branch
  3. Repeated division as an alternative
  4. Divisibility tests that save arithmetic
  5. Testing whether a number is prime
  6. Use the factors to inspect divisibility
  7. Perfect squares and repeated factors
  8. Checking a finished factorization

Factors, primes, and composite numbers

A factor divides a whole number without leaving a remainder. For example, 7 is a factor of 42 because 42 ÷ 7 = 6. The corresponding factor pair is 7 and 6. A multiple goes in the other direction: 42 is a multiple of 7. Keeping those directions clear prevents mistakes when a question asks which numbers divide a given quantity.

A prime number is a whole number greater than 1 with exactly two positive factors, 1 and itself. The number 13 is prime. A composite number is greater than 1 and has additional positive factors; 15 is composite because 3 × 5 = 15. The number 1 is neither prime nor composite, and 2 is the only even prime.

Prime factorization breaks a composite number into its prime building blocks. Writing 36 as 4 × 9 gives a factorization, but it is not yet prime because both 4 and 9 are composite. Continue until 36 = 2 × 2 × 3 × 3, or 2² × 3².

Build a factor tree without losing a branch

Start with 84. One possible split is 84 = 7 × 12. The factor 7 is already prime, while 12 can split into 3 × 4. Then 4 splits into 2 × 2. Reading the prime leaves gives 7 × 3 × 2 × 2, conventionally written 2² × 3 × 7.

Another tree might begin with 84 = 6 × 14, then split 6 into 2 × 3 and 14 into 2 × 7. It produces the same prime factors. The order of branching can change, but the final prime factors and their multiplicities do not. That is the reason a prime factorization provides a consistent description of the number.

Count repeated factors carefully. Two branches ending in 2 mean that 2 appears twice, so write 2². Listing each prime only once would turn the factorization into 2 × 3 × 7 = 42, half the original number. A quick multiplication check catches the missing factor.

Repeated division as an alternative

For a large number, successive division can be tidier than drawing a tree. Divide 180 by 2 to get 90, divide again by 2 to get 45, divide by 3 to get 15, divide by 3 again to get 5, and finally divide by 5 to reach 1. The divisors recorded along the way are the prime factors.

Thus 180 = 2² × 3² × 5. You may choose another valid order of prime divisors, but starting with small primes makes omissions easier to avoid. Each division should have a whole-number result; if it does not, try another prime factor.

When the remaining quotient is prime, the process is finished after recording that quotient. Do not stop merely because the quotient is odd. Numbers such as 21, 35, and 49 are odd and composite, so each still needs another factorization step.

Divisibility tests that save arithmetic

A whole number is divisible by 2 if its last digit is even, by 5 if it ends in 0 or 5, and by 10 if it ends in 0. These tests follow from the base-ten place values of the preceding digits. They let you identify a possible factor without doing long division.

For 3, add the digits and check whether the sum is divisible by 3. For 9, the digit sum must be divisible by 9. The number 372 has digit sum 12, so it is divisible by 3 but not by 9. The number 729 has digit sum 18, so it is divisible by both.

For 4, inspect the number formed by the last two digits. If that number is divisible by 4, the original number is too. For 8, use the last three digits. Thus 1,316 is divisible by 4 because 16 is, while 2,120 is divisible by 8 because 120 is. Leading thousands do not change the second result because 1,000 itself is divisible by 8.

For 6, a number must be divisible by both 2 and 3. The number 222 is even and has digit sum 6, so it is divisible by 6. Merely passing one of those tests is insufficient: 27 passes the test for 3 but is not divisible by 6.

Testing whether a number is prime

To test a positive integer greater than 1, try possible prime divisors. You only need to test primes no larger than its square root. If a number has a factor pair, at least one member of that pair must be less than or equal to the square root. Otherwise multiplying the two factors would exceed the number being tested.

Consider 97. Its square root lies between 9 and 10, so test 2, 3, 5, and 7. It is odd, its digits sum to 16, it does not end in 0 or 5, and division by 7 leaves a remainder. None divides it, so 97 is prime.

By contrast, 91 passes the easy tests against 2, 3, and 5 but equals 7 × 13. Stopping after the familiar last-digit and digit-sum tests would incorrectly classify it as prime. The tests eliminate certain factors; they do not prove primality on their own.

Use the factors to inspect divisibility

Once 360 is written as 2³ × 3² × 5, you can ask whether another number's factors fit inside it. The divisor 24 is 2³ × 3, so 360 contains every factor required and is divisible by 24. The quotient contains the unused factors 3 × 5 = 15.

The number 16 is 2⁴. Since 360 contains only three factors of 2, it is not divisible by 16. The fact that both numbers are even does not establish that one divides the other. Prime exponents reveal exactly which factor is missing.

This also helps with simplifying fractions. To reduce 84/180, compare 2² × 3 × 7 with 2² × 3² × 5. Remove the common factor 2² × 3 from numerator and denominator. The remaining fraction is 7/15. Cancel matching factors, not individual digits in the written numbers.

Perfect squares and repeated factors

A positive whole number is a perfect square when every exponent in its prime factorization is even. The number 144 = 2⁴ × 3² meets that condition. Its square root takes half as many copies of each prime, giving 2² × 3 = 12.

The number 72 = 2³ × 3² does not have every exponent even, so it is not a whole-number square. Multiplying by one additional factor of 2 produces 144. If a problem asks for the smallest positive integer multiplier that makes 72 a square, the factorization explains why 2 is enough.

For cubes, prime exponents must be multiples of 3. These patterns are consequences of repeated multiplication: squaring doubles every prime exponent, while cubing triples it. They provide a way to solve classification questions without trying many possible roots.

Checking a finished factorization

Every listed factor must be prime, every repeated factor must be retained, and their product must recover the starting number. For 150, the expression 2 × 3 × 25 fails the first check, while 2 × 3 × 5 fails the last check. The complete prime factorization is 2 × 3 × 5².

For an exam question, use the quickest reliable method supported by the number. Divisibility tests identify likely starting points; a factor tree or repeated division organizes the work; multiplication verifies the result. Keep those jobs separate so a shortcut does not become an unsupported assumption.

Common questions

Is 1 a prime number?

No. A prime number has exactly two positive factors; 1 has only one.

Can different factor trees give different prime factorizations?

They can list factors in a different order, but a whole number greater than one has the same prime factors with the same multiplicities.

How far must trial division go when checking primality?

Test prime divisors up to the square root of the number. Any nontrivial factor pair has at least one member no larger than that square root.