 Hello and welcome to a screencast on properties of relations. In the last two videos we introduced relations and described them as either sets of ordered pairs or as directed graphs. Relations are defined such that there are not many rules that they have to follow and so relations can look like a lot of different things. What we're going to focus on in this video are three specific patterns of behavior that relations can have that turn out to be particularly useful. So to begin let's look at an example that's similar to one we saw in an earlier video. Let D be the relation on the set of all natural numbers defined by AB is in D if and only if A divides B. So again this is a relation on the set of natural numbers because it's simply a collection of ordered pairs from N cross N. So what are some of these points in N? Well any ordered pair where the first coordinate divides the second one will work like 5 comma 15 or 8 comma 32. Now what I want to point out about this relation is that 5 comma 5 is also in the relation because 5 divides itself and 8 comma 8 is in the relation because 8 divides itself as well. So in fact since we're looking at the set of natural numbers and that excludes the number 0, every natural number in the set is going to divide itself and so the pair A comma A is in that relation for every A in the natural numbers. So this kind of self referencing behavior here does not happen for all relations. For example in the sitting next to relation from the last video where we had the seating chart, it's not the case that for each student X in the class X comma X is in the relation. In fact this actually never happens because a student by just plain physical reality cannot sit next to himself. Likewise in most social networks which were our first example of relations you can't friend yourself or follow yourself. So a relation in which every point in the set is related to itself is kind of special and so we're going to make this definition. We're going to say that a relation R on a set A is reflexive if A comma A belongs to R for every A in the set A. So a reflexive relation in other words is one in which every point is related to itself. So let's check your understanding of that with a quick concept check. There are a number of relations on the set of real numbers. Which of these is or are reflexive? So select all that apply and come back to the video when you're ready. The ones on this list that are reflexive are the second two, the less than or equal to relation and the equals relation. It's easy to see why. Every number X is less than or equal to itself and certainly every number X is equal to itself. So that makes them reflexive. As for why the other two are not reflexive, if you look at the first one, pretty clearly no number X is strictly less than itself. And with the rounding relation here and the fourth option, some numbers will be related to themselves. For example, 5 comma 5 is in that relation because 5 rounds up to itself. But not all real numbers do this. For example, 4.2 comma 4.2 would not be in this relation because 4.2 does not round to 4.2. It rounds up to 5. Some relations are reflexive and some aren't. And in order to be reflexive, every point in the set must be related to itself. Here's another property that a relation may have. Going back to the sitting next to your relation, you may have noticed a pattern that if student X sits next to student Y, then you can just as well say that student Y sits next to student X. So in this case, the relation automatically goes both ways. This is a behavior that is also not always the case for every relation. For example, in the social network follows relation, it's definitely the case that if one person follows another, that the other person does not always follow the first. And this is how it works on some real-life social networks like Twitter. For example, millions of people follow Justin Bieber, but certainly he doesn't follow everyone back. Now on the other hand, some other social networks like Facebook do require that if one person follows or friends another, that the other person has to friend them back. So connections in that social network are forced to go in both directions. That makes the behavior of Twitter very different from the behavior of Facebook. So this mutual connection sort of property here is important, and it actually means something in real life. That is, insofar as you can say that social networks are real life. So we have a name and a definition for this mutual connection property too. We say that a relation R on a set A is symmetric if, for each A, B in the set A, if A, B is an R, then B, A is an R. So for example, the sitting next to a relation is symmetric, but the social network connection relation is not. Some people have mutual or reciprocal connections, but not all of them. So here's another concept check to gauge your understanding of this idea. Going back to the same list of four relations on the real numbers we saw in the last concept check, which of these are symmetric relations? So the answer here is just the equality relation. Pretty clearly if x and y are real numbers and x, y belongs to this relation, it means that x equals y, and of course y would equal x if that's the case. So if x, y is in the relation, then y, x must also be. But none of the others are. For example, in either the first or second relations, 2, 5 belongs to that relation because 2 is less than 5 or 2 is less than or equal to 5. But obviously 5 is not less than 2. And as for the fourth relation, 4.2, 5 is in the round relation, but 5, 4.2 is not. So those three relations are not symmetric. One last property that a relation may have that we'll consider here has to do with connections among three different points in a set. Let's go back to the divisibility relation from earlier, which was a relation on the set of natural numbers where a was related to b if and only if a divides b. In that relation, let's suppose I had two numbers that were related, say a, 32. Now 32 is itself related to other numbers. For example, 32 is related to 256 because 32 divides 256. It goes 8 times without a remainder. Now since 8 divides 32 and 32 divides 256, it follows that 8 divides 256. So the pair 8, 256 also belongs to this relation. In fact, from what we know about divisibility, this works for all natural numbers. If a divides b and b divides c, then a divides c. That was a divisibility theorem we saw very early on in this course. So this kind of behavior, again, is not something all relations have. For example, take the sitting next to relation with the seating chart again. If student x sits next to student y, and student y sits next to student z, that does not automatically mean x sits next to z. In fact, that almost never happens. And in the social network example, if a follows b and b follows c, then a does not automatically follow c. Although your social network might alert a that c could be a person they might like to follow because they have this mutual third party connection. But that relationship is not automatic. So here's the formal definition for what's happening here. We will call a relation r on a set a transitive if for all a, b, and c in the set a. If a, b is in r, and b, c is in r, then a, c is in r. Now this fits the behavior of the divides relation. So that relation is transitive. But the sits next to your relation is not transitive. And neither is the social network connection relation. So here's another concept check for you. And let's take the same four relations as above. And ask which ones of these are transitive. So select all the deploy and come back when you're ready. So this time all of these relations are transitive. For the first two if a, b is in the relation and b, c is in the relation. That means that a is less than b, and b is less than c, or perhaps less than or equal to b, or b is less than or equal to c if you're looking at the relation in number two. And we know from basic arithmetic that a is less than c in that case. Certainly for the equals relation if x equals y and y equals z, we know from basic arithmetic that x equals z. That equality relation is also transitive. Now the rounding relation takes a little more thought. Notice that the definition of transitive uses a conditional statement. So let's suppose the hypothesis of that statement is satisfied. That means I have three real numbers, x, y, and z, such that x comma y is in the relation and so is y comma z. So that would mean that I know that x rounds up to y and y rounds up to z. Well, if x rounds up to y, that implies that y has to be an integer. And if y is an integer, then y must round to itself. So that would force y and z to be equal. So that would mean that x rounds to z. And so x comma z is in the relation. Therefore, the round relation is transitive. Notice something important here about transitivity and symmetry. Both of these properties are defined in terms of conditional statements. So if you want to prove that a relation has one or both of these properties, you're going to end up having to prove a conditional statement. And we've seen many, many ways of doing that. So before we go, let's just point out that none of these properties really depends on the others. So far we've seen examples of relations that are reflexive, symmetric, and transitive, like divisibility on the natural numbers and equality on the real numbers. We've seen relations that are symmetric, but neither reflexive nor transitive. The sits next to relation is a good example of that. We've seen relations that are reflexive and transitive, but not symmetric, like the less than or equal to relation. And we've seen relations that are transitive, but neither reflexive nor symmetric, like the strictly less than relation. And in fact, you can create examples of relations on sets that have one of these properties, but not the other two, or two of them, but not the remaining one, or actually none of them at all. And you should try doing that on your own. In the next video, we're going to focus on relations that have all three of these properties, which turn out especially nice. So stay tuned.