Nepedia
Back to Discover
Fluent Reader
🔢

Quadratic residue

math Maturity 7-9 Next article →

Have you ever wondered if numbers have hidden patterns? Some numbers are special because they are the result of a number multiplied by itself. In math, we call these quadratic residues. If a number cannot be made this way, it is called a quadratic nonresidue. This idea uses something called a modulus, which is like a number line that wraps around in a circle.

These special numbers are not just a curiosity. They are used in important ways today. They help engineers with acoustics and help experts with cryptography to hide secret codes. They even help people factor very large numbers.

Finding these residues is a simple process. You can find them by squaring a list of numbers. For example, you can multiply 0 by 0, 1 by 1, and 2 by 2. This creates a list of special results. If you use a modulus, you just look at the remainder. You do not need to square every single number to find them all. Because of how math works, the list is often symmetric around its middle. This means you only need to square half of the numbers to see the pattern.

Many famous thinkers studied these patterns long ago. Mathematicians like Fermat, Euler, and Lagrange looked at them in the 17th and 18th centuries. They made many guesses about how they worked. However, the first complete study came from a man named Gauss. He wrote a famous book called Disquisitiones Arithmeticae in 1801. In this book, he gave these numbers their official names.

He showed that these residues follow very strict rules. For example, if you multiply two residues together, the answer is always another residue.

When we use an odd prime number as our modulus, the rules become very clear. There is an equal number of residues and nonresidues. If you multiply two nonresidues, you actually get a residue! This is a surprising twist in the pattern. There is also a special rule called the law of quadratic reciprocity. This rule helps us understand how two different prime numbers relate to each other. It can tell us if one number is a residue for another.

This makes solving hard math puzzles much easier.

Even though these numbers sometimes look random, they have hidden regularities. A mathematician named Dirichlet found that these numbers follow certain laws. He showed that the sum of residues and nonresidues behaves in specific ways. For example, if a prime number meets certain conditions, the sums might even be equal. You can even find a prime number where a long list of numbers are all residues. One such prime is 2521. This number is the smallest prime where the numbers 1 through 10 are all residues.

451 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

🔬 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.