Prime Numbers

Download as PDF

Welcome to the amazing world of prime numbers! These special numbers are the secret building blocks for all other whole numbers. In this lesson, we'll explore what makes a number 'prime,' how to find them, and why they are so important in mathematics and even computer science.

Prime Numbers — an original Algebra911 reference diagram defining prime numbers and a worked example.
Prime Numbers: A Complete Guide for Students

What Is a Prime Number?

A prime number is a whole number greater than 1 that has exactly two distinct factors: 1 and itself. A factor is a number that divides another number evenly, with no remainder. Think of them as the most basic building blocks of numbers, which can't be broken down any further.

Let's look at the number 7. What numbers can we multiply to get 7? Only 1×7. The factors of 7 are just 1 and 7. Since it has exactly two factors, 7 is a prime number.

Now consider the number 6. We can get 6 by multiplying 1×6 and also 2×3. The factors of 6 are 1,2,3, and 6. Since 6 has more than two factors, it is not a prime number. We call it a composite number.

Here are the first few prime numbers:

  • 2 (factors are 1,2)
  • 3 (factors are 1,3)
  • 5 (factors are 1,5)
  • 7 (factors are 1,7)
  • 11 (factors are 1,11)
  • 13 (factors are 1,13)

What about the number 1? This is a special case. The only factor of 1 is 1. Since it does not have exactly two distinct factors, the number 1 is neither prime nor composite. It's in a category all by itself!

A number p>1 is prime if its only factors are 1 and p.

How Do You Check if a Number Is Prime?

So, how can you tell if a large number is prime? You could try dividing it by every number smaller than it, but that would take forever! A much smarter method is called trial division. You only need to check for divisibility by prime numbers.

Here is a step-by-step method to check if a number, let's call it n, is prime:

  1. Start with the smallest prime number, which is 2.
  2. Check if n is divisible by 2. If it is (and n is not 2 itself), then n is composite, and you are done.
  3. If not, move to the next prime number, 3. Check if n is divisible by 3. If it is, n is composite.
  4. Continue this process, checking for divisibility by the next prime numbers (5,7,11,).
  5. When do you stop? You can stop when the prime number you are checking is greater than the square root of n. A simpler rule for beginners is to stop when the prime number you're dividing by gives an answer that is smaller than that prime number.

Let's use this method to figure out if 53 is a prime number.

Example 1

Question: Is the number 53 prime or composite?

Solution: We will test for divisibility by prime numbers, starting with 2.

  • Is 53 divisible by 2? No, because 53 is an odd number.
  • Is 53 divisible by 3? We can check by adding its digits: 5+3=8. Since 8 is not divisible by 3, 53 is not divisible by 3.
  • Is 53 divisible by 5? No, because it does not end in a 0 or a 5.
  • Is 53 divisible by 7? No. We know that 7×7=49 and 7×8=56. So, 53 is not a multiple of 7.
  • What's the next prime? 11. Let's check. 53÷11 is about 4.8. Since our answer (4.8) is smaller than the number we are dividing by (11), we can stop.

Since 53 was not divisible by any of the prime numbers we checked, we can conclude that 53 is a prime number.

The Sieve of Eratosthenes: A Fun Way to Find Primes

The Sieve of Eratosthenes is a fantastic and ancient method for finding all prime numbers up to a certain limit. It was invented by a Greek mathematician named Eratosthenes over 2,000 years ago! The word "sieve" is like a strainer you might use in the kitchen – it helps you filter out the composite numbers, leaving only the primes behind.

Here's how it works. Let's find all the prime numbers up to 100.

  1. Create a Grid: Write down all the numbers from 1 to 100. We'll ignore 1 since it's not prime.
  2. Circle the First Prime: Start with the first prime number, 2. Circle it.
  3. Cross Out Multiples: Go through the rest of the list and cross out all multiples of 2 (4,6,8,10,,100).
  4. Move to the Next Uncrossed Number: The next number that isn't crossed out is 3. This is our next prime number. Circle it.
  5. Cross Out Its Multiples: Now, cross out all multiples of 3 that haven't been crossed out already (6,9,12,,99).
  6. Repeat the Process: The next available number is 5. Circle it as the next prime. Cross out all its multiples (10,15,20,,100).
  7. Continue: Repeat this with the next available number, which is 7. Circle it and cross out its multiples (14,21,,98).
  8. You're Done! The next uncrossed number is 11. Since 11×11=121, which is greater than 100, we can stop. All the numbers that are left (not crossed out) are prime!

The prime numbers up to 100 are: 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89, and 97. There are 25 of them!

What Are Composite Numbers?

A composite number is a whole number greater than 1 that has more than two factors. In other words, it is any whole number greater than 1 that is not a prime number. They are called "composite" because they are composed of, or built from, smaller numbers.

Let's take the number 12. To find its factors, we think of all the pairs of numbers that multiply to make 12:

  • 1×12=12
  • 2×6=12
  • 3×4=12

So, the factors of 12 are 1,2,3,4,6, and 12. Since there are six factors (which is more than two), 12 is a composite number.

Almost all the numbers you see every day are composite. Here are a few more examples:

  • 4 is composite because its factors are 1,2,4.
  • 10 is composite because its factors are 1,2,5,10.
  • 25 is composite because its factors are 1,5,25.
  • 39 is composite because its factors are 1,3,13,39.
A number c>1 is composite if it has at least one factor other than 1 and c.

An important idea connects composite numbers and prime numbers: every composite number can be written as a unique product of prime numbers. This is called its prime factorization, which we will explore in the next section.

Prime Factorization: Breaking Numbers into Primes

One of the most powerful concepts in number theory is prime factorization. This is the process of breaking down a composite number into its prime number building blocks. A very important rule, called the Fundamental Theorem of Arithmetic, states that every composite number has exactly one, unique set of prime factors.

Think of it like a recipe. The number 12 is always made from two 2s and one 3 (2×2×3). No other combination of prime numbers will multiply to give you 12. This unique "recipe" is its prime factorization.

The easiest way to find the prime factorization of a number is by using a factor tree.

Here's how to make one:

  1. Start with the number you want to factor at the top.
  2. Find any two factors of that number (other than 1 and the number itself) and draw two "branches" down to those factors.
  3. Look at each new factor. If it's a prime number, circle it. This branch is finished.
  4. If a factor is composite, repeat step 2: break it down into two smaller factors.
  5. Keep going until all the branches end in a circled prime number.
  6. The prime factorization is the list of all the circled numbers.
Example 2

Question: Find the prime factorization of 48.

Solution: Let's build a factor tree for 48.

  1. Start with 48. We can split it into 6×8.
  2. Neither 6 nor 8 is prime. So we split them again.
  3. Split 6 into 2×3. Both 2 and 3 are prime, so we circle them.
  4. Split 8 into 2×4. The number 2 is prime, so we circle it. The number 4 is composite.
  5. Split 4 into 2×2. Both of these are prime, so we circle them.

The circled prime numbers at the end of the branches are 2,3,2,2,2. It's best to write them in order from least to greatest.

The prime factorization of 48 is 2×2×2×2×3. We can also write this using exponents as 24×3.

Example 3

Question: Find the prime factorization of 90.

Solution: Let's use a factor tree for 90.

  1. Start with 90. A good first split is 9×10.
  2. Neither 9 nor 10 is prime.
  3. Split 9 into 3×3. Both 3s are prime, so we circle them.
  4. Split 10 into 2×5. Both 2 and 5 are prime, so we circle them.

All our branches end in circled primes. The prime factors are 3,3,2,5.

Writing them in order, the prime factorization of 90 is 2×3×3×5. Using exponents, this is 2×32×5.

Why Are Prime Numbers So Important?

Prime numbers might seem like a simple math curiosity, but they are incredibly important in mathematics and the modern world. They are not just random numbers; they are the fundamental components of our number system.

The Building Blocks of Numbers

As we saw with prime factorization, every composite number can be broken down into a unique product of primes. This means primes are like the atoms of the number world. Just as all molecules are made of atoms, all whole numbers greater than 1 are either prime themselves or can be built by multiplying primes. This property is essential for many areas of advanced mathematics.

Keeping Information Safe Online (Cryptography)

Have you ever bought something online or sent a private message? Prime numbers are working behind the scenes to keep your information safe. Modern encryption, the technology that scrambles data so only the intended person can read it, relies on a clever trick with very, very large prime numbers.

Computers can easily multiply two huge prime numbers together to get an even bigger composite number. However, it is extremely difficult for a computer to take that huge composite number and figure out which two primes were multiplied to create it. This one-way difficulty is the basis for much of the security that protects your passwords, bank details, and messages on the internet.

Finding GCF and LCM

In school, you'll soon use prime numbers for very practical tasks. Prime factorization is the most reliable way to find the Greatest Common Factor (GCF) and the Least Common Multiple (LCM) of two or more numbers. These skills are crucial for working with fractions, solving word problems, and understanding ratios.

Common Mistakes When Working with Prime Numbers

Prime numbers are straightforward, but there are a few common traps that students (and even adults!) can fall into. Being aware of these will help you master the topic and avoid simple mistakes on tests and homework.

  • Mistake 1: Thinking the number 1 is a prime number.
    Correction: Remember the definition! A prime number must have exactly two distinct factors. The number 1 has only one factor (itself), so it doesn't fit the rule. It is neither prime nor composite.
  • Mistake 2: Assuming all odd numbers are prime.
    Correction: While many primes are odd (in fact, all of them except for 2), not all odd numbers are prime. For example, 9 is odd, but its factors are 1,3, and 9, making it composite. Other examples include 15,21,25, and 27. Always test an odd number to be sure.
  • Mistake 3: Thinking the number 2 is not prime because it's even.
    Correction: The number 2 is a very special prime. Its factors are 1 and 2. That's exactly two factors, so it fits the definition perfectly. It is the only even prime number. Any other even number will always have 2 as a factor in addition to 1 and itself, making it composite.
  • Mistake 4: Forgetting some prime divisors when testing a number.
    Correction: When you check if a number like 91 is prime, it's easy to check 2,3, and 5 and then give up. But you have to be systematic. 91 is not divisible by 2,3, or 5. However, if you keep going, you'll find that 91=7×13. So, 91 is composite. Don't stop checking too early!

Prime Numbers: Quick Reference

Here is a quick summary of the key ideas about prime and composite numbers. Use this as a quick reference when you're studying.

Key Definitions

  • Factor: A number that divides another number exactly, with no remainder. The factors of 10 are 1,2,5,10.
  • Prime Number: A whole number greater than 1 with exactly two factors: 1 and itself. Examples: 2,3,5,17,31.
  • Composite Number: A whole number greater than 1 with more than two factors. Examples: 4,6,9,20,50.
  • The Number 1: Is neither prime nor composite.

Prime vs. Composite at a Glance

FeaturePrime NumberComposite Number
Number of FactorsExactly 2More than 2
Factors1 and itself1, itself, and at least one other
Examples2,5,11,234,10,12,25
Can be broken down?No, it's a building block.Yes, into a product of primes.

Remember the first ten prime numbers: 2,3,5,7,11,13,17,19,23,29. Knowing these will help you solve problems much faster!

Frequently Asked Questions

Is 1 a prime number?

No, the number 1 is not a prime number. A prime number must have exactly two distinct factors, but 1 only has one factor (itself). Because it doesn't fit the definition of prime or composite, it is considered a special number in its own category.

Why is 2 the only even prime number?

The number 2 is prime because its only factors are 1 and 2. Any other even number, like 4, 6, or 100, is divisible by 2 in addition to being divisible by 1 and itself. This means all other even numbers have more than two factors, making them composite.

How many prime numbers are there?

There are infinitely many prime numbers! The ancient Greek mathematician Euclid proved that you can never run out of primes, no matter how high you count. There is no 'biggest' prime number; mathematicians with powerful computers are always finding larger ones.

What is the fastest way to find prime numbers?

For finding all primes up to a certain number like 100 or 200, the Sieve of Eratosthenes is a very fast and fun method. For checking if a single, specific number is prime, the method of trial division (dividing by smaller prime numbers) is the most straightforward way.

What is a twin prime?

Twin primes are pairs of prime numbers that are separated by only one number. In other words, they have a difference of 2. Examples include (3, 5), (5, 7), (11, 13), and (17, 19). Mathematicians are still studying them to see if there are infinitely many twin prime pairs.

How is prime factorization useful?

Prime factorization is extremely useful for simplifying fractions and for finding the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of numbers. These skills are essential for adding and subtracting fractions with different denominators and solving many other types of math problems.

Why are they called 'prime' numbers?

The word 'prime' comes from the Latin word 'primus,' which means 'first' or 'most basic.' Prime numbers are called this because they are the fundamental building blocks from which all other whole numbers are made through multiplication. You can't break them down into smaller whole number factors.