 In this video, I want to introduce to the students the notion of a permutation, a permutation from a mathematical point of view, algebraic. This is the same thing, of course, in combinatorics as well. For any set X, so we have a set X right here. We probably should say it's a non-empty set, but we won't necessarily rule that out. But in particular, X could be a finite set or an infinite set, not a problem whatsoever. A bijective function of the form Pi goes from X to X. So it's a bijective map from a set into itself. We call this a permutation. So it's a bijection from a set inside of itself. And so that's kind of what permutation means in this context. When you permute something, it typically means you move around the order of some collection, right? And so that's what a bijection is going to do here, a bijection from X to X. This means we have some one-to-one correspondence from X to X again. But things could be shuffled around, hence this permutation. The set of permutations on the set X we will denote as S sub X. And so this is the set of permutations there. In particular, if X is the set 1, 2, 3, 4, 5 up to N. So this is just a subset of the natural numbers there. In that special context where X is just the numbers 1 through N, we denote S of X instead of just as S sub N, S N for short. It turns out that we're going to see that when it comes to these permutations, the exact elements themselves don't really matter. It's just the distinction between them. So the cardinality of set X matters more than the actual elements of the set. So S N turns out, we'll be talking about that a lot. But in general, S of X, S sub X there is the set of permutations there. Now, one thing we should know about... Well, let's first talk about working with permutations. Let's suppose it's a finite set. So we can list all the elements in the domain there. One convention that people use to describe permutations is to use the following two-row tableau as you see down here. And so the first row of that tableau right here is going to represent the domain of the function. So this right here is our input values. So we start with those. And then the second row of this tableau here, this is going to represent the images of the associated... The associated images of the functions here. So this is the output of our permutation. And so you read this off like you would a table. And so when you look at something like this, you're like, okay, pi of one, what is that? You come and you look for the one column, and then you look at the number you see right down here. Let's see, if you wanted to do pi of two, well, then you come along the table, you find two, and then you look at the number down here, that's pi of two, whatever that turns out to be. And so this can help us recognize the values very, very quickly. So as an example of such a thing, we might have like a permutation in S4. One, two, three, four, something like that. And so we could have like two, three, one, and four. This could be the tableau. And so let's say this is the permutation pi here. So this would tell us that pi of one equals two, pi of two equals three, pi of three equals one, and then pi of four equals four. It's possible that an element could map to itself. That's perfectly acceptable. And so we see that these permutations, this tableau right here is basically just a tabular way of expressing who maps to who. And since the function's bijective, you're going to see that you're going to have the exact same number of things on top and bottom. It's just the bottom row might be scrambled up the domain a little bit. Great. Just so you're aware, some people like to represent permutations by only representing the bottom row. So you might just say something like two, three, one, and four. So that itself could be a permutation. The way you're supposed to read is the first number goes to one, the second number goes to three, the third number goes to one, and the fourth number goes to four. This works great as long as you don't get into multiple digits. Even still, you can do okay. You can always put a comment there if you really need to. But typically people don't write permutations with commas. And it's very common to see the two rows instead of just the one row. But again, this is an acceptable notation that some people use when describing permutations. So what I want to do first is actually describe the set in play here. Let X be a finite non-empty set. Then the cardinality of S of X, so S of X, remember, is the set of permutations on the set X there. Then the size of SX will actually be the size of the original set X factorial. Remember like in factorial here would be in times n minus one times n minus two all the way down to three times two times one, right? So that's what we mean by in factorial, or in this case, X factorial. So how do we prove this? This right here is a counting type argument. And so what we're going to do is we're trying to count how many things are in this set. For simplicity's sake, we're just going to assume X is the set one, two, three, four up to n. In which case then the size of X is just the number n. So without the loss of generality, we can just say our permutation set is just S in as opposed to SX. You're going to see this language in proof writing all the time, the loss of generality. What does that actually mean? Or I should say without the loss of generality. What that means is we're going to add an extra assumption to the assumptions given because the only thing we know about X is that X is finite and not empty. So there's something inside of it, but there's not an infinite number of things in there. So what we're going to do is when someone says without the loss of generality, we're going to add an extra assumption to the assumptions we're given, but that extra assumption doesn't fundamentally change the problem. It's more of just a convenience for the proof writer and the proof reader, but logically there's no loss there. Because after all, if I have a permutation on something like X, Y, Z, and then that becomes Y, X, and Z, like so. So this is a permutation pi. This would be a permutation on the set X, Y, Z. But on the other hand, I could come up with a permutation one, two, three, and it goes two, one, three. I could also call this pi and notice that I'm just going to make a connection between X and one, right? A connection between Y and two, and then a connection between Z and three. If you relabel the set, this is the exact same permutation. So the name of the labels seems to have no significant bearing on this proof at hand. So that's why without any loss of generality, our extra assumption doesn't remove anything for us, we can assume that X is the numbers one through N right here, okay? So next, take an arbitrary permutation. It's going to be a bijective map from X to X. Well, how could one construct this thing if we think of pi in terms of our tableau here? We have one, we have two, we have three, all the way up to N. And since it's a bijection, it turns out every number one through N has to show up on the second row, and it has to show up exactly once. So if we're making some decisions here, what can one map to? Well, it turns out you can map it to anything you want, any of the N letters, so we're going to get N choices for the first one. For the second one though, as we decide what pi of two is going to be, whatever we chose from pi of one, we can't map to that one, but we have to map to exactly one of, everything else, right? So that leaves N minus one options there. And then for the third one, right, we've exhausted one of the choices for one, one of the choices for two, because we can never repeat, we can never repeat an element, right? Well, that's going to give us N minus two for the next one. And if you keep on going down, eventually we get to N, there's only going to be one choice left, you just get one there. And so our choices get restricted each time we make a decision for this thing. And so we think about all the choices we had, we had N choices for the first option. As the second option then is chosen independently, we get N minus one for the next, we get N minus two for the next, and this proceeds down until we get one. And so this is exactly in factorial. And since this describes every possible permutation, every permutation can be described by this two row tableau, this gives us all the possible permutations there is. So a very nice counting argument gives us that the size of the permutation set will equal the factorial of the cardinality here. Let's look at some specific examples here. I've drawn a few couple of examples, but let's just kind of look some more. Suppose we have a set which contains three elements, one, two, and three. And so then we might want to describe the set S3, the permutations on this set X right here. One example of a permutation, X to X, we'll call it pi, it sends one to two, two to one, and three to three. Following the tableau convention we saw before, it would look something like this. One goes to two, two goes to one, and three goes to three. That is an example of a permutation on S3. Now from the previous theorem, we saw that S3, its cardinality is going to be three factorial, which is three times two times one, which is six. So if this is one of the permutations, we'll have four of the other five possibilities. And so we see the following. One option is the identity map. The identity function is always a permutation. It doesn't move anything around, but it is a permutation. One goes to one, two goes to two, three goes to three. Another one is one goes to one, so it stays, so when an element is moved by a permutation, we say that it's fixed. It doesn't move around a fixed point. One goes to one, two goes to three, three goes to two. For the next one, one goes to two, two goes to three, three goes to one. The element pi that we had talked about before is actually in this list as well. One goes to two, two goes to three, sorry. One goes to two, two goes to one, three goes to three, three is fixed. We have another one where one goes to three, two goes to two, three goes to one, so two is fixed. And then finally, one goes to three, two goes to one, and three goes to two. These are the six possible permutations on three letters, one, two, and three. Now, the next thing I want to mention when it comes to permutations, it turns out we can compose them because they are functions, so the idea of function composition comes into play. If we have two permutations, let's say that one of them is rho, it goes from x to x, and we have another permutation, sigma, which goes from x to x, then because the, because the, let's see, make sure I say the right one, because the co-domain of rho equals the domain of sigma, we can then take the composition, sigma composed with rho, and that would be a permutation on sx. So we can compose two permutations, we can compose two permutations and form a new permutation. And it turns out using the Tableau approach actually leads itself very naturally to way of describing the composite. So let's say we have two permutations on s3, so we'll take the permutation, one goes to two, two goes to one, three is fixed, and we'll take the permutation, one goes to three, two is fixed, and three goes to one. If we compose these together, what we can do is we can build a three-row Tableau where the first two rows, the first two rows are gonna be identical to the permutation on the right. The reason we use the one on the right is the one on the right is gonna affect the element first. With functions, the one on the right is the innermost function, it'll apply first to the element. So you see just copying on the first row, it's just the domain. Then the permutation scrambles up the domain, so we get two, one, three. So then what we're gonna do for the second two rows, right, what we're gonna do is we're gonna take this right here, two, and put inside this function, two goes to two, and so we record that right here. One goes to three, like so, and then three goes to one, which we get right here. So you just copy where the two things go from there. And then once you have the three rows, you erase the second row. And what you're left with is then the composition of the two functions. One is gonna go to two, two is gonna go to three, and three is gonna go to one. So the composition of a permutation, of two permutations, is itself a permutation. So we see this property right here. Now permutations are also invertible functions because they're bijective by definition. And since they're bijective, they have an inverse. What would be the inverse function to a permutation? Well, the permutation is just gonna switch the things. We're gonna switch the order of things. We're gonna do it backwards. So if you take a permutation like this one, let's say this is pi, it's inverse, pi inverse. You're gonna take the permutation and turn it upside down. The second row goes on top, and then the first row goes on the bottom. And that's the inverse permutation. You switch the order. Now, typically we like to put the domain in descending order. So this, I should say ascending order. So the first row, first column, we probably would move to the front, and we were to record this something like one, two, three. One goes to three, two goes to one, and three goes to two. So that would be the example of taking the inverse of this permutation right here. As another example, if you take the permutation like this right here, so this is the inverse, this right here is the inverse of the permutation, one, two, three, two, one, three. So this was pi this time. Then we have pi inverse right here. So you flip the thing upside down. So two goes to one, one goes to two, three goes to three. And then I would probably switch the order of the first and second column. This isn't actually required. It just makes it easier to read. And so then you get the thing right here. I'm not sure why I call that pi. That's kind of bad notation there. This is the inverse. This is just the pi that we were referring to up here. My mistake there. But if we take the inverse of this function, we'll get this one over here. So inverses of permutations just flip the table upside down and reorder it if necessary. Composition of two permutations, just make a three row tableau and then remove the middle row when you're done. Honestly though, if you wanted to, you could do these function compositions in the following way. What happens to one? One goes to two, two goes to two. And so then we would record something like one goes to two. Great. Then the next one, if you want to know two goes to one, one goes to three. And so you're going to say that two goes to three. Great. And then lastly, three goes to three, three goes to one. In which case three goes to one. You can do that as well. If you don't want to write the larger tableau, you can kind of build it in line. Same thing with these inverses here. If you wanted to, you know, find the inverse of this matrix right here, of this tableau right here, it's like, okay, one goes to two. So we get one, two. Two goes to one. So we get two, one. And then three goes to three. We can get this thing without having to worry about scrambling it up. If we want to scramb, if we want to search through it first and record them in the right order, that's an acceptable option as well. And so that'll then bring us to the end of our lecture here, lecture three, which we've talked about invertible functions with a special emphasis here on permutations. Permutations are going to be good friends for us as we study abstract algebra here. So if you liked what you saw, if you feel like you learned something, by all means click the like button. If you want to learn some more and new videos, subscribe to the channel, check out other videos and learn much more. And as always, if you have any questions while you're watching these videos, please, please, please post your questions in the comments below. I'll be happy to answer them so we can all learn math a little bit better together. See you next time. Bye.