# What is the practical application of factorials

I'm trying to understand the practical application of factorial - in simple applications. I searched the math.stackexchange and could not find an answer.

I understand that a factorial of n items gives you the number of ways you can arrange the given items.
For example: If there are two coins - you can arrange them in two different ways - like wise if you have 3 coins - there are 6 ways you can arrange them.

I've the following questions:

1. What are the other applications than arranging number of items.
2. I'm reading about the gamma function to be used for finding factorials of non-integers (decimals). What is the use of this - as we would never tend to arrange like 2.5 (two-and-a-half) items.
3. I plotted the following range of numbers with its factorial using gnuplot (software). I want to know how this software interpolates the value of the factorial between two integers. Because I have not told gnuplot to use the gamma function
number  factorial
0           1
1           1
2           2
3           6
4           24
5           120


plot "factorial" using 1:2 smooth bezier

I've very limited knowledge in mathematics - say school level - I'd prefer a simple answer which can be related to easily

• Calculate binomials Nov 21, 2014 at 8:12
• @barakmanos I'm looking for real-world applications. How can I interest someone in learning factorials and its further study? Nov 21, 2014 at 8:14
• If you have $n$ objects and you want to pick $k$ of them, the number of possible choice is a number called $\binom nk$ which is equal to $\frac{n!}{k!(n-k)!}$. As an application of this you have the following formula for computing an arbitrary power of a sum: $(a+b)^n=\sum_{k=0}^n\binom nka^kb^{n-k}$. And this is just for starters .... :) Nov 21, 2014 at 8:16
• This is very basic math, most introductory texts treat it. Just google "combinatorics". Also wikipedia may give useful information. Nov 21, 2014 at 8:22
• My initial reaction to questions like "what is the use for this mathematics?" is "don't you find it interesting?" Well, this is what I answer to students of mathematics (not to pupils or students of other subjects) but there this answer is serious. If you don't find the gamma function interesting than mathematics is not for you. (Don't get me wrong, I know and like and do a lot of applied mathematics and also tell my students about it...)
– Dirk
Nov 21, 2014 at 12:35

$$\sin x=\frac{x^1}{1!}-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!}-\frac{x^{11}}{11!}+\cdots$$ $$\cos x=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\frac{x^8}{8!}-\frac{x^{10}}{10!}+\cdots$$ $$e^x=1+\frac{x^1}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\cdots$$ The sine and cosine functions are important in trigonometry, which has practical applications to surveying and astronomy. The exponential function is used for the calculation of compound interest.

• Why is there a x^8 / 8! in sin x? @bof Dec 9, 2015 at 3:14
1. During a mathematical education program you will usually encounter it in calculus, for example Taylor's theorem $$f(x) = \sum_{k=0}^\infty \frac{f^{(n)}(x_0)}{k!}(x-x_0)^k.$$ and the binomial theorem $$(a+b)^n = \sum_{k=0}^n \binom{n}{k} a^k b^{n-k}, \quad \binom{n}{k} = \frac{n!}{k! (n-k)!}$$ or combinatorics (art of counting). Permutations show up in algebra. On this site my last use of factorials and gamma function was this (at first look rather frightning) equation: \begin{align} \frac{(-n)^{n-1} \Gamma(n+1)}{(1-n)_{n-1}} &=\frac{(-n)^{n-1} n!} {(1-n)(1-n+1)(1-n+2)\cdots -2 \cdot -1} &=\prod_{k=1}^{n-1} \frac{(k+1) n^2}{n^2-kn} \\ &=\frac{2 n^2}{n^2- n}\cdot\frac{3 n^2}{n^2-2 n}\cdot\frac{4 n^2}{n^2-3 n} \cdots \frac{n^3-3n^2}{4n} \cdot \frac{n^3- 2n^2}{3 n}\cdot\frac{n^3- n^2}{2 n}\cdot n^2 \\ &= n^n \end{align} Historically gambling problems were a major reason for the development of combinatorics and probability theory.
2. It is a valid question to extend the factorial, a function with natural numbers as argument, to larger domains, like real or complex numbers. The gamma function also showed up several times as certain integrals, so mathematicians gave it a name and of course noted the relationship to factorials. See the graph at the end of this posting. My favourite application of the gamma function is the volume and surface of a ball in $n$ dimensions: $$V_n(r) = \frac{\pi^{n/2}}{\Gamma\left(\frac{n}{2}+1\right)}r^n \quad\quad S_n(r) = \frac{\pi^{n/2}}{\Gamma\left(\frac{n}{2}\right)} r^{n-1}$$
3. You ordered that interpolation via "smooth bezier". A Bézier curve is an interpolation function. Drop that part or try different plotting options, see "help plot" within gnuplot. For example:

plot "factorial" using 1:2 with linespoints

Here is a plot together with the gamma function, or to be more precise, $\Gamma(x+1)$: • I have added the values and the command it used in gnuplot - gave me a smooth curve - which made me wonder what is the factorial of 0.5 (for example) - which lead to gamma function Nov 21, 2014 at 9:07

Well, although the question title is asking for practical applications the OP is really asking for "real world" applications (perhaps "practical" should be replaced by "pragmatic" here). If so, one area springs to mind: Gambling.

In any card game, if you want to calculate (or even estimate) the probability of favorable outcomes, you have to have a working knowledge of factorials.

• how to use it for card games? And thanks for suggesting the right word "pragmatic" Feb 24, 2016 at 18:54
• For example: chemical-ecology.net/java/possible.htm Feb 24, 2016 at 19:17

Think of any video game, or a track meet relay, where you pick players to go first, second, third or fourth in a race. Or anytime you have the capability to do a number of acrivities in any order, like a chore list.

I am using Mario and Sonic at the Olympic Games as an example. You can put Sonic first, or second or third or fourth. You can arrange Sonic and any other person on your team to come up with the best team to win the race.

The number of possibilities depends on what total number of teammates you have. In this case you start with 4 slots to fill on your team. You multiply each remaining number underneath 4 until you get to 1 then stop. By multiplying you find the total number of combinations you could dwell on before you begin a game. So in this example $$4!$$ is $$4\times3\times2\times1=24$$ possibilties.

If making a chore list of 12 items you would find, that $$12!$$ is $$12\times11\times10\times9\times8\times7\times6\times5\times4\times3\times2\times1=479,001,600$$ possibilties. This is not practically useful but shows the power of possibilities.

$$4!= 24$$. So 24 hours in a day. The order you spend your time is a factorial you use everday without thinking.

$$3!=6$$. Anything that has 6 unique flavors, you can combine in any order, or a game with 6 possible moves you could do in any order is another factorial.

Hope this example helps. I am a 4th/5th grade math teacher and use this example to challenge my students to learn more math and apply it!

• But why? You don't need a complex math calculation to determine what order you're going to place 3, 4, or 12 racers. You brain can do 3 or 4 without issue, and even 12 wouldn't take much brainpower to accomplish. As a teacher myself, I don't know why this garbage is taught in schools. It's really only used in very specific applications, all of which are pretty advanced. There's literally no reason to learn this unless you are pursuing one of those advanced fields. We need to reassess what we are teaching in schools and WHY we are teaching it. Jun 11, 2021 at 18:02

(1) Combinatorics is much more than "arranging number of items". Ask any computer scientist.

(2) The asymptotic behavior of factorial is important (ask again computer scientists). The tools of calculus are powerful.

(3) Gnuplot uses a generic interpolation algorithm.

• From your answer - I think my level of understanding of mathematics is too low even to understand simple answers; especially answer number 2 - I have no idea of how to relate it with factorial of decimal numbers. Thanks for your answer Nov 21, 2014 at 8:23
• @Prasanna, "asymptotic behavior" means "how to approximate $n!$ when $n$ is big". This is important if you want an estimation of the running time of a program/algorithm. Nov 21, 2014 at 8:27