quadratic primes
Welcome to the weird world of 2-dimensional primes!
These systems are either hexagonal or square, depending on the definition. The colorful shapes denote prime numbers, while composites are left blank. To learn more, keep reading, or check out my video series on the topic.
introduction
Let's begin with the complex primes. Consider the Gaussian Integers - numbers of the form a + bi, where a and b are integers and i² = -1. Each of these numbers has a prime factorization, just like the typical integers. For example:
(9 + 3i) = (1 + i) * (2 - i) * (3)
The number 9+3i is composite. It can be factored into the primes 1+i, 2-i, and 3. However, its neighbor 8+3i is prime, since there is no way that it can factor.
These factorizations can be tricky, since complex numbers are hard to deal with. This page does all the work for you - simply click on a cell to see its factorization, and if highlight mode is set to 'prime factors', those primes will blink. But of course, you may want to factor yourself, whether to learn or for fun. Luckily, there is a method to speed things up:
the norm
N(a+bi) = a² + b²
The formula above defines the norm of a complex number. The norm is a powerful tool for two reasons. First, norms are always real integers, so they're easier to work with than the complex integers. Secondly, norms are consistent with multiplication. If x * y = z then N(x) * N(y) = N(z). This means that we can replace any complex integer multiplication with a simpler norm multiplication. Above we saw the factorization of 9+3i. By substituting norms, we get:
90 = 2 * 5 * 9
This formula is much easier to verify. Norms can also help to identify primes. I mentioned above that 8+3i is prime, but I supplied no evidence. The norm of 8+3i is 73, which means that if there is a factorization of 8+3i, then the norms will produce a factorization of 73. However, 73 is prime, and therefore 8+3i must also be prime.
beyond complex
We can get similar results by applying these prime and norm ideas, but changing the imaginary unit. By using any quadratic equation, we get a 2-dimensional system, which is why these are called quadratic primes and integers.
Instead of i² = -1, we could have ω² = -2, or ω² = 23, or ω² = -ω - 1. It is customary that i always squares to -1, so in all other cases we use omega. Each definition determines a different ring of quadratic integers. Use the arrow controller to switch between the rings.
The concepts of factorization and norms apply to all of these rings, with some caveats. The norm equation depends on the definiton. If ω² = D then
N(a+bω) = a² - Db²
Factorization doesn't always translate so nicely though. In the real integers and complex integers, prime factorizations are always unique. This is not the case in most quadratic integer rings. This webpage is limited to only display rings that do have unique factorization, which explains the gaps in the options.
about me
I am TheGrayCuber, a creator of mathematical websites and videos!
Growing up I wondered how prime factorizations could by applied to negatives, but I never found a good way to deal with -1, since it disappears when squared. Later, while reading Contemporary Abstract Algebra by Joseph A. Gallian, I learned about units and ideals. This was one of my most exciting mathematical moments! These concepts provide a great solution to the -1 issue, and they can generalize to define primes in many other systems, such as the quadratic integers.
These primes remain among my favorite topics in math. They are the perfect intersection of interesting theory and beautiful visualization. But more than that, I love them for my personal connection.
This was the first website that I ever made. It taught me a lot about development, and I still have the original version up today, even though it has a lot of issues. Also, the video series was a turning point for the channel. It was the first time that I planned a series and prioritized viewer experience, rather than info-dumping my latest math interest. Most importantly, it was purple, marking the start of COLORFUL videos! I've never turned back.
made with love, and without AI
leave a tip to support my future creations :)
view the code behind this website