What Are Prime and Composite Numbers?
Find out what prime and composite numbers are and learn what they have to do with a remarkable idea in math called The Fundamental Theorem of Arithmetic.
Jason Marshall, PhD
Listen
What Are Prime and Composite Numbers?
Just as there are two kinds people in the world (I’ll leave it up to you to decide what those two kinds are), there are also two kinds of positive integers: prime and composite. Well, actually, that isn’t entirely accurate since the number 1 (which is certainly a positive integer) is neither prime nor composite. But that’s just a detail, right? No, I wouldn’t say it’s just a detail—it’s an important detail. And, as we’ll see, it’s a detail that provides us with a wonderful example of the true nature of math. But let’s not get ahead of ourselves because today we’re going to go through all of this step-by-step and explore some of the cool ways in which prime numbers rule the world.
What Are Prime Numbers?
As with all endeavors in life, it’s best to tackle new math topics by starting at the beginning. And for the topics we’re tackling today, the beginning is the question: What are prime numbers? As you probably first learned long ago (but perhaps have since forgotten), a prime number is an integer greater than 1 that is only evenly divisible by itself and the number 1. Just to be sure we’re all on the same page, let’s look at this definition piece by piece.
The first part says that all primes must come from the sequence of numbers 2, 3, 4, 5, 6, 7, and so on. But as the second part of the definition says, not all numbers in this sequence are prime—only some of them. In particular, only those numbers that can’t be evenly divided by any number other than 1 and themselves. For example, the number 4 meets the first criteria for being prime, but not the second since in addition to being divisible by 1 and 4, it’s also divisible by 2. On the other hand, the number 5 is only divisible by 1 and 5—which means that it is prime.
If you start with the number 2 and work your way through the sequence of prime number candidates mentioned earlier, you’ll find that the sequence of primes begins with the numbers 2, 3, 5, 7, 11, 13, 17, 19, 23, and continues on from there forever to form the infinite set of prime numbers.
Why Aren’t 0 and 1 Prime?
It’s natural to wonder why the numbers 0 and 1 aren’t included in the set of prime numbers. After all, it’s clear that 1 is only divisible by 1 (which, in this case, is both the number 1 and the number itself!). So why isn’t 1 prime? Simply because that’s not how prime numbers are defined. In other words, it’s true that mathematicians could have included 1 (and even 0) in the set of prime numbers, but long ago they chose not to do that because they thought that excluding it better suited their purposes.
What exactly were their purposes? Well, at its core math is a tool that humans have developed to help them find and understand patterns in the world. So, in this case, their purpose was to understand the pattern of numbers we now know as prime. The fact that prime numbers are all greater than 1 is therefore an echo of a choice made long ago about this particular pattern.
What Are Composite Numbers?
We’ve seen that not all of the integers greater than 1 are prime, so what do we call all those guys that are outcasts from the prime club? They’re called composite numbers, and every integer greater than 1 is therefore either prime or composite. For example, 7, 13, and 23 are prime (since each is only divisible by 1 and itself), while 8, 14, and 25 are all composite (since each is divisible by some number other than 1 and itself). It’s worth taking a second to notice that composite numbers can be both even (like 8) and odd (like 25), but every single prime number after 2 is odd (which makes sense since even numbers are always divisible by 2…and therefore not prime).
While all of this is well and good, there’s a truly fascinating relationship between prime and composite numbers that we haven’t talked about yet. Namely, that every one of the infinite number of composite numbers can be built by multiplying prime numbers together—that’s why they’re called composite! For example, the composite number 35 can be built by multiplying the primes 5 x 7, the composite number 56 can be built by multiplying the primes 2x2x2x7, and so on. Which means that we can think of prime numbers as the fundamental building blocks from which all other positive integers are created! In mathematical circles, this idea is known as “The Fundamental Theorem of Arithmetic.”
Are Prime Numbers Useful?
All of this fuss over prime numbers and their properties might have you wondering if they’re actually good for anything? Or, as it may sometimes seem, do mathematicians just get excited over weird things? Of course, the answer is: “Yes, they’re good for lots of things!” (Or else I wouldn’t have bothered talking about them.) First of all, I have to mention that there’s nothing wrong with exploring fascinating parts of the world (including the mathematical world) purely for their own sake and for the sake of having fun (and prime numbers are certainly good for that).
But they’re also good for a lot more than pure entertainment. In fact, this may surprise you, but prime numbers are an absolute staple of modern civilization. Among other things, prime numbers are the key mathematical idea behind modern cryptographic systems that we all use every day to ensure the safety and security of our online communications and financial transactions. In fact, the story of how this encryption works and the math behind it is really, really interesting—and it’s a topic that we’ll definitely return to in the future.
Prime Number Brain Teaser
Okay, that’s all the math we have time for today. But before we finish up, here’s a prime number related brain teaser for you to think about: What will the units digit of the number you get when you multiply the first 10 prime numbers together be? How about the first 20 prime numbers? And the first 100? Can you find a way to solve this without having to do a ton of work? Good luck and have fun thinking about it!
Wrap Up
Remember to become a fan of the Math Dude on Facebook where you’ll find a new featured number or math puzzle posted every weekday. And if you’re on Twitter, please follow me there too. Finally, if you have math questions, feel free to send them my way via Facebook, Twitter, or by email at mathdude@quickanddirtytips.comcreate new email.
Until next time, this is Jason Marshall with The Math Dude’s Quick and Dirty Tips to Make Math Easier. Thanks for reading, math fans!