 Suppose that R is a commutative ring with unity and let the elements R and S belong to this ring R. Then we say that D, also an element of R, is a common divisor of R and S if, of course, D divides R and D divides S. So it's a common divisor if D is a divisor of R and divisor of S. Okay, that makes sense. The next one, what does it mean to be a greatest common divisor? So D is the greatest common divisor of R and S. If D prime is some other common divisor of R and S, then D prime also divides D. So you're the greatest common divisor of every common divisor of DNS divides into U. And so we then denote the greatest common divisor of D as GCD of RS. Now I should mention that the greatest common divisor is only unique up to association because after all, if you have D as a common divisor, the greatest common divisor of R and S, and you take some associate of that, select D prime, well, in that situation, D prime will divide D and you'll have that D divides D prime. And since divisibility is transitive, anything that divides D will also divide D prime and everything divide D prime will divide D. So when we talk about greatest common divisors, we're really talking about it up to association. Now, you typically, you probably talked about common divisors and greatest common divisors in the rational domain, that is the ring of integers, in which case you typically talk about positive numbers in that sense. So when we talk about, for example, here's the number 12, here's the number 16, we say that the GCD of 12 and 16, we often say that's four. We really mean that's four is the association class. You could also say negative four, because as a divisor that works the same way as well. Now, when people first learn about greatest common divisors, they often think of the wrong ordering. They might think it's greatest in the sense that, oh, two is a common divisor, four is a common divisor of 12 and 16, but four is bigger than two. We're not talking about the ordering of the real numbers, we're talking about divisibility, right? Four is the biggest because it, because every other divisor divides it, every other common divisor, like one and two, for example, divide four. And that's why four and negative four are actually both considered GCDs, but for integers, of course, we typically choose the positive representation. And as we look at other domains where positive and negative doesn't quite make much sense anymore, like in the Gaussian integer ring, we still often choose sort of canonical representatives if it matters, but be aware that the GCD is unique up to association. So we say that two elements are relatively prime. So R and S are relatively prime or called co-prime if their GCD is equal to one. And of course, when I say the GCD is equal to one, I mean their GCD, their GCD is, well, the GCD is the class, right? Because it's up to association. Now, who is an associate of the number one? That's any unit, any unit is an associate of one. So if the GCD is a unit, that means you're co-prime and typically we represent that using one. Now, similar to common divisors, we can talk about common multiples. So we say a number M inside the ring is a common multiple of R and S if R divides M and S divides M. Notice the difference there. The common divisor divides both numbers, but the common multiple is divided by, it's divisible by both of those numbers. And similarly, we can define the notion of a least common multiple. The least common multiple means if you have any multiple M prime, then the least common multiple will divide that one as well. So it's smallest in the relationship of divisibility. And likewise, we will denote the least common multiple as LCM of R and S. This is unique up to association. Different associates are still LCMs. And again, like with integers, we typically choose this to be a positive number, but that's not required in other rings where that might not make a lot of sense. So I want to show you an example of where, how do we put it? GCDs don't necessarily exist, right? We're so used to the integer ring that we might not realize that in other integral domains, you might not have unique factorization, but you also might not have LCMs, you might not have GCDs. And so I actually want to come to this example right here of Z adjoining the square root of negative three. We played around with this example before and showed that this was an example of an integral domain that's not a unique factorization domain. And we also showed that in this ring, we have irreducible elements that are not primes. In an integral domain, primes are always irreducible, but you can have it be true that an irreducible is not prime. We found an example of that here. But of course, in a unique factorization domain, primes and irreducibles are the same things. So in a unique factorization domain, basically factorization works the way you expect it to, like it does with the integers. If you don't have unique factorization, weird things can happen, like irreducibles aren't prime. In this non-UFD, we'll also see that you might not have GCDs. And if you don't have GCDs, you also might not have LCMs as well. So their existence is also a property of UFDs, which we'll talk about in just a second. So consider the following. The number two divides four, and the number one plus the square root of negative three also divides four. We talked about this previously. Four, of course, factors has two times two. It also factors as one plus the square root of negative three times one minus the square root of negative three. This was the example we used earlier to show that this ring does not have unique factorization because these are different irreducible factorizations of the same number four, okay? So I want to point out here then that two and one plus square root of negative three, these are both divisors of four. But I also want you to consider the number two plus two times the square root of negative three. Two divides that. Well, that one's pretty easy to see because you can factor out the two. So you get two times one plus the square root of negative three. But by doing so, it also makes it obvious that one plus square root of negative three also divides that. So notice what's happening here. Two divides four. Two divides two plus two times square root of negative three. So two is a common divisor. But likewise, one plus the square root of negative three, it divides four and one plus the square root of negative three divides two plus two root of negative three. So these are two common divisors of four and two plus two root of negative three, okay? Like we argued in a previous video, but we can make the argument right here again. Two doesn't divide one plus root of negative three, nor does one plus root of negative three divide two. They're not associates of each other. The associates of two are plus or minus two and the associates of one plus root three, negative three are one or minus one plus root negative three. Because in this ring, the only units are plus or minus one. So they're not associates of each other. And I should also mention that these numbers have a norm of four, right? If we take the norm of two, this equals two squared plus three times zero squared. This is equal to four. Now on the other hand, if you take the norm of one plus the square root of negative three, you're gonna end up with one squared plus three times one squared, which is of course one plus three, which is likewise four. So they can't divide each other without being associates because norms factor and they have the exact same norm. So they only divide each other if and only if they are associates but they're not associates of each other, okay? So if there was a greatest common divisor, pretend there is one for a moment, call it D, then the greatest common divisor of four and two plus two root negative three, it's gonna be a number of the form A plus B root negative three because everything in our ring looks like that. But it can't be two and it can't be one plus the square root of negative three. But when we look at the norms, this is important to consider the following. It's also true that the greatest common divisor is not four. It's also not two plus two root negative three, okay? Because if the GCD was equal to four, that means four would divide two plus root square root of negative three there, which we have the same problem again, right? The norm of four in this situation is gonna be 16. But likewise, the norm of two plus two root negative three in this situation, you're gonna end up with two squared plus three times two squared. So you end up with four plus 12, which is equal to 16. Again, these same numbers four and two plus root negative three, they have the same norm. So the only way that four divides two plus two root negative three is if they're associates. But the associates of four are plus or minus four. Same thing going on with this direction. So they don't divide each other. So the greatest common divisor of four and two plus root square root of negative three has to be something smaller, but at the same time, it has to be the biggest one. So what we see here is the GCD is divisible by two. It's divisible by, excuse me, one plus root negative three, but it also divides four and it divides two plus two root negative three. The norm of two and the norm of this number were four. The norm of these ones are 16. So it's gotta sit somewhere in the middle. So in particular, the GCD, if it existed, would have to be a number whose norm is equal to eight. Eight is the only divisor of 16 that's divisible by four. That's not four or 16, right? So we have to have that the norm of D is equal to eight. So suppose that such a number exists, then that would have to be a number. There has to be a number in our ring. So this is something of the form, C plus D times square root of negative three. We'll call it E for a moment. There has to be some number so that D times E is equal to four because after all, we need that D divides four, right? If we take the norm of that, we're then gonna get the norm of the norm of D times the norm of E is equal to 16. Since the norm of D is equal to eight, that means the norm of E is equal to two. And like we talked about before, there is no way that the norm of such a number could be two because the norm always looks like A squared plus three B squared and there is no integer choice for A and B that allows this to equal two. So this has been proof that we don't have a GCD between four and two plus two times the square root of negative three, which is a very curious thing. GCDs might not exist in a general domain, much like irreducibles are not necessarily primes in a general domain. The two things are actually quite related to each other because I wanna then just make a quick argument here that in a UFD, GCDs exist. And likewise, LCMs exist. You can cook up a similar example, like in this ring here, four and two plus two root negative three, they don't have at least common multiple by basically the exact same problem here. But in a unique factorization domain, GCDs exist. And why do they exist? It's the same reason. It's the same algorithm I should say that you learned in primary school. So like if you're trying to find, what's the GCD between let's say 12 and 18? Well, the idea is look at the unique factorizations. Look at the prime factorizations, 12 factors as two squared times three, 18 factors as two times three squared. You look at all the common primes, so two and three are both in common. Then you pick the smallest power, the GCD is gonna then have to equal two to the first times three to the first. So 12 can only offer one three and 18 can only offer one two. So the GCDs can be six. You can derive it from the unique factorization, the prime factorization I should say. And so this algorithm works in any UFD because we have prime factorizations. Given the GCD between any two numbers that are not zero and not a unit, because those ones are exceptional, a unit divides everything. So if one of these is a unit, then the GCD is just the other number. Zero, of course, is weird because everything divides zero, all right? But if you'd have two numbers, which are not units and not zero inside of your ring, then that has a unique, it has a prime factorization. So the GCD is going to be, select all the common primes and then choose the smallest exponent amongst all of them. By similar reasoning, LCMs also exist because you're going to look at all the primes and look at the maximum power of each of the primes. And you can build them from that algorithm we learned back in primary school, which is pretty cool. And so that's going to end lecture 16 where we've talked about, of course, unique factorization domains and we've talked about factorizations and integral domains in general, right? If you want to talk about factorizations in an integral domain, a UFD is the place to be. Primes and irreducibles are the same things. We have prime factorizations. We have GCDs, we have LCMs. If you're in a domain but not a UFD, some of those things might fall apart, like of course, in this ring, Z times the square root of negative three. And we'll explore many of these ideas, of course, in the future. Thanks for watching. If you learned anything about factorization and ring theory like this video, like the other videos in lecture 16 as well, post it in the comments if you have any questions that weren't answered and please subscribe to the channel to see more videos like this in the future. Thanks everyone.