If you only vaguely remember your elementary school mathematics class, you may not remember what a prime number is. That's a pity, because if you're trying to keep your emails safe from hackers or surf the web confidentially on a virtual private network (VPN), you're using prime numbers without even realizing it.
That's because prime numbers are a crucial part of RSA encryption, a common tool for protecting information, which uses prime numbers as keys to unlock the messages hidden inside gigantic amounts of what's disguised as digital gibberish. Additionally, prime numbers have other applications in the modern technological world, including an important role in defining the color intensity of the pixels on the computer screen that you're staring at now.
So, what are prime numbers, anyway? And how did they get to be so important in the modern world?
As Wolfram MathWorld explains, a prime number – also known simply as a prime – is a positive number greater than 1 that can only be divided by the one and itself.
"The only even prime number is 2," explains Debi Mink, a recently retired associate professor of education at Indiana University Southeast, whose expertise includes teaching elementary mathematics. "All the other primes are odd numbers."
Numbers like 2, 3, 5, 7, 11, 13 and 17 are all considered prime numbers. Numbers like 4, 6, 8, 9, 10 and 12 are not.
Mark Zegarelli, author of numerous books on math in the popular "For Dummies" series who also teaches test prep courses, offers an illustration involving coins that he uses with some of his students to explain the difference between primes and composite numbers, which can be divided by other numbers besides one and themselves. (Composite numbers are the opposite of primes.)
"Think about the number 6," says Zegarelli, citing a composite number. "Imagine that you have six coins. You could form them into a rectangle, with two rows of three coins. You can do that with eight, too, by putting four coins into two rows. With the number 12, you could make it into more than one type of rectangle — you could have two rows of six coins, or three times four. "
"But if you take the number 5, no matter how you try, you can't put it into a rectangle, " Zegarelli notes. "The best you can do it is string it into a line, a single row of five coins. So, you could call 5 a non-rectangular number. But the easier way to say that is to call it a prime number. "
There are plenty of other primes — 2, 3, 7 and 11 also are on the list, and it keeps rolling from there. The Greek mathematician Euclid, back in circa 300 B.C.E., devised a Proof of the Infinitude of Primes, which may have been the first mathematical proof showing that there is an infinite number of primes. (In ancient Greece, where the modern concept of infinity wasn't quite understood, Euclid described the quantity of primes simply as "more than any assigned multitude of prime numbers.")
Another way of understanding primes and composite numbers is to think of them as the product of factors, Zegarelli says. "2 times 3 equals 6, so 2 and 3 are factors of 6. So, there are two ways to make six — 1 times 6, and 2 times 3. I like to think of them as factor pairs. So, with a composite number, you have multiple factor pairs, while with a prime number, you have only one factor pair, one times the number itself. "
Proving that the number of primes are infinite isn't that tough, Zegarelli says. "Imagine that there is a last, biggest prime number. We're going to call it P. So then I'll take all the prime numbers up to P and multiply them all together. If I do that and add one to the product, that number has to be a prime. "
If a number is a composite, in contrast, it's always divisible by some quantity of lower prime numbers. "A composite could be divisible by other composites as well, but eventually, you can decompose it down to a set of prime numbers. " (An example: the number 48 has 6 and 8 as factors, but you can break it down further into 2 times 3 times 2 times 2 times 2.)
Why Prime Numbers Matter
So why have primes held such fascination among mathematicians for thousands of years? As Zegarelli explains, a lot of higher mathematics is based upon primes. But there's also cryptography, in which primes have a critical importance, because really large numbers possess a particularly valuable characteristic. There's no quick, easy way to tell if they're prime or composite, he says.
The difficulty of discerning between huge primes and huge composites makes it possible for a cryptographer to come up with huge composite numbers that are factors of two really big primes, composed of hundreds of digits.
"Imagine that the lock on your door is a 400-digit number," Zegarelli says. "The key is one of the 200-digit numbers that was used to create that 400-digit number. If I've got one of those factors in my pocket, I've got the key to the house. " But if you don't have those factors, it's pretty darn tough to get in.
That's why mathematicians have continued to labor to come up with increasingly bigger primes, in an ongoing project called the Great Internet Mersenne Prime Search. In 2018, that project led to the discovery of a prime number that consisted of 23,249,425 digits, enough to fill 9,000 book pages, as University of Portsmouth (England) mathematician Ittay Weiss described it in The Conversation. It took 14 years of computations to come up with the gigantic prime, which is more than 230,000 times bigger than the estimated number of atoms in the observable universe!
You can imagine how impressed Euclid might be by that.