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

  • $\begingroup$ Calculate binomials $\endgroup$ – barak manos Nov 21 '14 at 8:12
  • $\begingroup$ @barakmanos I'm looking for real-world applications. How can I interest someone in learning factorials and its further study? $\endgroup$ – Prasanna Nov 21 '14 at 8:14
  • 2
    $\begingroup$ 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 .... :) $\endgroup$ – Andrea Mori Nov 21 '14 at 8:16
  • 2
    $\begingroup$ This is very basic math, most introductory texts treat it. Just google "combinatorics". Also wikipedia may give useful information. $\endgroup$ – Andrea Mori Nov 21 '14 at 8:22
  • 2
    $\begingroup$ 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...) $\endgroup$ – Dirk Nov 21 '14 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.

  • 1
    $\begingroup$ Why is there a x^8 / 8! in sin x? @bof $\endgroup$ – zbz.lvlv Dec 9 '15 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)$:

factorial vs gamma function

  • $\begingroup$ 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 $\endgroup$ – Prasanna Nov 21 '14 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.


(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.

  • $\begingroup$ 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 $\endgroup$ – Prasanna Nov 21 '14 at 8:23
  • 3
    $\begingroup$ @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. $\endgroup$ – Martín-Blas Pérez Pinilla Nov 21 '14 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.