A large part of number theory is built around generalizing the machinery of number systems. That is, any structure that we could reasonably call "numbers". It seems that this category should be rather limited. After all, the four most well-known number systems, integers, rational numbers (fractions), real numbers, and complex numbers, are similar enough to each other that many people just think of them as a single system. Mathematically, any one from the list can be considered a substructure of the next one. Are there other number systems out there? And if so, are they different to the familiar ones in any significant ways?
It wasn't until the 18th century that mathematicians began to run into these new number systems, many of which were minimalist chimeras of integers, , and complex numbers, . More on that later. They had initially assumed that these number systems behaved like their parent systems, even leading a high-profile mathematician to a mistaken proof of Fermat's Last Theorem. Unfortunately, many hidden assumptions about how numbers behave weren't valid in these systems. Fortunately, this was ripe ground for generalizations that eventually led to abstract algebra and ring theory.
The approach taken by abstract algebra is to highlight the common properties of closed structures in mathematics.
Closure is a key property in structures like monoids and groups. Monoids are sets of objects with an intrinsic operation, some way of combining two elements together into another element. Closure ensures that this operation combines two elements in a way that their combination is also in the monoid. An easy example of a monoid is all the powers of 2: under the operation of multiplication. To see that it's closed, take two arbitrary elements and . Multiplying gives which is also in the monoid.
Groups add an additional constraint to monoids: not only does the operation have to be closed, but it also needs to be reversibe (equivalently, there are "inverse" elements). In a loose sense, this means that all the mathematics that takes place in a group stays isolated within that group. The same logic works for rings and fields, though now with a second operation.
Rings capture most of what we consider to be number systems. Take for example: this is just the set of integers (negative and positive whole numbers). Addition, subtraction, and multiplication of integers yields more integers, and addition of and multiplication by effectively do nothing. Both addition and multiplication are associative, and when they are mixed together they follow another ring requirement: the distributive property:
While rings formalize the general idea of a number system, they are general enough to include objects that wouldn't be considered typical numbers. An example is the ring of polynomials with integer coefficients , whose elements can be written as
Adding/subtracting polynomials to each other gives you another polynomial, and the same can be said for multiplication. In this ring, the and elements are exactly what you'd expect.
In the abstract, rings are considered groups over addition and monoids over multiplication. Being a group under addition means that the inverse operation, subtraction, is always defined. Being a monoid under multiplication, however, means that division isn't always defined. Some rings, such as , have enough structure to them that we can create fields, another ring-like structure which has division defined for every element. The procedure of turning a ring into a field is really simple: any two elements and from a ring correspond to an element its corresponding field. For example, the rational numbers are the field obtained from by this process.
This isn't always possible to do, though. An example is the ring of 2x2 matrices with integer entries:
This ring has all the ring properties, it has a "zero" element, a matrix of all 0's, and a "1" element, the 2x2 identity matrix. but it's impossible to create a field of elements with . This isn't because itself is impossible to construct, but that multiplication is no longer well-defined. To see why, multiply two elements and to get . If , then the product doesn't exist, violating the requirements to be a field. Two elements that have this property are
Not only is , but and , despite neither of the two being themselves. These elements, known as zero divisors, are what prevent the ring from ever being extended into a field. It's not just these two that are problematic, either, there are infinitely many zero divisors in . To distinguish rings like this one from rings like that have no zero divisors, we introduce a class of rings known as integral domains.
Integral domains are rings without zero divisors. As a result, they are integer-like in the sense that they can be extended to a field of fractions. The ring of polynomials from earlier, , is also an example of an integral domain. Its field of fractions is the field of rational functions. Since polynomials fit so well in with number systems might not be surprising: they can be thought of as representing indexed lists of numbers.
Before you get the sense that nothing interesting can really be happening between the jump from integral domain to field, let's lay out what mathematics in is actually like. Despite division not always being defined, divisibility can still be talked about. For example, 1, 2, and 3 divide 6. Any number can be written as a product of its divisors, such as . If a number only has 1 as a divisor, then it's known as a prime number. In general rings, this is known as a prime element instead. In , every number can be written uniquely as a product of primes; this is the fundamental theorem of arithmetic. In the example above, the unique factorization of into primes is .
Another key property of is the ability to efficiently find the greatest common divisor (GCD) of two numbers. This is simply a matter of finding all of the common prime factors between two numbers. The most straightforward approach is to simply factor both numbers to find the GCD. This turns out being very slow since factorization comes down to brute force (guessing). In , however, there is a shortcut known as the Euclidean algorithm. Only a subset of domains known as Euclidean domains have this property.
In , to find the GCD of and where , write for some and . There are many ways to do this, but forcing will always lead to just one. This is the same as "dividing" by to get a remainder . In the Euclidean algorithm, simply take and , where , and repeat this process (notice that is now in 's place and is now in 's place ). This will go on until reaching either or , where the algorithm stops. If it reaches , then . Otherwise, the algorithm returns with the from the last step. See above for an example.
Unique factorization and the existence of the Euclidean algorithm are both ancient theorems in number theory. However, they break down in some domains. To actually construct one, we can start with and add an element from , say to it. This means that we have a number system, , with elements
Not only is this a ring, but also an integral domain just as is. However, number theory in is different. For example, unique factorization no longer holds:
Domains with unique factorization are called UFDs. While is a UFD, isn't.
One consequence of unique factorization failing is that the Euclidean algorithm doesn't exist in this domain either. In fact, the existence of the Euclidean algorithm implies unique factorization (so all Euclidean domains are UFDs) even though unique factorization doesn't guarantee the Euclidean algorithm's existence. An example is , which is a UFD but not a Euclidean domain. The proof is here. In fact, are the only numbers which generate non-Euclidean UFDs in the same form as . This is deeply related to the following near-integer approximations:
In , the concept of a prime number also subtly breaks down to be replaced by the concept of an irreducible number (or atom). Primes and atoms both share the feature that they are only divisible by , but primes are defined by the additional property that whenever a prime divides , or , then either or . In the example above, are all irreducible, but none of them are prime.
To see why isn't prime, note that , but neither nor are true. This applies to the other three as well.
The distinction between prime and atomic elements doesn't exist in UFDs. In fact, they coincide in a slightly larger class of domains known as GCD domains, in which greatest common divisors always exist. The difference between UFD domains and GCD domains is small, but comes about from the fact that unique factorization always has to have finitely many factors. As a result, the ring of holomorphic functions is an example of a non-UFD GCD. First, it's an integral domain since two holomorphic functions cannot multiply to 0. The GCD between two functions can be defined as the zeroes they have in common, so it's a GCD domain. However, factorization of holomorphic functions is not always finite:
A different situation where prime numbers start to break down is in , but in a more literal sense. In this domain, is no longer prime since . are some other primes which break down in this domain. How can we know exactly what primes lost? An element in can be written as . Multiplying by its conjugate gives
So all the primes that are split are the ones that can be written as the sum of two squares. Fermat proved that this happens for a prime iff . However, this was in the context of classical number theory long before domains were known about. For a general domain , the primes that split are just those of the form .
Since , this should immediately imply that unique factorization breaks down. But it doesn't; thanks to the notion of a "unit," these two factorizations are actually the same. A unit of a ring is any element with an inverse. This makes it similar to the identity element, , in the sense that multiplication with units can be effectively ignored. In , the units are . The two factorizations, , can then be considered the same since they only differ by multiplication of units.
Since is a UFD, it has it's own set of prime numbers. Here's what they look like on the complex plane:
Just as above for primes, in the ring all units can be found from the solutions of . For example, the units in are generated by . The first nontrivial solution is or . You can take powers of this solution to find the others:
Without using binomial coefficients, the unit's components follow the recursion:
Another cool property is that the ratio approaches . Since and become larger as n grows, the equation can be approximated by
In general, finding the units of reduces to another problem from classical number theory: Pell's equation. This equation is also well-studied in classical number theory since it can generate rational approximations of square roots.