Some numbers are special. 
Imagine you have some dots.
But some numbers are different. They are called prime numbers. You cannot make a rectangle with them. You can only use one and itself. 
For example, 5 is a prime number. But 4 is not prime. You can make a small square with 4 dots.
There are many prime numbers. They go on forever! 
We use these numbers to keep secrets. They help computers stay safe. They are very special.
Imagine you have a group of dots. Some groups can form a neat rectangle. We call these composite numbers. 
A prime number is a number greater than 1. It cannot be made by multiplying two smaller numbers. For example, 5 is prime. But 4 is composite because 2 times 2 makes 4. Every number greater than 1 is either prime or composite. This is a big rule in math. It means every number can be broken down into prime parts. This is called prime factorization. 
Primes are very special. A long time ago, a man named Euclid proved that primes go on forever. We still find new ones today. The largest known prime is a huge Mersenne prime. It has over 41 million digits! We also use primes to keep secrets. They help computers use code to stay safe. This is called cryptography. 
Imagine you have a collection of dots. Some groups of dots can be arranged into a neat, solid rectangle. These are called composite numbers. 
Primes are the building blocks of all numbers. This idea is called the fundamental theorem of arithmetic. It says every number greater than 1 is either a prime or can be broken into primes. This breaking down process is called prime factorization. You can think of primes as the atoms of the math world. Every composite number is made of a unique set of prime parts. This set stays the same no matter how you group them. 
People have studied these numbers for a very long time. Ancient Greek mathematicians were among the first to record them. A man named Euclid lived around 300 BC. He proved that prime numbers go on forever and never end. 
Finding primes can be a very hard job. One simple way to check a number is called trial division. You test if a number can be divided by any smaller number. There are faster ways to do this with computers. For instance, the Miller-Rabin test is very fast but can sometimes make a mistake. The AKS test is always correct but is too slow for big jobs.
Primes are not just for puzzles; they help our modern world work. We use them in information technology every single day. They are the basis for public-key cryptography. This is a way to keep digital secrets safe using math. It works because it is very hard to break large numbers into their prime factors. 
A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. This property is known as primality. If a number is greater than 1 but is not prime, it is called a composite number. 
To understand how numbers are built, we use a process called prime factorization. This involves finding the specific prime numbers that, when multiplied together, result in the original number. For example, the number 4 is composite because its prime factors are 2 and 2. The order of these factors does not change the result, but the set of factors remains unique to that number. This makes primes the fundamental building blocks of all mathematics. Every composite number is essentially a unique combination of these prime atoms. 
Mathematicians use various methods to test for primality. A basic method is called trial division. In this process, you check if a number is a multiple of any integer between 2 and the square root of that number. While simple, trial division is very slow for large values. Faster algorithms exist, such as the Miller-Rabin primality test. This test is very quick but carries a small chance of error. There is also the AKS primality test. The AKS test always produces a correct answer in polynomial time, but it is currently too slow for practical use.
The study of primes has a long and rich history. Ancient Greek mathematicians provided some of the earliest surviving records. Around 300 BC, Euclid proved that there are infinitely many prime numbers. He also proved the fundamental theorem of arithmetic in his work, *Elements*. 
In the 17th and 18th centuries, many famous mathematicians studied these numbers. Pierre de Fermat investigated Fermat numbers, while Marin Mersenne studied primes of a special form called Mersenne primes. Christian Goldbach proposed a famous unsolved problem in 1742. Goldbach's conjecture suggests that every even integer greater than 2 is the sum of two primes. Leonhard Euler later proved that all even perfect numbers can be constructed using Mersenne primes. This connection between different types of numbers helped advance the field of mathematical analysis.
While primes may seem to appear randomly, they follow certain statistical patterns. The prime number theorem, proven at the end of the 19th century, describes this distribution. It states that the probability of a large number being prime is inversely proportional to its number of digits. This is related to the natural logarithm of the number. Even though there is no simple formula to separate primes from composite numbers, mathematicians can model their density. 
Prime numbers are vital to modern information technology. They are the foundation of public-key cryptography and the RSA cryptosystem. These systems keep digital information secure by relying on a specific difficulty. It is very hard for computers to factorize extremely large numbers into their prime components. This difficulty protects secrets in our digital world. 
🖼️ Images & Media (11)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.