So we're going to start off here by talking about factory goals because they are foundational to the
concepts of permutations and combinations which we'll need to get into later in this combinatorics section.
The idea of a factorial is that when we take any positive integer or the number zero and we apply the
factorial operator.
So let's say, for instance here that we're taking three factorial, it's this three exclamation point
Applying this factorial operator to the number three means take three and multiply it by all of the
positive integers, less than three, all the way down to one.
So three factorial is equivalent to three times two times one.
And it doesn't matter what number we're starting with here, we always continue to expand the product
until we get down to one.
So for instance, seven factorial is the same product, except we're starting with seven and multiplying
all the way down to one in the same way that for three factorial we started at three and multiplied
all the way down to one.
And the same thing applies for much larger numbers.
100 factorial will follow the same pattern.
We'll start with 100 and multiply by 99, 98, 97, 96 and we'll continue on all the way down until
we get to three times, two times one where we stop.
So that's the concept of factorial.
And it's important to note that we have factorial nested within other factorial.
For instance, if we look here at seven factorial and we just consider everything in the product other
than the seven.
So we look at six times, five times four, all the way down to one.
We notice that this part is six factorial, which tells us that seven factorial is equal to seven times
six factorial.
And that brings us to this property of factorial.
So what we see here is that we can plug any positive integer in for N.
So for instance, let's say we want to use n equals.
20.
If we plug this value into this property, we get 20 factorial is equal to and is 20.
So we get 20 multiplied by 20, minus one is 19.
So we're multiplying here by 19 factorial.
So 20 factorial is equal to 20 times 19 factorial in the same way that we saw here that seven factorial
is equal to seven times six factorial or that 100 factorial is equal to 100 times 99 factorial.
And of course, we can use this property to continue expanding this factorial expression because this
property tells us that 19 factorial is the same.
As 19 times 18 factorial.
So we could also rewrite this as 19 times 18 factorial, and we could continue to apply that property
to rewrite 18 factorial and then 17 factorial until eventually we ended up at the full expansion of
20 factorial.
So that's the idea here.
But what are factorial is really good for?
What are they actually telling us?
Well, we can think about the real world concept of a factorial as the number of ways in which we can
arrange some set of objects or people or data, whatever kind of set that we're working with.
For instance, let's think about playing cards in particular, a standard deck of 52 cards.
We know it has face cards, kings, queens and jacks.
Let's say that we just have one.
KING In other words, of the 52 cards, we only have one card.
It's a face card.
It's a king.
If we lay this king on the table, what we realize is that there's only one arrangement we can make
with this KING If we lay it on the table, it's just the king by itself.
There's only one way in which we can arrange that single card.
But now let's say that we have a set of two cards.
We have a king and a queen, and we want to find out the number of ways we can arrange this on the table.
Well, we can either lay down the king first and then the queen, or alternatively, we have a second
arrangement.
We could lay down the queen first and then we could lay down the king.
And so when we have two cards, there are two ways in which we could arrange them.
What happens when we have three cards, one king, one queen and one Jack?
Well, we realize that we could lay down the king first, and then after we lay down the king, we have
two options either the queen, then the jack or the jack, then the queen.
So we could keep the king in the first position and then lay down the jack instead, followed by the
queen.
But these are the only two options we have if we lay the king down first.
Once the king is gone, we just have two cards left.
There's only two ways to arrange those two cards.
First, the queen than the Jack or first the jack than the Queen.
So our only options are king.
Queen Jack or King Jack.
Queen when the king comes first.
But of course, we could also put the queen first or the jack first.
So let's look at that if we put the queen first.
Then as you can start to see, we have two options.
We can either put the king second or the king third with the Jack third or the jack second.
So two options here.
Queen King Jack or Queen Jack King.
And then our last pair of options is Jack first.
We could put the jack first and then we could follow it up with the king, then the queen.
Or the queen and then the king.
And these, in fact, are all of the options we have for arranging three cards down on the table.
What we want to realize here is that when we have three cards, we have six possibilities.
When we have two cards, we have two possibilities.
And when we have one card, we have one possibility.
What we see, though, is that six is actually equivalent to we could rewrite it as three times, two
times one.
We could also rewrite two as two times one, and we could rewrite one as just one or keep it the same,
I should say.
So what we see then is that this is equivalent to three factorial.
This is equivalent to two factorial.
And this then, of course, is equivalent to one factorial.
And that's why we say that this factorial operation tells us the number of ways in which we can arrange
the set of objects, people, data, etc. that we're working with.
So we have this idea that the number of ways in which we can arrange three cards is three factorial,
that the number of ways in which we can arrange two cards is two factorial, and that if we have one
card, the number of arrangements is given by one factorial.
So let's take this one step further.
What happens when we have zero cards?
We have no cards at all.
In how many ways can we arrange zero cards?
Well, if you think about it, if we're laying these cards on the table and we have no cards at all,
there's only one possible arrangement here.
And that one possible arrangement is no cards at all on the table, which suggests to us that zero factorial
is actually equal to one.
And that's true.
Even though it may seem counterintuitive at first, we define zero factorial as equal to one.
We can see that using this kind of a real world pattern, we can also see it by looking at this pattern
we've lined up here, these factorial values, and we've already shown that some of these others here
are true.
So if we call this value on the left and factorial, let's say this is n factorial.
So we have an equal to four three, 210.
What we notice here is that if we start at 24 and we divide it by four, we get to six, 24 divided
by four is six.
And that's this value right here.
So we get 24 divided by four is equal to six.
We take six divided by three and we get to two, we take two divided by two and we get to one.
And we see this pattern emerging 24 divided by 4 to 6, six divided by 3 to 2, two divided by 2 to
1, which means that we should be able to say one divided by one gives us whichever value should go
here, one divided by one gives us this value.
And so we have to say then that this value must be equal to one.
And that's another way to show that zero factorial is equal to one.
What happens if we follow this pattern and we try to define the factorial operation for a negative integer
like negative one?
Well, if we say here we have negative one factorial, then to get the value of negative one factorial
right here, following our same pattern, we would say one divided by zero should give us this value
right here.
But of course in mathematics we can't divide by zero.
Dividing by zero is undefined, which means that this value here has to be undefined.
And this in part is why we say that the factorial operator is not defined for negative integers, it's
only defined or we only define it for zero and positive integers.
So with all that being said, now that we have a better idea of what a factorial is and how to use it,
let's talk briefly about some factorial operations.
Specifically, let's look at addition, subtraction, multiplication and division of factorial.
And we'll start with division because division will be the most common operation that we'll use when
we talk about permutations and combinations.
So for instance, if we have four factorial divided by two factorial, remember, if you ever get stuck
simplifying factorial, you can always write them out or at least parts of them.
It'll give you a better idea of how we can simplify something like this factorial division problem.
So if we write this out, we can say that it's equal to four times, three times, two times one, and
we're dividing that by two times one.
Well, whenever we have the same common factor in the numerator and the denominator of a fraction,
we can cancel it, which means that we can cancel these twos with one another and we can cancel these
ones with one another.
And so all we're left with is 12 in the numerator and one in the denominator.
12 divided by one is 12.
And of course, the same thing would go for the reciprocal of this fraction.
If we flip it upside down and we take two factorial divided by four factorial, we get two times one
and in the denominator four times three times.
Times two times one.
And so, again, we can cancel the twos and the ones and all we're left with.
Then whenever you cancel everything from one side of a fraction, all you're left with is an understood
one.
So we say that this is one divided by 12.
In other words, whenever you're dividing two factorial as one factorial by another, we realize that
the smaller factorial is going to cancel completely.
Two is the smaller factorial in both of these cases and notice how its entire product cancelled completely
this two times one and this two times one went away because of course it's sort of embedded in this
four factorial.
We're also going to have the same two times one as part of the four factorial, so that smaller factorial
will always cancel completely.
All we'll be left with is the part of the product of the larger factorial that extends all the way down
to the smaller one.
So we start here at four and we say four times three and then we stop because we've arrived at two,
which is the starting point of this smaller factorial.
So that's division.
Multiplication is just as simple.
If we take four factorial and we multiply it by two factorial, usually the easiest way to go about
simplifying here is just to say that four factorial is 24 and two factorial is two.
So we get 24 times two or 48.
Now that being said, we could also do some algebra here.
We could write these out four times, three times, two times, one multiplied by two times one.
We could then acknowledge here that the two times one factor occurs twice.
Everything here is multiplied together.
So we could rewrite this two times, one times, two times one as two times one squared instead.
So rewriting it this way.
Is the same thing two times one quantity squared.
So we would then get 12 multiplied by two squared or.
12 times four or 48.
That's obviously a slower way to get to this answer of 48.
But it shows you the math in different ways so we can understand what's actually happening here.
Now, if we look at, for instance, subtraction of factorial, if we say four factorial minus two factorial,
again, we can do it the simple way here where this is equal to 24 minus two.
Or 22.
Or we could again, use some factoring.
We could say four times, three times, two times one minus two times one.
And we see that we have this two times one common factor.
So we could pull that out in front, two times one.
All we're left with from this first term is four times three.
And all we're left with from the second term is an understood one.
So we get minus one here.
And that just leaves us with two times 12 minus one or two times 11 or 22.
And we see that we get back to this same value.
What happens, though, if we do addition?
Well, the operation is really going to look exactly the same.
If we're adding instead, we would get 24 plus two or 26.
And same thing here.
We would then add we would factor out the two times one.
We would be left with four times three plus one or two times 12 plus one.
And that would leave us instead with two times 13 or 26.
The same answer we got when we simplified it the easy way.
So hopefully that gives you a better feel for how we work with factorial.
By looking at some of these arithmetic operations we can do with them.
Keep in mind that we've been working with a lot of small numbers here, but factorial can get big really
quickly.
We know that zero factorial is one, one factorial is one, two factorial is two, three, factorial
is six.
And if we keep going, we get 24, 120 720 and we can see how these factorial values start to get big
really quickly.
So because of that, we just assume that we will of course be using a calculator or a computer to calculate
some of these larger factorial cells.
Really, any scientific calculator will have a factorial button or some kind of factorial operation.
Or you can always just Google factorial calculator.
But thinking about how large these numbers really are, if you look any deeper into factorial math,
52 factorial is a common example that you'll run into because we have a standard 52 card deck like we
talked about earlier with the Kings, queens and Jacks.
But 52 factorial is the number of ways in which you can arrange a standard 52 card deck of cards.
But this is a number that is so incomprehensibly large that if you give a deck of cards a perfect shuffle,
the arrangement you create with that shuffle is virtually guaranteed to be a unique shuffle that has
never been seen before in all of human history.
You'll also see the 70 factorial example.
70 factorial is a number that is just larger than what we call a Google.
You're already familiar with million, billion, trillion, etc..
Well, a Google is the number one followed by.
So after this one followed by 100.
Zeroes.
So if you think about the number one and then 100 zeroes after it, that number is a Google and 70 factorial
is just larger than one Google.
And as you may have already guessed, that Google number, that extremely large, that incomprehensibly
large number one, Google is, of course, where the company Google got its name.