 Welcome back to our lecture series, Math 3120, Transition to Advanced Mathematics for Student Sets at the Utah University. As usual, I'll be your professor today, Dr. Andrew Misseldine. In lecture six, we're gonna begin this video by talking about the notion of a Cartesian product. This will be a very important operation one can do with sets and will eventually lead to the construction of what we call functions. But before we can define the Cartesian product, there's a little bit we have to talk about first. And in this lecture series, we've talked on more than one occasion that just because you have a collection of objects doesn't necessarily make it a set. There are some specific things that make it a set. What we're actually gonna start off with before we talk about the Cartesian product of sets is actually talk about the notion of a list. And so in mathematics, a list, which sometimes it's referred to as an array, particularly like in a computer programming setting, the notion of a list that we're gonna talk about right now is exactly what a computer programmer would refer to as an array. Sometimes it's called a tuple, an intuple, which would be like a triple or quadruple or something like that. This is just meant to be the generalization of that. Anyways, a list is an ordered collection of elements. So unlike a set where order doesn't matter, a list is in fact an ordered collection where the order matters. So there is a first element and a second element and a third element, et cetera, et cetera, et cetera. Now to help us keep a difference in mind for sets versus list, we will continue to use the curly braces to denote sets. But when we're talking about a list, we actually will use parentheses, left and right parentheses to denote that there is a list in play here. So with a set, if you see the curly braces, the order in which you list the elements doesn't matter whatsoever. But for our list, the order does matter a lot. Okay, it defines the list. And we'll look at some examples of this in just a second. Much like sets, it is possible that two lists are equal, but for two sets to be equal, they just have to contain the exact same elements because again, order repetition doesn't matter. And so for two sets to be equal, they have to be subsets of each other. For list, we have to require more because there's more structure on a list because they are ordered collections after all. Two lists are said to be equal if they have the exact same entries in exactly the same position. So if we stop right here, this is just what it means for two sets to be equal. They have the exact same elements. But no, they have to show up in the exact same positions as well, all right? If we wanted to talk about how many elements belong to a set, we would to talk about its cardinality. For a list, we have the exact same idea, but typically it's referred to as the length of the list. And we use the same notation that we did for sets. So you put the vertical lines left and right of the set that would give its cardinality for a list. It's the same notion, how many things are in the list, but we just call it the length, okay? So we already mentioned that we'll use curly braces to denote sets and we'll use parentheses to denote list. If you have a list of length two, this is referred to as an ordered pair. An ordered pair, of course, would just be two elements, but there is a first element and a second element. In this case, you have an A and you have a B. And so let's compare and contrast this notion of a set versus a list a little bit more here. When it comes to sets, if you take the pair, notice how it's not an ordered pair here, it's just a pair of two elements. If you take the set of the pair one and two, this is identical to the set two and one. The order in which you list the two elements makes no bit of difference whatsoever. But with regard to the ordered pairs, one, two and two, one are, in fact, distinguishable. They're not the same list, even though the underlying set of elements are equal to each other. That's the important thing to remember about list. The order matters. If you have a pair and you switch the elements around, that gives you a different ordered pair. And so when you're thinking about sets, we, again, we've talked about this before in previous videos here, the set one, one, two is the same thing as the set one, two, one, which is the same as two, one, one, which is the same as one, two. Because in a set, the order of the elements doesn't matter. And every time an element's repeated, you just ignore the repetitions. So each of these sets is just the same thing as one, two. In this case, it's a two, one, but again, the order doesn't matter. I need to emphasize though, that for a list, the corresponding list of each of these four sets, I mean, it's only one set, but four representations is the same set. For a list, they're all distinct. So like if you look at the list, one, one, two, that is a different list than one, two, one. And that's because while they do have the same elements with the same multiplicities, they do show up in different spots. Like if you consider the second position in these lists, for one list, the second position is a one. For the other list, the second position is a two. And therefore that makes them different ordered triples. Same thing here. If you compare these two lists, if you look at the first position, the first one has a one, the second one has a two. That makes them different lists. And if you compare these ones as well, same thing going on there. Their first positions disagree with each other, so they make different lists. Even if they have the same elements with the same repetition, if they show up in different orders, the list are distinct. That is the defining characteristic of a list. They are ordered. The way you put them on the list makes a difference. And then also, if you compare something like the following, the list one, one, two versus the list one, two. Now you'll notice in both of these situations, all of the ones come before the two, but there's only one one in the second one. And there's two ones in the first one. And that makes a bit of a difference because when you look at this, this has a one in the second position. This has a two in the second position. That makes them distinct. But even if you were to compare these two right here, sure, they both have a one in the first position. They both have a two in the second position, but they disagree on the third position. This one has a one in the third position. This one has nothing because it's only length two. And so that also makes them different lists because they disagree on what's happened on the third position. One omitted it, one has a one. And so a list, two lists can only be equal if they have the same length, but even if they have the same length, it's a lot harder for a list to be in agreement with each other. Like we said before, the list, the order pair one, two and two one are different from each other because order matters. And because the order matters, repetition actually is a possibility now when we consider list. And length is also significant. Like we mentioned before, here's another example of it. If you take the order pair one one the order triple one, one, one even though they have all the same amount of ones because they disagree on the third position, one has something in the third position which happens to be a one and the other has nothing in the third position that makes it an order pair. They will disagree for that reason. So these are lists. They are different from sets, but you can see there is a relationship to them, right? Every list affords a set where if you forget the order and would have to necessarily forget the repetition as well. So all five of these lists have the same underlying set of elements but we've added more structure to the set because we allow for order and repetition now. This concept of a list will be extremely important to us when we start studying common torques in this lecture series. That is when we start learning about counting, the mathematics of counting things. The lists are very, very important tool when we look at those things. And we'll return to this later in the lecture series but we want to introduce it now because the notion of an ordered pair is exactly what leads itself to the Cartesian product which we talk about right now. So the Cartesian product is an operation we do on sets. So if you have two sets A and B then we can define a new set for which that set is typically denoted A and B and then there's this X in between them. The X is just to think of times because like in grade school when we first learned about multiplication we used to put an X to represent multiplication. As one starts studying algebra one typically moves away from that because as you use the variable X often the cross here kind of looks like an X and it can be confusing but nonetheless for a Cartesian product this is the symbol we used to denote it. The Cartesian product course named after Renee Descartes the famous French philosopher and mathematician. Descartes was of course famous for essentially inventing what we now call analytic geometry or we could say coordinate geometry. And so the Cartesian product is named after Descartes because essentially that's what we're doing instead of having coordinates in the plane X and Y we're generalizing this principle for which we have any set cross any set. And so the Cartesian product X or A times B is then the set of ordered pairs. So we can see its definition right here. A cross B is the set of ordered pairs A and B where the first entry comes from the first set and the second entry comes from the second set. Now in this set builder notation the first entry, the first coordinate A is allowed to range over all the elements of the first set A. And likewise the second entry which in this case we're calling it B it's allowed to range over all of the entries all the elements of the second set. So this Cartesian product gives us a lot of ordered pairs. Let's look at some examples here. So let's take the set A where it contains two elements we're gonna call those elements X and Y and then we're gonna consider the second set B to be the set one, two, three and so X and Y, they might be numbers one, two, three they could be other things, I don't know we'll just have these symbols X and Y it won't make much of a difference. Let's then consider the Cartesian product A cross B, okay? So what we're gonna do is we're gonna form every possible ordered pair using for the first coordinate something from capital A and for the second coordinate something from capital B. And so we could list the elements in the following manner we could think, okay, I'm gonna let the first coordinate be X and then I'm gonna consider every element of B. So that would give us an X comma one, an X comma two and an X comma three. There are three elements in B and so with the first coordinate fixed at X we then got all the possible values for B right there. Then we're like, okay, now that X is done let's look at all the possible ordered pairs that use Y for its first coordinate. Well, and then if you'll have the second coordinate vary you would get Y comma one, Y comma two, Y comma three. And so you get these six elements as now illustrated on the screen. Now, if we were to rewrite so these are the six elements that belong to the Cartesian product those are the six possible ordered pairs to give some explanation why it's referred to as a product you can actually rewrite the strategy we explained a moment ago in this tabular format where we think of we're gonna put the first set here vertically and then we're gonna put the second set here horizontally or if you wanna switch it around you can do that too. This configuration fits better on the screen for us. So all the elements of A show up right here all the elements of B show up right here and then every ordered pair is essentially formed by looking at intersections of horizontal lines with vertical lines, right? So if you take the horizontal line associated to X and the vertical line associated to one they intersect and their intersection represents the ordered pair X one where X and two intersect we place the ordered pair X comma two where X and three intersect we put the ordered pair X and three. Similarly, if we take the horizontal line associated to Y and the vertical line associated to one we get the ordered pair Y comma one when you take two and Y you get Y comma two and when you take three and Y you get Y comma three and so each and every one of these ordered pairs coincides with those possible combinations. And then this table itself has this very natural tabular format, okay? For which we have two elements in the first set and we have three elements in the second set and notice we end up with six elements total. When you think of it in terms of area it's like, oh, you have a rectangle whose length is two and whose width is three the area would then be six and hence we are justified in referring to this as a product of sets because in many ways it behaves like a product because of these analogies compared to area. And I will leave it as a proof to the viewer here could one prove the following proposition if a set A has a finite or a finite carnality of N and if B has a finite carnality of M then it's true that the carnality of the Cartesian product A times B is exactly N times M. That is to say the Cartesian products carnality will be the product of the carnalities of the two set involves. It's basically generalizing this argument right here. Now there is one very important example because honestly computing Cartesian products is not much more complicated than what we see right here but one special case I do wanna mention is what if one of the sets is empty in regard to a Cartesian product like if we take A cross C in the situation where A has its usual meaning from before it's just the set of X and Y but C is the empty set. Well in that situation you have to look for all ordered pairs for which the first entry is an X or a Y but the second entry there's nothing available to place in there so you actually can't form a ordered pair because there's nothing to offer for the second entry. So if you take the Cartesian product of two sets and one of those sets is empty then the product itself is gonna be the empty set. So if you think of the empty set sort of as like the zero set because after all its carnality is zero then the Cartesian product is likewise quote unquote zero. So again it behaves like a product in that regard hence the justification of the name. This also is an agreement with the proposition right here in the second case if the set has carnality of zero then the product N times zero will likewise equal zero and this is an agreement of that the empty sets the only set of carnality zero. Now I wanna do just three more examples of Cartesian products and I want to actually make these ones more illustrated. So consider the set R cross R where this of course is the real numbers. So basically we wanna look at the real plane like we would in analytic geometry just like Descartes had begun right? This is a nice place to look at because Cartesian products actually then become sets of coordinate points in the plane and so we can visualize the Cartesian products that can help us internalize this a little bit better. So what if we take the Cartesian product of a interval by an interval? And so for lack of better choice let's take the interval one comma two for the domain that is the X coordinates and for the Y coordinates we're gonna take the interval negative one comma one. All right, so if we were to list the Cartesian product here let's call this A cross B we would be getting a lot of points. So we would get things like one comma negative one we would be getting things like one comma one we would get two comma negative one and we get two comma one which would include these four points right here in the plane. I do put dot, dot, dots here because there's a lot more. I mean, each of these sets is infinite themselves and so the Cartesian product will likewise be infinite. I can't draw all of them but as you look at every possible point between if you take any number between one and two and any number between negative one and one and look at all the possible ordered pairs you're actually gonna grab every point illustrated here in this rectangle. So again, this further suggests what we were talking about in the table earlier when we had finite sets. These intervals which geometrically we call them intervals because they are line segments in the plane the Cartesian product is actually a rectangle. It's the rectangle which goes from one two along the horizontal and it goes from negative one to one along the vertical. So the Cartesian product of two line segments is in fact a rectangle. All right, much like we were alluding to on the previous slide. Let's look at some cases where the area might actually be infinite for or maybe not the measure of the sets could be infinite, let's say it that way. And in other words, let's consider an example where we take the real numbers across the integers. So this first set is just the usual real line and let's if we take r cross r you'll actually notice that we defined without even mentioning we defined the coordinate plane using a direct product, right? r cross r is the usual coordinate plane the real plane there. So r cross z, what we're doing is we're not gonna take every real coordinate for the y's we're only gonna take integer coordinates. So we get things like zero, one, two, three, negative one, negative two, negative three but for the x coordinate we take all real numbers. So the Cartesian product in that situation it would look like a ladder of lines some strips of lines right here they're all gonna be horizontal lines but they're gonna be placed at integer markers along the y-axis. This would be the visualization of this Cartesian product. And let's do one more example of this. What if we take the natural numbers across the natural numbers? Again, viewing it as a geometric subset of r cross r. So what we're gonna do is we're gonna get ordered pairs whose coordinates are natural numbers which does include zero here. So we would get zero, zero, zero, one, zero, two, zero, three, zero, four, zero, five, zero, six. We would get one, zero, one, one, one, two, one, three, one, four, one, five, one, six. We would get two, zero, two, one, two, two, two, three, two, four, two, five, two, six. We would get three, zero, three, one, three, two, three, three, three, four, three, five, three, six, four, zero, four, one, et cetera, right? You're gonna get this infinite collection of polka dots filling in the first quadrant. You wouldn't get any line segments because we're only getting natural numbers, but that would then be the visualization of this Cartesian product of the natural numbers with the natural numbers. And so this of course is just some examples of Cartesian products. We'll be using Cartesian products extensively in the future, but this video is just intended to introduce us to the operations so that you can begin doing some calculations on your own.