 So recall that an integral domain is a commutative ring with the unity with the property that there are no proper divisors of zeros. That last axiom could also be rewritten as the cancellation axiom. So integral domains are very important in the theory of commutative algebra. That is the theory of commutative rings with unity. In particular, integral domains are going to be the background for which we want to talk about factorization. In this video, we're going to define the notion of a unique factorization domain, often called UFD for short. The D stands for domain, so these are going to be integral domains, and so thus it's an integral domain for which we have unique factorization. What does that mean? Well, unique in mathematics is an important word because it means two things. Unique means at least one and it means at most one. So when we say there's a unique factorization, that means we have at least one factorization of every number inside of the domain, but then unique also comes back and says that there's only one factorization. So the axioms of a unique factorization domain are given as the following. So take a to be any number that's in the domain that's not a unit and is not zero. Units do not have unique factorizations, and zero also doesn't have a unique factorization, so be aware of that. Because zero has the problem that zero times anything is going to always equal zero, even if r doesn't equal s. So you can anticipate unique factorization there, but then even if you have a unit, for example, unit meaning that this is equal to one, well, the problem with a unit is you can just keep on adding more and more units into that product. So you can get something like, oh, this is u times u inverse times u u inverse, and you can tack on more and more units. So units are frustrating when it comes to factorization. Zero also is a big problem. So with regard to unique factorization, we're assuming that the non-units and the non-zero numbers are what's in consideration. So what's a factorization? These numbers, A, can be written as a product of irreducible elements from D. So we call that a factorization, a product of irreducibles, and that could be a lot of irreducibles. There could be two, there could be three, there could be 17, there could be 5,280 irreducibles. It depends on the number. Because multiplication is associative, it doesn't matter, it doesn't matter how many we have. And also because it's commutative, it really doesn't matter the order. We have this factorization. But that then leads, of course, to the second axiom here about uniqueness. So we have factorizations, why are they unique? Well, the idea here is if we have the number A, where A is again, it's a number in the domain that's not a unit, it's not zero, so it has a factorization, an irreducible factorization, a factorization of irreducibles, okay? So suppose we have two factorizations of A. So we have one of them where you have P1 times P2 all the way up to PR, and we have another one, Q1 times Q2 all the way up to QS. And so these are irreducible factorizations. Each of these factors, P1, P2 up to PR, those are irreducibles. And Q1, Q2 all the way up to QS, those are irreducibles. These are irreducible factorizations. So again, I also want to return to this idea of the units. Units can't have a product of irreducibles, right? Because if a unit was equal to a product of irreducibles, P and Q, well, since it is, since it is after all a unit, you could then factor this and show that, oh, this is equal to one, and then you'll end up with something like, well, U inverse times P times Q, well, this is equal to one. So, oh, Q in that situation would be a unit, units can't be irreducible, and irreducibles can't be units. And so that's why we don't expect irreducible factorizations for units. But in a UFD, every non-unit, non-zero element has a factorization. And if we have two different factorizations returning to that, then we can say the following. First, the number of factor, the number of irreducible factors in the two factorizations is the same. So R and S are the same number. And in particular, there's going to be a one-to-one correspondence between the P's and the Q's. And by this correspondence, let's call it P, where P of course is gonna be some permutation on R letter. So some permutation on the numbers one, two, three up to R. This permutation will associate P i to Q pi i, like so. But this connection is an association. That is the two numbers, the Q's and the P's that get connected to each other are associates to each other. So in essence, it's not a different factorization because if these two numbers are associates for each of the irreducibles in the two factors, really what it means is up to reordering and up to a unit, this is the same factorization. And so that's why we call it unique factorization. You can scramble up the order, you can throw a couple of units in there, but that's the only thing that can change. So of course, the most obvious example of this is the ring of integers. The ring of integers is a unique factorization domain. And this is a consequence of the so-called fundamental theorem of arithmetic. The fundamental theorem of arithmetic says exactly this, that integers, typically it's phrased with positive integers, but negative integers would have it as well. Every integer that's not zero and not a unit, which is just one and negative one, every other number has a unique factorization into what we usually call primes, but in the integer ring, primes and irreducibles are the same thing, right? Prime numbers are irreducibles in any integral domain. So we might say something like the following, like if you take the number 12, well, 12 can factor as two times two times three. Two, two and three are prime numbers, so they're irreducibles inside of the ring of integers. And so up to uniqueness, this is the only factorization. Now, of course I could write this as three times two times two, I could write this as two times three times two. Clearly the order of things, we're not considering that, but I can also do something like this is negative two times two times negative three. This is equal to, let's say, negative two times two, negative two times three, something like that. So notice that negative two and two are not the same number, but they are associates of each other. Two times negative one is negative two, they only differ by a unit, they're associates. So when it comes to factoring the number 12, well, yeah, you can scramble up the order of the primes, you can negate some of them, which is really just introducing a unit into the factorization. That's the only diversity you have. And when it comes to factorization, we don't consider those different factorizations. So up to reordering and up to units, these factorizations are in fact unique. So the integer ring is a unique factorization domain because of the fundamental theorem of arithmetic. Now, there will be other UFDs that we talk about in this lecture series. And so those UFDs will also have irreducible elements, those will also have prime numbers. And so to make sure we keep things clear, when we talk about the prime numbers of the integers, we will typically call those the rational primes. And the reason they're called rational primes is because of the field of fractions, the field of fractions for the integers, of course, is the rational field, the prime field of characters is zero. So the prime numbers inside the integer ring are rational numbers. And so those are the rational primes if we ever get confused with something else. Because after all, let's talk about another integral domain that we've talked about before. Let's talk about the Gaussian integers, z a join i. I claim that this is also a unique factorization domain, but that's not something I'm gonna prove in this video. We'll do this some other time, but let's just assume for a moment we have a unique factorization domain. We then might be interested in who are the irreducible elements of this ring? Who are the prime elements? Which of course we're gonna see shortly that in a unique factorization domain, irreducible elements and prime elements are actually the same thing. So what are the prime, what are the Gaussian primes? We might be interested in such a thing. And so a lot of what one does in algebraic number theory, really loves these things, unique factorization domains, principle ideal domains, Euclidean domains, Dedekind domains, a lot of these things are very important in algebraic number theory. How one often studies other integral domains besides the integers is often to use a norm of some kind, something that acts like the absolute value function. So we've introduced this before. So if you have a Gaussian integer z, then its norm is gonna be its complex conjugate for which remember the property here that if you have the product of two numbers, then the norm of those numbers factors, so the norm of z becomes the norm of u times the norm of v and we'll use that throughout. So that's why norms are very useful in this type of factorization situation because a norm is going to be a multiplicative homomorphism from the ring we are studying into the ring of integers. So we care about that. In particular, it's actually gonna map into the natural numbers because we can't get negative norms, okay? So previously when we first introduced the Gaussian integers, we proved the following statement that a number is a unit inside of the Gaussian integers if and only if its norm is equal to one, for which I should also point out that if you have a complex number a plus bi squared, then its norm is gonna be a squared, a squared plus b squared. That's what we're gonna get. And so this is the norm for these Gaussian integers. And so when you look at this equation here, how can a squared plus b squared equal one? Well, that happens if and only if a equals one, b equals zero or b equals one and a equals zero. I guess you can also have a good plus or minus. So a could be plus or minus one, b is zero or b is equal to plus or minus one and a is zero. So you get four units in the Gaussian integer ring. You get plus or minus one and plus or minus i. Each and every one of those has its norm equal to one. So we are able to classify all the units using this norm. Now by similar reasoning, if the modulus of a Gaussian integer is equal to a rational prime, that actually is gonna imply that is an irreducible number and irreducible element of the ring there. Sorry about the typo here. I had said a moment ago that if and only if and that reverse direction is not true. We'll talk about that one in just a second though. So let me first show you that if the modulus of a number is a rational prime, a Gaussian integer's rational prime, that actually makes it irreducible. So consider a factorization of your number z. So it factors into u times v. Well, then the norm of z, because this is a norm, it factors the norm of z becomes the norm of u times the norm of v. And then by assumption, this is equal to a prime number, a rational prime number, okay? But as this is a prime number and these are themselves integers, then the factorization must be, and I should also mention these are positive integers, okay? Then one of these numbers has to be one and the other one has to be p. So we either have that the norm of u equals one or the norm of v equals one. And like we said before, if the norm of a Gaussian integer is equal to one, that implies that that Gaussian integer is a unit, okay? So that means let's just assume u was the unit. So we have a trivial factorization of z as this was chosen to be an arbitrary factorization then we actually get that it must have been irreducible. So that's a very simple way of checking whether a Gaussian integer is irreducible or not. You can look at its norm. And so it turns out that in the ring of Gaussian integers, there are three types of Gaussian primes, three different families. And I just gonna list these three families, but this is just up to association, okay? So the first family, and don't worry about the jargon too much. This makes a lot more sense in algebraic number theory, but the first family is referred to as the ramified family. So you have something like one plus i. I want to point out to you that when you look at the norm of this, the norm of one plus i, this is equal to one squared plus one squared which is equal to two, which is a prime number in the rational sense. So one plus i is equal to a, it's equal to a Gaussian prime, okay? This would also include, this would also include things like one minus i, you're gonna get one minus plus i, and you're also gonna get minus one minus i, okay? These are all examples of these ramified primes, okay? Then there's also the inert primes, which these are gonna be primes, these are gonna be rational primes that are congruent to three mod four. In number theory, it's important to distinguish between odd primes, which are three mod four and two mod four. They behave differently for many reasons. And so the inert ones, we call them inert because these are, these are rational primes that stay prime numbers, even we extend the domain from the rational integers to the Gaussian integers. So this would include things of course, like three is such an example, seven is such an example, 11 is such an example, we can go on from there. So these are still gonna be prime numbers in the usual sense. So three is both a rational prime and a Gaussian prime. I wanna point out though, that if you take the norm of three, this is gonna become three squared, which is equal to nine. Nine is not a prime number. It's not a rational prime, but three is still Gaussian prime. So this is a counter example to what we saw above, that if the norm of a Gaussian integer is a rational prime, then it is a Gaussian prime, but it is possible to have Gaussian primes whose norms are composite numbers. So the inert family is such a counter example. That's why I had to fix that typo before. Sorry, I didn't detect it before it was on the screen. The third family is the split family. So these are gonna be complex numbers of the form a plus bi, such that a squared plus b squared, a squared plus b squared is equal to p, where p is a rational number, a rational prime, excuse me. Which of course notice, a squared plus b squared, this of course is equal to the norm of a plus bi. And so the norm is equal to a rational prime, like we argued before, those such a number necessarily has to be a Gaussian prime. And this p will of course happen only when p is congruent to one mod four. And so I actually wanna point out that this distinction about one mod four and three mod four has a lot to do with what is colloquially called Fair Ma's Christmas Theorem, right? This is the same Fair Ma as like in Fair Ma's Little Theorem, Fair Ma's Last Theorem. Fair Ma has a bad habit of getting theorems named after himself when he perhaps didn't necessarily prove them. So Fair Ma's Christmas Theorem tells us that an odd prime can be expressed as a sum of squares, such as in this situation right here, if and only if that number is one mod four. And so the sufficiency is actually pretty simple. And this was first proved by Gerard, Gerard in around 1625 or so. And so it's pretty clear the sufficiency in which case the proof, like I said, there's it's, I guess what I'm trying to say is if this equation happens, if p is a sum of squares, then you can argue that it's congruent to one mod four. I'm not gonna go through the details of it right now because I don't wanna make this argument too long but the basic idea is that since p is an odd number, a, one of these numbers, you have some two numbers here that add an add to an odd number, one of them's odd, one of them's even. Let's say that, let's say that b is even and let's say this one's odd. If you take an odd number and you square it, you're gonna end up with, so an odd number like two k plus one, if you square it, you're gonna end up with four k squared plus four k plus one and then b is an even number, so two l squared is equal to four l squared, like so. And so when you mod out by four, you end up with just one. So I guess I proved it. I said I wasn't going to, so that's an official JK everyone. So Jard had proven that direction, that if a prime is a sum of squares and it's one mod four are in the, around 1625 or so. So the name, where does Fairmont come from? Where does Christmas get involved in this? Necessity, which is the other way around, that if a prime is one mod four, that it can be expressed as a sum of squares. Well, the history behind that is that Fairmont wrote a letter to Merciin on, of course, on Christmas Day, 1640. So that's what, you know, mathematicians, I guess, do on Christmas. They write each other about prime numbers and such. So about two, so about two decades later, Fairmont writes to Merciin. So this is as in the Merciin primes, right? Same dude. He writes to him, and this is where the name of Fairmont's Christmas theorem comes from, for which he then expresses, he claims that this statement is true, that the necessity is true. So like I said, Fairmont has the bad habit of claiming many results without proof. The first proof, the first known proof, I should say, of the full Christmas theorem here, both necessity and sufficiency. Again, sufficiency was due to Gerard much earlier, but necessity, actually, the first known proof was actually due to Euler, for which Euler proved it in 1752. So it's again, very unlikely that Fairmont had a legitimate proof of this. So it's just interesting to bring this topic up, because the way that the prime numbers work for the Gaussian integers is very different than it works for the rational integers. For example, the number two is no longer a prime number in the Gaussian ring, because for the Gaussian integers, it factors as one plus i times one minus i, where both one plus i and one minus i are ramified Gaussian primes. So two is actually composite Gaussian integer, but it's a prime rational integer. Same thing with the split ones. The split ones, so if we take an example of this one, let's take 13, for example, right? 13 is one minus four. So I should be able to write 13 as a sum of squares, right? It's the same thing as nine plus four, okay? Nine squared is, of course, nine is three squared. Two squared gives me four, like so. So that then gives me a factorization. I can take this as three plus two i times three minus two i, like so, for which if you foil that out, you'll end up with 13. Neither of these are units because their norm is actually 13. So neither of these are units. They're in fact actually Gaussian primes, split primes. And so factorization over Gaussian integers is a little bit different than factorization over rational integers, because who's a prime and who's not kind of changes. This is sort of like the idea of split. These one mod four primes split the rational primes. They split into a factorization, something like this.