 Welcome back to another screencast about properties of relations. In this video we're going to focus on relations that have all three of the properties we introduced in the last video. Let's look at an example that will carry forward in this and into future videos. So let's define a relation called D on the set R of real numbers as follows. We're going to say x, y belongs to D if x and y have the same decimal expansion. By decimal expansion, I mean the digits to the right of the decimal point. So for example, 3.4, 6.4 belongs to D, so does 9.11 and negative 12.11. So does 1 third and 4 thirds because the decimal expansion for each of those is 0.333 repeating. So does 5,8 because the decimal expansion of an integer is just 0.0. So let's check informally to see if this relation satisfies all three of our important properties from last time. Well clearly this relation is reflexive because every real number must have the same decimal expansion as itself. So for all x in the real numbers, the pair x, x belongs to D. Now let's check symmetry. Let's suppose that x, y is in D. That means that x and y have the same decimal expansion. But then y and x will have the same decimal expansion. It doesn't matter in this case the order in which we refer to the real numbers. So y, x is in D. That makes the relation symmetric. Finally, let's check transitivity. So we're going to suppose that x, y, and y, z are in D. That means that x and y have the same decimal expansion, and so do y and z. Therefore, if we wrote x, y, and z out as decimals, the string of digits here on the right hand side of the decimal point, even if it's infinite and non-repeating, will be the same for x as it is for y, and the same for y as it is for z. And therefore, the decimal expansions for x and z are the same. Therefore, x, z belongs to D. So this is a relation that is reflexive, symmetric, and transitive. And through concept checks, we've seen other relations that are reflexive, symmetric, and transitive, the most important one and maybe the most obvious one being the relation of equality to say that two real numbers are related to each other if and only if they're equal. So relations that satisfy all three of the properties of reflexivity, symmetry, and transitivity indicate a very high level of similarity or equivalence among the items that are related. More similarity then say if we just wanted one number to be less than another. So as with all seemingly important ideas, let's define this formally. We're going to call a relation that is reflexive, symmetric, and transitive, and equivalence relation. If r is an equivalence relation and ab belongs to r, we will sometimes write a tilde b or refer to the relation just as tilde. It's almost like writing that a and b are equal. Of course, in any given situation, a and b may not literally be equal, as was the case with our decimal expansion relation above. But they are equivalent under the terms of the equivalence relation. So let's look at another example. Let's let w be the set of all words in the English language and place a relation r on w by saying that two words w1 and w2 belong to the relation if and only if w1 rhymes with w2. So for example, the pair cat, hat, is in r. Or as we might not take this now, cat tilde hat. That means that cat and hat are related. We should check that this is an equivalence relation first. This is very easy to do. This is a reflexive relation because every word rhymes with itself. It's a symmetrical relation because if word one rhymes with word two, then the rhyming also works in the reverse order. Word two rhymes with word one. And it's a transitive relation because if word one rhymes with word two and word two rhymes with word three, then word one also rhymes with word three. For example, cat rhymes with hat, hat rhymes with bat. And we can see that cat rhymes with bat. That's not a proof, but it is a good demonstration of why transitivity works in this context. Here's a very important example of an equivalence relation that will be the focus of several upcoming videos. We're going to define a relation tilde on the set z of all integers by saying that a is equivalent to b if and only if a is congruent to b modulo five. So for example, one is equivalent to six and zero is equivalent to 20. Now we have a past theorem that shows us that congruence mod five is actually an equivalence relation. In fact, theorem 3.30 in the Sunstrom textbook gives us a proof that congruence modulo n for any natural number n has all three of the properties that we seek in an equivalence relation, reflexivity, symmetry, and transitivity. And you can read the proof of this theorem for an example of how to rigorously prove that these properties hold. So let's end here with a concept check that will take a little bit of time to debrief. Which of the following relations on the real numbers is an equivalence relation? For each one here, I've listed the set of points that are being related and then the relation itself. So select all that apply and come back when you're ready. So the answer here is just a and c. Those are the only two equivalence relations. All four are legitimate relations, but only the first and third one are equivalence relations. Let's deal with the non-equivalence relations first and see why they aren't equivalence relations. Well, the one in b is not an equivalence relation, because it's not reflexive. If you take a real number x, then x is not related to itself, because x minus x is not equal to two, it's equal to zero. That alone makes this not an equivalence relation. But in fact, this relation also fails both symmetry and transitivity. And you can check those easily on your own and you should do that. The relation in d here, we've already seen, does satisfy reflexivity and transitivity, but it's not symmetric. For example, four and five are related under this relation, but four and five and four are not related. Now, the relation in a is an equivalence relation because it's actually a well-known relation once you scratch the surface of it. Note that if ab belongs to this relation, that is that a is related to b. That means that a minus b is equal to zero. But that just means that a equals b. So the relation here in a is just a fancy way of expressing the relation of equality on real numbers. And we know from basic arithmetic axioms that that relationship is reflexive, symmetric, and transitive. So let's focus in on the relation in C and let's look at a proof that this is an equivalence relation. So what we're going to prove is that this relation, which we're gonna call tilde here, is reflexive, symmetric, and transitive. That means we're going to construct a three-part proof. So once again, what we're going to do here is I have a relation that I've placed on the set of all real numbers, namely by declaring that a is related to b, if and only if a minus b is a rational number. And what I'd like to prove is that this is an equivalence relation, and it satisfies the reflexive, symmetric, and transitive properties. Before we dive into a proof here, let's play around with a problem a little bit just over here on the margins. Let's think about what are some numbers that are related to each other. All we have to have here is that a minus b is rational. So for example, any two integers are going to be related. For example, 3 and 5 are related because 3 minus 5 is negative 2. And that's of course a rational number. You could also have something like 3.1 being related to 5.9, because 3.1 minus 5.9 is a rational number. You don't need to figure out what it actually is. We just need to know whether it's rational or not. And even things like radical 2 minus itself or would be related to itself because radical 2 minus radical 2 would be 0. So that's a rational number, of course, that's an integer. So radical 2 is related to itself. So when we have a sense that what it means for this relation to work here, let's move on into the proof. Now this last example right here could give you an insight as to why reflexivity is going to work. I'll just leave it with that R for reflexive. What does it mean to prove that a relation is reflexive? Well, I need to show that for every real number x, that x is related to itself. So this is a universally quantified statement. Let's choose an element here. So I'm going to let x belong to the real numbers, just any old real number. And I want to show that x is related to itself. And again, in context that means that x minus x would be rational. This is kind of obvious once you start thinking about it. x minus x is, in fact, not only rational, it's equal to 0, okay? So that's an integer, so therefore it's rational. And that proves that part of the theorem. So this is definitely a reflexive relation because every real number is related to itself. Now let's move on to symmetry here. Symmetry and transitivity, unlike the reflexive property, are defined by conditional statements. So it's really important in this proof to understand what you're going to assume and what you're going to show. This is just a conditional statement. It's not really unlike any other conditional statement you've ever proven. It's got an if part and a then part. So in symmetry, the hypothesis of the statement that defines symmetry says that we need to assume that we have two real numbers, x and y, such that x is equivalent to y. So let's start there. We're going to let or assume that x, y are real numbers such that x is equivalent to y. Again, we have a sense of what that means in context up here in the definition, but we won't go there just yet. And now let's identify what we want to prove. We want to prove or show that y is equivalent to x, okay? So what does this all mean in context? Well, if x is equivalent to y, it means that x minus y is a rational number. And I want to prove that y is equivalent to x. That means that y minus x, the reverse order of the subtraction is a rational number. So let's work with this. So since x is equivalent to y, okay, again in context, I know that x minus y is a rational number. And let's just call it something. Let's just call it r, okay, that's a rational number. So I know that I could take r and rewrite it as a fraction of two integers with the denominator non-zero and written in lowest form. But I actually don't need to go that far. I'm just going to say that x minus y is a rational number called r. Then what's y minus x? Well, let's take a look at this. Well, y minus x, okay, well, that's obviously negative x minus y. And that's a simple arithmetic fact. And x minus y, and the parentheses there is r. So what I have here is that y minus x is equal to minus r, where r was the difference between x and y. Now, this is going to be a rational number two by closure, okay? The rational numbers are closed under multiplication. And so what I've done here is I've taken a rational number r and multiply it by another rational number, namely negative one. And so the product of those two things must also be rational. Therefore, I can say with confidence that y minus x is rational. And so y is equivalent to x. If x is equivalent to y, then y is equivalent to x. And that ends this portion of the proof. So I know now that this relation tilde is symmetric. Now let's move on to transitivity and to see how that works. Now for transitivity, we have another conditional statement. And the hypothesis of that conditional statement tells us that we need to assume that x, y, and z are real numbers such that, I'll abbreviate that st for such that, such that x is related to y and y is related to z. That's what I get to assume in this proof here. I want to prove or show that x is equivalent to z. That's what transitivity means. Now again, all these equivalence statements here mean something in context. But just let's write out what exactly it is we're assuming and what we're trying to prove. There's our assumption, there's what we want to show. Now let's rewrite what this means. So since x is equivalent to y and y is equivalent to z, what that means here is that x minus y is equal to some rational number. I'll call r1. And y minus z is equal to some other potentially different rational number which I'll call r2. Okay, so those two differences are rational. And just for clarity, I'm going to just restate what I want to show. I want to show that x minus z is some other rational number, okay? Now since I'm trying to show something about x minus z, let's just start by writing x minus z and see what we can do with it. Well, I'm looking at what I know. What can I do with x minus z? I don't know, but I do know something about x minus y. And I know something about y minus z. And you know what? If you added these two things together, notice what you get. x minus y plus y minus z, that would be x minus z, wouldn't it? So I could rewrite this as x minus y plus y minus z. Let's do a little switcheroo here in the middle. And this is certainly equal to x minus z, just by canceling the y's. But what's important is that now I can drag in my assumptions here. x minus y is equal to some rational number r1. And y minus z is equal to some rational number r2. Now, by closure of the closure of the set of rational numbers under addition, r1 plus r2 is also a rational number. So what does this tell me? This tells me that x minus z is a rational number. Well, that's pretty nice, because that's what I wanted to show. So x minus z belongs to the rational numbers. And so hence, x is equivalent to z. And that's what I really wanted to show all the way back up. Where was it right here? Prove that x is equivalent to z. And so that ends that part of the proof, and that ends the entire proof here. Because now I've shown that my relation tilde is reflexive. Here we go. Reflexive, symmetric, and transitive, okay? So this is just a three part proof. The second two parts of this proof involve conditional statements. And so this is our bread and butter for the course. Just make sure that you are very clear about what you're assuming and very clear about what you're trying to prove. And a lot of these proofs will take care of themselves. And make sure you know your definitions, of course, too. Thanks for watching.