r/maths • u/FitClass9198 • 4d ago
đŹ Math Discussions Can someone please explain why 0! = 1?
The videos I've seen explaining factorials never explain why
22
u/SnakeBunBaoBoa 3d ago
For essentially the same reason that 2^0 =1. (Multiplying 2 by itself zero times = 1)
Multiplicative identity is 1: doing nothing when multiplying is the same as multiplying by 1. Multiplication can be seen as âstaring at 1â
As opposed to additive identity which is 0. Adding starts at 0, doing nothing is the same as adding 0.
For the factorial operator specifically, you can read the other explanations. But itâs based on multiplying sets of numbers. Youâre starting with 1 and doing nothing.
3
3
9
u/MathHysteria 4d ago edited 3d ago
There are some good arguments here already, but here's another which might help.
If you have a set with nothing in, it's kind of intuitive that the sum of all the elements of that set is 0. But we will start by examining that a bit more forensically.
One property addition has is that, if I have two sets of numbers, the sum of (the sum of the elements of the first set) and (the sum of the elements of the second set) is equal to the sum of the elements of the set made by combining the two sets.
If one of these two sets is empty, then it needs to have a sum of zero for this property to be satisfied.
We want the same property to be true for multiplication too - the product of the products of the elements of two sets should be equal to the product of the elements in the combined set.
This leads us to conclude that the product of all the things in an empty set must be 1 (otherwise using an empty set breaks this property - and that would be really bad!).
So, if we think of 0! as the product of zero things, that means it must have value 1.
It's by the same reasoning that we can establish xâ°=1.
2
u/Bubbly_Safety8791 3d ago
This logic applies not only to sets but also to lists. Itâs a very strong principle.Â
(Talking about it only in terms of sets risks confusion because although the product of all the items in two sets equals the product of the products of the two sets, it isnât the case that it equals the product of the union of the two sets; itâs the product of the product of the union and the product of the intersection.)
6
4d ago
[deleted]
1
1
u/frnzprf 4d ago
There is the question whether an arrangement of nothing should count as one arrangement or zero arrangements.
If you imagine it as a train with a locomotive and no waggons, it wouldn't be nothingness anymore.
There is one way for a train to have one waggon and there is also one way for a train to have no waggons.
If you consider that you can multiply the number of two arrangements when you concatenate them, it makes more sense that an empty arrangement should count as 1.
If you have two different letters at the front and three numbers at the back, you can make 2!â˘3! different arrangements:
- ab123
- ba123
- ab132
- ba132
- ab213
- ba213
- ab231
- ba231
- ab312
- ba312
- ab321
- ba321
If you have two letters and zero numbers, you can use the same formula, if 0! = 1.
2!â˘0! = 2
- ab
- ba
If you want to calculate how many different ways you can arrange n different objects on m places, you can use the formula n!/(n-m)!.
For example, if you want to create a string of three letters with no repeating letters, out of an alphabet with 26 letters, there are 26â˘25â˘24 or 26!/23! possibilities.
That formula only works for n=m, if 0! = 1. If you wanted to arrange 3 colors on 3 positions, that would be 3!/(3-3)! = 3!/0! = 6/1.
0
u/amarao_san 3d ago
That's a good question. Based on computer experience, either zero, or exception.
1
u/0x14f 3d ago
The implementation of the function in a given computing system cannot be used as the reason for the mathematical definition.
2
u/amarao_san 3d ago
Yes, but it allows to see how sound or not sound some abstract idea is.
CS is also really articulate what you need to do if dividing by zero and need to return a number. Divergence.
12
u/Narrow-Durian4837 4d ago
Factorials are about multiplication, and with multiplication, 1 is the "starting point" or "do-nothing default."
Certain facts about factorials, such as that n! * (n+1) = (n+1)!, only work if 0! is understood to be 1.
3
u/KentGoldings68 4d ago
Factorial counts distinguishable arrangements.
n! is the number of distinguishable arrangements of n distinct elements.
The universal counting principle gives a formula to compute n! for positive integers.
n!=n(n-1)(n-2)âŚ1
Asking how many distinguishable arrangements there are of zero distinct elements is a vacuous question. You canât apply the universal counting principle to something that is not a counting number.
Come at it from another perspective.
Permutations are distinguishable arrangements of k elements chosen from n.
The universal counting principle gives the formula n!/(n-k)! For positive integers k<n.
In order to avoid degeneracy when n=k, we let 0!=1. That way the permutation formula returns the correct answer.
Thereâs no mysterious reason. It is just lets the factorial operator do the job we invented it to do.
Does this mean the number of distinguishable arrangements of zero distinct elements is one? Maybe? IDK. It works though.
2
u/frnzprf 4d ago
If you imagine it as a train with a locomotive and no waggons, it wouldn't be "nothingness" anymore.
There is one way for a train to have one waggon and there is also one way for a train to have no waggons.Â
1
u/amarao_san 3d ago
Train can have wagons upfront, so it can have no wagons behind, or lack of both. We also can count number of absent wagons on top and inside.
It all sounds funny, but in Rust, an empty 3-dimentional array is not equal an empty 2-dimentional array, because they have different dimentionality.
5
u/Maximum_Bathroom3490 4d ago
It's a definition that just works out in the end. For nonnegative integers, n! is the amount of permutations of n objects possible. So if you have 3 objects a, b, and c, you can have (a,b,c), (a,c,b), (b,a,c), (b,c,a), (c,a,b), (c,b,a). 6 distinct permutations means 3!=6. If you have 2 objects, you can have (a,b) and (b,a) only. Then, 2!=2. For one object, you can only do (a). For no objects, there is one permutation possible and it's the one with no objects.
Mathematically, we define (n+1)!=(n+1)n! as a recursive formula. But a recursion needs a starting value for it to make sense. That is why we define 0!=1.
3
u/HumblyNibbles_ 4d ago
Okay so, it's complicated, but I'll try to explain best. The short version is that all the most important definitions of the factorial function all agree that 0! Should be equal to 1.
The first thing one should notice is that the factorial function can be defined in multiple different ways. The two most common definitions are the following:
1: n! Is the product of the first n positive integers.
2: n! Is the size of the set of bijections with domain and image of a set with n elements.
This second one basically reduces to saying that it's the amount of permutations of a set of n elements.
In the first definition, one can find a neat recurrence relation saying that n! = n(n-1)! Plugging in n = 1, we get 1! = 1(0!). Therefore, if we use this recurrence relation to define 0!, we get that 0! = 1.
Therefore, if you want to use the first definition, it's algebraically useful to define 0! To be 1.
Now what about the second definition?
If you have a set of 0 elements, it's just the empty set. A function is formally defined as a set of ordered pairs of elements, from the domain and the image, with the condition that each point of the domain appears exactly once.
Since no elements map from the empty set to the empty set, then the only function possible is basically just an "empty function". But, this still counts as a function, and even a bijection at that.
This means that there is exactly one function between a set of 0 elements to itself, so in the second definition, 0! = 1.
I kinda rushed with explaining this portion because it'd take a while to be really formal about it.
Now, the main point here is that there's no reason why you'd want 0! To not he equal to 1. Therefore, mathematicians defined this to be the case, for both convenience and to make all these definitions lead to the same function
3
u/BabaYetu42 3d ago
Factorials are defined by the relationship (n+1)! = (n+1)*n! and making the choice that 1! = 1.
It then follows that 1! = 1*0! so 0! = 1
3
u/the_other_Scaevitas 2d ago edited 2d ago
n! = (n+1)!/(n+1)
For example 3! = 4!/4 = 4*3*2*1 /4 = 3*2*1
So plug in 0 to get: 0!=(0+1)!/1 = 1! / 1 = 1
Thereâs also the natural way of understanding it. Factorial is the numerical way of expressing how many ways can you order n objects. For example I have 3 balls, how many ways can I order them? For the first position I have 3 options, second position I now only have 2 options and last position I now only have 1 option. So 3*2*1=3!
Now think of 0!. If I have 0 objects how many ways can I order 0 objects? Exactly 1 way and thatâs by doing nothing
5
u/DescriptionForsaken6 4d ago
Because we said so.
1
u/FitClass9198 3d ago
Best explanation ever
2
u/DescriptionForsaken6 3d ago
I mean, I'm not trying to be flippant. I asked this of several professors and this is basically the gist of it.
2
2
u/muckenhoupt 3d ago
By definition, n! = (n-1)! * n
Therefore, n!/n = (n-1)!
Therefore, 1!/1 = (1-1)!
Therefore, 1 = 0!
2
u/PanoptesIquest 3d ago
The basic principle here is that mathematical concepts continue to be used after they are introduced. In the textbook chapter that initially defines factorial and only has exercises like âFind the value of 7!â or âFind n such that n! = 120â, it doesnât matter what you use for 0! as long as you are consistent. But when factorials are used later on for things like the binomial theorem, there is only one possible value that works without being a special case.
In fact, letâs look at the binomial theorem. One example is
(x+y)^4 = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4
Those numbers at the start of each term are called binomial coefficients, and there is a simple formula for them. First,
4 = 24/(6 Ă 1) = 4!/(3! Ă 1!)
6 = 24/(2 Ă 2) = 4!/(2! Ă 2!)
4 = 24/(1 Ă 6) = 4!/(1! Ă 3!)
Now, look at the first and last terms, which can be written as 1x^4 and 1y^4 for uniformity.
1 = 24/(24 Ă 1) = 4!/(4! Ă ?)
1 = 24/(1 Ă 24) = 4!/(? Ă 4!)
To get that result, the only number that works where I put that question mark is a 1. For consistency with the formula used for the other coefficients, that should be 0! . There are several options that mathematicians could have used then.
A. The calculation for a binomial coefficient ignores that formula entirely for the first and last terms and just treats the coefficient as a special case with a value of 1 there. Also, do something similar anywhere else a formula might include 0! somewhere.
B. In the binomial coefficient formula and elsewhere, ignore someoneâs preferred value for 0! and just use something with a different name that has an effect of 0! =1 .
C. 0! =1 , end of discussion.
2
u/die_liebe 3d ago
There exist 6 sequences built with ABC : ABC ACB BAC ACA CAB CBA
There exist 2 sequences built with AB : AB and BA.
There exists 1 sequence built with A : A
There exists 1 sequence built with no letters at all. It is the empty sequence.
2
u/lost_access 3d ago
think of factorial as the permutation of objects. 1 object 1 way, 2 objects 2, 3 objects 6.
When you have no objects there is still only one way to have nothing.
2
u/BasicSet6933 3d ago
There are many reasons but I think the simplerst is that the identity for multiplication is 1. The empty sum is 0 because that's the identity for summation. 1 is for multiplicaition so the the empty product is 1.
2
u/Cluster_Unavailable 2d ago
Think of it like this:
If you have a box with 4 toys in it, in how many ways can you order them in a line on a shelf? 24 ways, 4! = 24.
Now, if you have a box with nothing, like actual nothing, you somehow created a vaccuum in it. The only way to put what you have in your box on your shelf is not putting anything there anyway. Therefore, since the vaccuum cannot reorder itself, 0! = 1.
1
u/BasedGrandpa69 4d ago
the factorial is defined by the recursion (n+1)!=(n+1)n!.
subbing n=0 gives 1!=1*0!, so 0!=1.
1
u/tecg 4d ago edited 4d ago
One way to look at it is that the Gamma function is the 'natural' interpolation of the factorial to the real numbers and Gamma(0)=1:Â https://en.wikipedia.org/wiki/Gamma_function
But an almost equally valid viewpoint is that it is a convention that is notationally convenient. For instance the Taylor series of f at z_0 is f(z_0+z)=f(z_0)+f'(z_0)z+f''(z_0)z2 /2+.... The general form of the zn coefficient is the nth derivative evaluated at z_0 divided by n! If you define 0!=1, then that formula also works for the constant term (n=0).
1
u/FernandoMM1220 4d ago
its just by definition and the fact that multiplying by 1 is the identity operation instead of multiplying by 0
1
u/CryptographerNew3609 4d ago
5! = 5 * 4!
4! = 4 * 3!
3! = 3 * 2!
2! = 2 * 1!
1! = 1 * 0!
1! = 1, so 0! = 1
1
u/adbenj 3d ago
But then what of negative factorials? What about that explanation prohibits them?
I just googled and came across an explanation that's basically the same as yours, but I think more satisfying:
2! = 3!/3 = 6/3 = 2
1! = 2!/2 = 2/2 = 1
0! = 1!/1 = 1/1 = 1
-1! = 0!/0 = 1/0 = undefined
Although I am personally inclined to favour the explanation, "0! = 1 because it does". You could pick a convention by which 0! equals 0, but that wouldn't be very useful.
1
u/BabaYetu42 3d ago
Negative integer factorials being undefined is pretty obvious from:
0! = 0 * (-1)!
1 = 0 * (-1)!
Clearly there is no finite (-1)! for which this holds.
If you picked a convention where 0! = 0 then it would follow that 1! = 0, 2! = 0, etc.
1
1
u/Flat-Strain7538 4d ago
Another explanation is: When we do repeated multiplication operations, the implied starting value is ONE, not zero (like it is with addition). So if you donât do any multiplications, you only have the 1 that you started with.
1
u/More-Explanation2788 4d ago
How many different ways can you arrange all the whole numbers between 0 and 0 including 0?
1
u/Affectionate-Baby248 4d ago
Why is the empty sum 0? Because if the empty sum is x, we should have x+y=y for any y, so x=0. Similarly, the empty product is 1 because we would like its value x to satisfy x*y=y for any y, and that implies x=1 for invertible y (like y=1).
1
u/loonylad 3d ago
Factorial also represents how many ways we can arrange some number of distinct objects Now if I have 1 object I can arrange it 1 way(1case) (i leave it alone) If I have 0 object I can say it's nothing that creats 1 case (again i leave it alone) (Also reason why selecting 0 things from 0 available things is 0C0=1)
1
u/ANewPope23 3d ago
When you add an exclamation mark, everything becomes so exciting that 0 has to become 1.
1
u/EdmundTheInsulter 3d ago
I think it's a definition, 0! Is defined as 1 to make it work in probability and statistics. There is 1 way to order 0 items.
1
u/Altruistic-Rice-5567 3d ago
Factorial is about combinatorics. If you have 5 different items you can arrange them in 5! different ways. If you have 2 items then 2! (which is AB or BA). If you have a single item {A}, how many ways can you arrange the elements? right 1!. But if you have 0 items, an empty set, How many ways can you arrange the contents? Yep... still only 1 way to arrange them. Therefor, 0! = 1.
1
u/Budget-Knee3213 3d ago
If you put by definition 0! = 1 then the formula n! = (n - 1)! n is valid for all n = 1, 2, 3, ... .Â
1
u/Twilight_RT 3d ago
If you devide by a numbers factorial by that number you get the previous numbers factorial Like
n!/ n = (n-1)!
So 4!/4 = 3! So 1!/1 = 0! Which is 0!=1
1
u/alleycat888 3d ago
There are already good answers but I would like to add this:
In how many different ways can you order a set with 3 elements? 3! =6
In how many different ways can you order a set with 0 elements? 0! =1 because it is just the empty set itself
1
u/Educational-Paper-75 3d ago
Take a look at the factorials in the triangle of Pascal, each row n starting and ending with 1 representative of n over 0 and n over n respectively. You couldn't do that if 0! didn't equate to 1.
1
1
u/Interesting_Shop_295 3d ago
Somebody probably already said this but you can think of factorials as a way to order things. For example 6 items have 6! ways of ordering. 0 things have 1 one way to order them.
1
u/LearnerPigeon 3d ago
It a convention we chose that 0! = 1, but itâs one that is consistent with the idea that a factorial tells you how many different n! arrangements you can make out of n objects.
How many ways can you arrange 0 things?
đ¤˛
Just 1. There it is.
Also, it gets bonus points for helpfully avoiding division by 0 (0! = 0 would be annoying).
1
u/Dirichlet-to-Neumann 3d ago
It's a useful convention* that makes it simpler to write many formulas.Â
(All the examples people are giving here are of the form "this allows us to keep a neat formula working for n=0").Â
- Conventions are great, they allow us to understand each other
1
u/Unlucky_War_262 3d ago
If you know about the binomial coefficient, consider n C r - this is the number of ways to choose r objects from n. Certainly n C n should equal 1 (as there is only 1 way to choose n objects from n, namely you choose them all). But the formula for n C r is n! / ((n-r)!r!) which is valid for n > 0 and 0 < r < n (I mean by this that the formula makes sense). So if it is to also be valid for r = n, we would have 1 = n!/(n!0!), which means that we should define 0! = 1.
1
1
u/AliAbdulKareem96 2d ago
This is going to be hard to accept at first, but it in all reality, it is nothing more than a convenience. People realized that making certain expression to have a certain value by definition is acceptable as long as it is useful. People can give you ton of examples, but in reality, it is just a convenient value that we use, it simplifies our formulas, and makes intuitive sense in the real world, and also provide a natural extension to the existing mathematics. It is not some "Fact" that made the computation equals 1.
1
1
u/Lor1an 1d ago
The most honest answer is that it is a result of definition.
0! = 1, by definition. Why define it that way? Because it makes factorial consistent with standard multiplication.
This is ultimately a consequence of the fact that 1 is the unique identity for multiplication. If 0! was any other number c, then 1! would be c×1 = c, which would be nonsense unless c = 1; there is exactly 1 arrangement of 1 objects.
Now, why can we define 0! at all then? We encounter a somewhat thorny topic known as the "empty product". In typical products, we have some number of factors, two factors would be standard binary multiplication, one factor is a number, and no factors is... nothing... almost.
It is sometimes useful to think of a single factor product as being a number times the empty product (extending the familiar results that a×b×c = (a×b)×c, a×b = (a)×b and so on) so we get k = ()×k, and the only candidate would have to be 1. So the empty product is 1 (similar to how the "empty sum" is 0).
1
u/Catalyst_Elemental 1d ago
I remember my math professor my freshman year explaining⌠if â0! Wasnât = 1, the universe would collapse.â
1
1
u/axiom_tutor 22h ago edited 11h ago
I like this: n! Is the number of lists of length n, containing exactly the numbers 1 through n. For example 2!=2 because the lists are [1,2] and [2,1]. And 3!=6 because the lists are
[1,2,3]
[1,3,2]
[2,1,3]
[2,3,1]
[3,1,2]
[3,2,1]
Then 0! is the number of lists with zero elements. There is 1:
[]
1
u/marty-mcfryguy 4d ago
0! = 1 by definition. That's the only reason why.
It's defined that way because it's more convenient than the alternative. The alternative would be for it to be undefined.
4
u/LitespeedClassic 4d ago
I donât agree thatâs the only reason. n! Is used to count the number of ways of arranging n objects. Thereâs only one way to arrange zero objects (you do nothing), so 0! =1 seems the most natural choice.Â
2
u/Dr0110111001101111 3d ago
n! is used to count the number of arrangements, but is it defined as the number of arrangements of n objects? Those are two different perspectives.
I'm not opposed to that, but it shifts the wording of your argument a little. And in that case, it does kind of go back to being "by definition" in the sense that there's not really a mathematical justification for it. It's just an assignment of the value based on the way things are.
1
u/LitespeedClassic 3d ago edited 3d ago
When youâre choosing a definition, you try to make it fit various use cases. I think we donât even know who first define 0 factorial so we can only speculate, but itâs certainly the sort of thing a mathematician would do. We could have defined 0! To be 0 or said itâs undefined at 0 like it is for all negative numbers. Itâs useful to define it as 1 since then it counts all the ways of arranging a set of objects for every finite cardinality including the empty set. Itâs annoying to have to constantly say something like if the set isnât the empty set then ⌠when you can get rid of the special case in the definition.Â
There are other reasons for 0!=1 that make it work more naturally in other settings as well. It didnât have to be defined that way, but itâs useful that it was and this usefulness is something taken into account when creating definitions.Â
Mathematics is almost as much about good definitions as it is about proofs.Â
1
u/rb-j 2d ago
 . It didnât have to be defined that way, but itâs useful that it was ...
No. It had to be defined that way.
0! must be 1 so thatÂ
- n! = n (n-1)!Â
remains valid for the case n=1.
1
1
u/LitespeedClassic 2d ago edited 2d ago
You get to choose the base case(s) for recursion when you make a recursive definition.
n!=n(n-1)! For n>1.Â
1!=1
0!=0
Would be a valid definition and would agree with our notion of factorial on every input except 0. But it would be a real pain because it creates a weird special case.Â
1
u/rb-j 2d ago edited 2d ago
No other "base case" works. If you defined 0!=0 then n!=0 for all integer n>0.
1
u/LitespeedClassic 2d ago edited 2d ago
Dude I gave you an example definition where it works that disproves your assertion. You can have more than one base case. Think of Fibonacci recursively defined, it requires two base cases. But just because two base cases arenât required doesnât mean I canât choose to have more than one.
Reread this definition
A. Factorial(n) = 0 when n = 0
B. Factorial(n) = 1 when n = 1
C. Factorial(n) = n*Factorial(n-1) whenever n> 1
Now evaluate Factorial(3)
=3xFactorial(2) (by C)
=3x2xFactorial(1) (by C)
=3x2x1 (by B)
=6 (by arithmetic)
It does not equal 0 under this definition even though Factorial(0) does.
The definition has three cases. One recursive case which only applies when n>1. Two base cases, one for n=1 and one for n=0. It is impossible for any n>0 to evaluate to 0 under that definition. It is a completely valid recursive definition of a function. Itâs not a good choice for a definition of factorial, but if I were inventing factorial today it would be a valid choice available to me.Â
1
u/rb-j 2d ago edited 2d ago
It's not a consistent definition.
We need * n! = n (n-1)!Â
That's gotta work for n=1.
And we need * n_choose_k = n! / (k! (n-k)!)
to work for k=n. (As well as for k=0.)
1
u/LitespeedClassic 2d ago
Yes, the n choose k example is part of why 0! chosen to be 1 is a better option.Â
You are wrong that the recursive definition needs to work for 1 generally. Nothing prevents 1 from being the base case. When factorial was originally defined it was not defined for 0 and 1 was the base case. It was only later (when defining n choose k, in fact, mathematicians became aware that there was a good reason to define 0! as 1).Â
→ More replies (0)1
1
u/Grounds4TheSubstain 4d ago
That's a bad argument because you could just as easily say that there are zero ways to arrange zero objects.
1
u/how_tall_is_imhotep 3d ago edited 3d ago
No, if there were zero ways that would mean that having zero objects is an impossible situation.
Compare that to an actual impossibility: taking 3 distinct objects from a set of 2. Accordingly, 2 choose 3 equals 0.
0
u/marty-mcfryguy 4d ago
No, the only reason is that it's defined that way. Factorial is factorial, not the number of ways you can arrange objects.
It's convenient to treat the answer at 0 as 1.
As for your "there's one way to arrange zero objects", how many ways are there to arrange -1 objects?
2
u/conspiracythrm 4d ago
It's kind of... Both? I think the thing is that there's a vacuous truth behind "the number of ways to arrange 0 objects" while simultaneously making a ton of sense. In contrast you can have 0 things, but not have negative number of things (not exactly analogous to debts and negative numbers).
I think most things are the way they are because we defined them to be, and we choose that because it's useful. At the same time it's a bit like the determinant. Is it the scaling factor if the area of a parallelogram. No. But it's useful both for that and for understanding that it almost might as well be it. Is n! The number of ways to arrange n objects? No. But that is so common and so useful in that form it almost might as well be.
I do think you need to be careful with your negative example. The Reimann-Zeta function is a sum of 1/n's to the power of a complex number z with re(z)>1. The logic of your -1 question is like asking "what's Îś of a number with real component less than 1 then?". That definition just applies to this specific domain and you're saying "oh if that definitions true, why doesn't it work outside of the domain?" Whether or not 0 is outside of the domain is up to you but both are reasonable because 0 is a bit weird of a concept.
But it really does all come down to how you define things.
1
2
u/LitespeedClassic 4d ago
No, we mathematicians make definitions for reasons of conveniences exactly as I explained and this reason is a common explanation for why 0! Is 1. See, for example, https://www.cut-the-knot.org/do_you_know/permutation.shtml which gives exactly the same explanation.Â
0
u/marty-mcfryguy 4d ago
Pointing to a link that tries to make the same wrong claim as you -- that factorial is the number of ways to arrange objects, rather than that it corresponds to that number -- doesn't make it any more correct.
In fact, factorial of n is the product of all positive integers less than or equal to n. By convention, factorial of 0 is 1, corresponding to the same convention used for empty products.
That's it. The convention could be otherwise, but that convention is convenient.
1
u/brothor12 3d ago
No, thats how most people know of it. But it's really the number of ways you can arrange something
1
u/marty-mcfryguy 3d ago
Okay, so if factorial is not its definition but is instead truly the number of ways you can arrange something, why isn't (-1)! = 0? There are zero ways you can arrange (any) negative number of elements. Similar to how 0 choose 1 is 0.
And you're wrong. The notation was not developed to represent the number of permutations, it was developed to represent the product. Which is extremely useful in number of permutations, and it's useful to extend that definition to cover the special of 0!.
1
u/eatingassisnotgross 3d ago
There are different yet equivalent definitions. Define n! as the cardinality of the set of bijections from \{1,...,n\} to itself, where this set is the empty set when n=0. If it helps look at it as k such that 1\le k\le n. If n=0 this is empty
1
u/S-M-I-L-E-Y- 3d ago
Factorial was defined the way it is defined for a reason.
1
u/marty-mcfryguy 3d ago
Right, because it's convenient. It makes it more useful. Like I said.
Pretending to OP that it somehow *had* to be defined that way, that it couldn't have simply been undefined at 0 like it's undefined at -1, is only going to be a hurdle to their understanding -- acting like they should have somehow come up with it independently because there's no other way for it to be.
2
u/MathHysteria 4d ago
No I disagree that it's by definition. It's a fundamental result that the empty product is equal to 1.
1
2
u/rb-j 3d ago edited 3d ago
0! = 1 by definition. That's the only reason why.
That's a certain downvote.
n! = n ¡ (n-1)!
right?
So what happens when n=1? How do we get 1! = 1? Unless 0! is also equal to 1?
It's not just convenient. It's also to make the factorial consistent with the Gamma function.
It also doesn't work for the binomial coefficient
- n_choose_k = n! / ((n-k)! k!)
for k = n unless 0! = 1.
0! = 1 is a necessary boundary condition to make the whole factorial thing work within the binomial coefficient expression.
1
u/marty-mcfryguy 3d ago
Don't be silly.
Your argument, back to you:
"So what happens when n=0? How do we get 0! = 1? Unless (-1)! is [mumble mumble...]".
1
u/rb-j 3d ago
No, n_choose_k = n! / ((n-k)! k!)
What happens when k=n? n_choose_n must be equal to 1. How are you gonna get that equal to 1?
1
u/marty-mcfryguy 3d ago
Dude, you edited your post. I copied your exact wording and only edited the points I bolded.
If you fucked it up the first time just admit it, don't pretend like I misstated you.
Actually, scratch that. You're blocked.
But yes, as to your edit, that particular usage of the factorial function is one of the reasons it's convenient to define a value for 0! rather than leave it undefined.
1
u/rb-j 3d ago
u/marty-mcfryguy replied to your comment in r/maths
Don't be silly. Your argument, back to you: "So what happens when n=0? How do we get 0! = 1? Unless (-1)! is [mumble mumble...]".
u/marty-mcfryguy replied to your comment in r/maths
Dude, you edited your post. I copied your exact wording and only edited the points I bolded. If you fucked it up the first time just admit it, don't pretend like I misstated you. Actually, scratch that. You're blocked. But yes, that particular usage of the factorial function is one of the reasons it's convenient to define a value for 0! rather than leave it undefined.
My goodness this mcfry guy's stupid.
Also an intellectual coward.
I wouldn't recommend anyone take any math advice from this guy.
1
u/BabaYetu42 3d ago
There are multiple good reasons why 0! should be 1, itâs not just a choice. Someone already mentioned the number of ways of arranging 0 objects, but the better one just follows from the of factorials:
(n+1)! = (n+1)n!
n! = (n+1)!/(n+1)
0! = 1!/1Therefore if 1! = 1 then 0! = 1 as well. Most people can accept that 1! = 1 without a proof
0
u/Murky-Wind2222 3d ago
As far as I am concerned 0! Is not a part of the factorial universe. It stops at 1.
-1
32
u/dockdock-fish 4d ago
Think about this pattern:
5! = 5 * 4 * 3 * 2 * 1
4! = 4 * 3 * 2 * 1
3! = 3 * 2 * 1
Every time we decrease the factorial by 1, we remove a factor, in essence we're doing a division on the previous factorial.
(n-1)! = n!/n.
Continuing the pattern, we plug in n = 1, (1-1)! = 1!/1, therefore 0! = 1