Mathwords logoMathwords

Prime Factor — Definition, Formula & Examples

A prime factor is a factor of a number that is also a prime number. For example, the prime factors of 12 are 2 and 3, because 2 and 3 are the only prime numbers that divide evenly into 12.

A prime factor of a positive integer nn is a prime number pp such that pnp \mid n (that is, pp divides nn with no remainder). Every integer greater than 1 can be expressed as a product of prime factors, and this set of prime factors is unique up to the order of multiplication.

How It Works

To find the prime factors of a number, start by dividing it by the smallest prime number (2) and keep dividing until it no longer goes in evenly. Then move to the next prime (3, 5, 7, ...) and repeat the process. Continue until the remaining quotient is 1. The prime numbers you used as divisors are the prime factors. A factor tree is a visual tool that makes this process easier to organize.

Worked Example

Problem: Find all the prime factors of 60.
Step 1: Divide 60 by the smallest prime, 2.
60÷2=3060 \div 2 = 30
Step 2: Divide 30 by 2 again.
30÷2=1530 \div 2 = 15
Step 3: 15 is not divisible by 2, so try the next prime, 3.
15÷3=515 \div 3 = 5
Step 4: 5 is already a prime number, so we stop. Write 60 as a product of primes.
60=2×2×3×5=22×3×560 = 2 \times 2 \times 3 \times 5 = 2^2 \times 3 \times 5
Answer: The prime factors of 60 are 2, 3, and 5.

Another Example

Problem: Find all the prime factors of 84.
Step 1: Divide 84 by the smallest prime, 2.
84÷2=4284 \div 2 = 42
Step 2: Divide 42 by 2 again.
42÷2=2142 \div 2 = 21
Step 3: 21 is not divisible by 2, so try 3.
21÷3=721 \div 3 = 7
Step 4: 7 is prime, so we are done.
84=22×3×784 = 2^2 \times 3 \times 7
Answer: The prime factors of 84 are 2, 3, and 7.

Why It Matters

Prime factors are central to pre-algebra and middle-school math courses, where you use them to find the greatest common factor (GCF) and least common multiple (LCM) of two or more numbers. They also appear in simplifying fractions and solving problems involving divisibility. In computer science, the difficulty of finding prime factors of very large numbers is the basis of RSA encryption, which secures online banking and messaging.

Common Mistakes

Mistake: Listing composite (non-prime) numbers as prime factors, such as calling 4 a prime factor of 12.
Correction: Always check that each factor is prime. 4 is not prime because it equals 2 × 2. The correct prime factors of 12 are 2 and 3.
Mistake: Stopping the division process too early and leaving a composite quotient.
Correction: Keep dividing until the remaining quotient is a prime number or 1. For instance, when factoring 72, do not stop at 72 = 8 × 9; continue breaking 8 and 9 into primes to get 23×322^3 \times 3^2.

Related Terms