Maths Mutt HOME

Factorials

A factorial is a function that multiplies a whole number by every positive whole number below it.

For any non-negative integer n, the factorial of n, written as n!, is defined as:

n! = n × (n - 1) × (n - 2) × … × 3 × 2 × 1

Example

Fred knows that the code to his locker is made up of the digits 5, 6, 7 and 8, but he can’t remember the order. How many different possible codes exist?

There are 4 choices for the first digit:

5***   6***   7***   8***

There are then 3 choices for the second digit:

56**65**75**85**
57**67**76**86**
58**68**78**87**

This leaves 2 choices for the third digit:

567*657*756*856*
568*658*758*857*
576*675*765*865*
578*678*768*867*
586*685*785*875*
587*687*786*876*

Finally, only one digit remains for the last position:

5678   6578   7568   8567
5687   6587   7586   8576
5768   6758   7658   8657
5786   6785   7685   8675
5867   6857   7856   8756
5876   6875   7865   8765

There are 24 possible codes.

\( 4 \times 3 \times 2 \times 1 = 24 \)

This is written as 4! (“4 factorial”).

Some useful values:

\[ 0! = 1,\quad 1! = 1,\quad 2! = 2,\quad 3! = 6,\quad 4! = 24,\quad 5! = 120 \]

In general:

\( n! = n(n-1)(n-2)\cdots 3\cdot 2\cdot 1 \)

Useful identities:

\( n! = n\,(n-1)! \)
\( (n-r+1)(n-r)! = (n-r+1)! \)
\[ (n+1)! = (n+1)\bigl((n+1)-1\bigr)\bigl((n+1)-2\bigr)\bigl((n+1)-3\bigr)\,\ldots\,3\times 2\times 1 \] \[ = (n+1)\,n\,(n-1)\,(n-2)\,\ldots\,3\times 2\times 1 \] \[ = (n+1)\,n! \] \[ = (n+1)\,n\,(n-1)! \]
\[ (n-2)! = (n-2)\bigl((n-2)-1\bigr)\bigl((n-2)-2\bigr)\bigl((n-2)-3\bigr)\,\ldots\,3\times 2\times 1 \] \[ = (n-2)\,(n-3)\,(n-4)\,(n-5)\,(n-6)\,\ldots\,3\times 2\times 1 \] \[ = (n-2)\,(n-3)! \]

Permutations and Combinations

A permutation is an ordered arrangement of objects — order matters.

\[ \text{Arrange } r \text{ objects from a total of } n \]
\( {}^{n}P_{r} = \frac{n!}{(n-r)!} \)

A combination is a selection of objects where order does not matter.

\[ \text{Select } r \text{ objects from a total of } n \]
\( {}^{n}C_{r} = \frac{n!}{r!(n-r)!} \)
Example

There are 56 ways of choosing 5 tins from 8 brands, but 6720 ways of ordering them.

\[ {}^{8}C_{5} = \frac{8!}{5!\,(8-5)!} \] \[ = \frac{8\times 7\times 6\times 5\times 4\times 3\times 2\times 1}{5!\,3!} \] \[ = \frac{8\times 7\times 6\times 5\times 4\times 3\times 2\times 1} {(5\times 4\times 3\times 2\times 1)(3\times 2\times 1)} \] \[ = \frac{8\times 7\times 6}{3\times 2\times 1} \] \[ = \frac{336}{6} \] \[ = 56 \]
\[ {}^{8}P_{5} = \frac{8!}{(8-5)!} \] \[ = \frac{8\times 7\times 6\times 5\times 4\times 3\times 2\times 1}{3!} \] \[ = \frac{8\times 7\times 6\times 5\times 4\times 3\times 2\times 1}{3\times 2\times 1} \] \[ = 8\times 7\times 6\times 5\times 4 \] \[ = 6720 \]

Properties of combinations

\[ {}^{n}C_{n} = \frac{n!}{n!\,(n-n)!} \] \[ = \frac{n!}{n!\,0!} \] \[ = \frac{n!}{n!} \] \[ = 1 \]
\[ {}^{n}C_{0} = \frac{n!}{0!\,(n-0)!} \] \[ = \frac{n!}{0!\,n!} \] \[ = \frac{n!}{n!} \] \[ = 1 \]
\[ {}^{n}C_{\,n-r} = \frac{n!}{(n-r)!\,\bigl(n-(n-r)\bigr)!} \] \[ = \frac{n!}{(n-r)!\,(n-n+r)!} \] \[ = \frac{n!}{(n-r)!\,r!} \] \[ = \frac{n!}{r!\,(n-r)!} \] \[ = {}^{n}C_{\,r} \]

Pascal’s Triangle

Pascal's triangle diagram

The triangle is built by adding the two numbers above.

Pascal triangle labelled with nCr

This can be written as \( {}^{n}C_{r} \), where n is the row and r is the column.

nCr positions in Pascal's triangle

Row example 1

Notice how \({}^{3}C_{3} = {}^{3}C_{0} = 1\).

Row example 2

\({}^{3}C_{2} = {}^{3}C_{1} = 3\).

Row example 3

\({}^{4}C_{3} = {}^{4}C_{1} = 4\).

Pascal addition example \[ {}^{n}C_{r} + {}^{n}C_{\,r+1} = {}^{\,n+1}C_{\,r+1} \] \[ \text{e.g.}\quad {}^{4}C_{2} + {}^{4}C_{3} = 10 = {}^{5}C_{3} \]
Pascal addition example \[ {}^{n}C_{r-1} + {}^{n}C_{r} = {}^{\,n+1}C_{r} \] \[ \text{e.g.}\quad {}^{4}C_{1} + {}^{4}C_{2} = 10 = {}^{5}C_{2} \]
Interactive Pascal

Binomial Coefficients

The coefficients in the expansion of \( (a+b)^n \) are called binomial coefficients.

\( {}^{n}C_{r} = \frac{n!}{r!(n-r)!} \)

Can be written

\[ \begin{pmatrix} n \\[4pt] r \end{pmatrix} \\ \begin{pmatrix} \text{Row} \\[4pt] \text{Column} \end{pmatrix} \]

where n is the row and r is the column in pascal's triangle

Example
\[ {}^{4}C_{2}\ \text{can be written}\ \begin{pmatrix} 4 \\[4pt] 2 \end{pmatrix} \]
\[ {}^{4}C_{2} = \frac{4!}{2!\,(4-2)!} \] \[ = \frac{4!}{2!\,2!} \] \[ = \frac{4\times 3\times 2!}{2!\,2!} \] \[ = \frac{4\times 3}{2!} \] \[ = \frac{12}{2} = 6 \]

 

Example of selecting nCr from Pascal's triangle

Properties to learn

\[ \begin{pmatrix} n \\[4pt] r \end{pmatrix} + \begin{pmatrix} n \\[4pt] r+1 \end{pmatrix} = \begin{pmatrix} n+1 \\[4pt] r+1 \end{pmatrix} \]
\[ \begin{pmatrix} n \\[4pt] r-1 \end{pmatrix} + \begin{pmatrix} n \\[4pt] r \end{pmatrix} = \begin{pmatrix} n+1 \\[4pt] r \end{pmatrix} \]
\[ \begin{pmatrix} n \\[4pt] n-r \end{pmatrix} = \begin{pmatrix} n \\[4pt] r \end{pmatrix} \]
\[ \begin{pmatrix} n \\[4pt] n \end{pmatrix} = \begin{pmatrix} n \\[4pt] 0 \end{pmatrix} = 1 \]
Example

Show that

\( \begin{pmatrix} n+1 \\[4pt] 4 \end{pmatrix} - \begin{pmatrix} n \\[4pt] 4 \end{pmatrix} = \begin{pmatrix} n \\[4pt] 3 \end{pmatrix} \) , where \( n \ge 4 \)

Start by writing out the left-hand side in the form \( {}^{n}C_{r} = \frac{n!}{r!(n-r)!} \)

\[ \begin{pmatrix} n+1 \\[4pt] 4 \end{pmatrix} - \begin{pmatrix} n \\[4pt] 4 \end{pmatrix} = \frac{(n+1)!}{4!\,\bigl((n+1)-4\bigr)!} - \frac{n!}{4!\,(n-4)!} \] \[ = \frac{(n+1)!}{4!\,(n-3)!} - \frac{n!}{4!\,(n-4)!} \]

multiplying the second term by 1 in the form of (n-3)/(n-3) gives

\[ = \frac{(n+1)!}{4!\,(n-3)!} \;-\; \frac{n!}{4!\,(n-4)!}\times 1 \] \[ = \frac{(n+1)!}{4!\,(n-3)!} \;-\; \frac{n!}{4!\,(n-4)!} \times \frac{(n-3)}{(n-3)} \] \[ = \frac{(n+1)!}{4!\,(n-3)!} \;-\; \frac{n!\,(n-3)}{4!\,(n-3)!\,(n-4)!} \]

which reduces to

\[ = \frac{(n+1)!}{4!\,(n-3)!} \;-\; \frac{n!\,(n-3)}{4!\,(n-3)!} \]

since (n-3)!= (n-3)(n-4)!

Now the denominators are the same

\[ = \frac{(n+1)! \;-\; n!\,(n-3)}{4!\,(n-3)!} \]

take out common factor n!

\[ = \frac{ n!\,\bigl[(n+1) - (n-3)\bigr] }{ 4!\,(n-3)! } \] \[ = \frac{ n!\,\bigl[1 + 3\bigr] }{ 4!\,(n-3)! } \] \[ = \frac{ n!\,4 }{ 4!\,(n-3)! } \]
\[ = \frac{n!\,4}{4 \times 3!\,(n-3)!} \] \[ = \frac{n!}{3!\,(n-3)!} \] \[ = \begin{pmatrix} n \\[4pt] 3 \end{pmatrix} \]

Equations

Example

Solve the equation

\( \begin{pmatrix} n \\[4pt] n-2 \end{pmatrix} = 55 \)

From the properties above, since

\[ \begin{pmatrix} n \\[4pt] n-r \end{pmatrix} = \begin{pmatrix} n \\[4pt] r \end{pmatrix} \]
\[ \begin{pmatrix} n \\[4pt] n-2 \end{pmatrix} = \begin{pmatrix} n \\[4pt] 2 \end{pmatrix} \]

 

Solution

\[ \begin{pmatrix} n \\[4pt] n-2 \end{pmatrix} = 55 \] \[ \therefore\; \begin{pmatrix} n \\[4pt] 2 \end{pmatrix} = 55 \] \[ \text{Look for 55 in column 2 of Pascal’s triangle.} \] \[ \text{This occurs in row 11.} \] \[ n = 11 \]

Alternatively,

\[ \frac{n!}{2!\,(n-2)!} = 55 \] \[ \frac{n(n-1)(n-2)(n-3)\,\dots\,3 \times 2 \times 1}{2!\,(n-2)!} = 55 \] \[ \frac{n(n-1)(n-2)!}{2!\,(n-2)!} = 55 \] \[ \frac{n(n-1)}{2!} = 55 \]

tidy up

\[ \frac{n(n-1)}{2 \times 1} = 55 \] \[ \frac{n(n-1)}{2} = 55 \]

make equation and solve

\[ n(n-1) = 110 \] \[ n^{2} - n = 110 \] \[ n^{2} - n - 110 = 0 \] \[ (n - 11)(n + 10) = 0 \] \[ \text{so} \] \[ n = 11 \quad \text{or} \quad n = -10 \] \[ \text{discard } n = -10 \text{ since } n > 0 \] \[ n = 11 \]

 

Example

Solve the equation

\( \begin{pmatrix} n \\[4pt] n-3 \end{pmatrix} = 84 \)

\[ \begin{pmatrix} n \\[4pt] n-3 \end{pmatrix} = 84 \] \[ \therefore\; \begin{pmatrix} n \\[4pt] 3 \end{pmatrix} = 84 \] \[ \text{Look for 84 in column 3 of Pascal’s triangle.} \] \[ \text{This occurs in row 9.} \] \[ n = 9 \]

Binomial Expansions

\[ (a+b)^{n} = C^{n}_{0}\,a^{n}b^{0} + C^{n}_{1}\,a^{\,n-1}b^{1} + C^{n}_{2}\,a^{\,n-2}b^{2} +\;\dots\;+\; C^{n}_{r}\,a^{\,n-r}b^{r} +\;\dots\;+\; C^{n}_{n}\,a^{\,0}b^{n} \]

Which can be written

\[ (a+b)^{n} = \binom{n}{0}a^{\,n}b^{\,0} + \binom{n}{1}a^{\,n-1}b^{\,1} + \binom{n}{2}a^{\,n-2}b^{\,2} +\;\dots\;+\; \binom{n}{r}a^{\,n-r}b^{\,r} +\;\dots\;+\; \binom{n}{n}a^{\,0}b^{\,n} \]

This is known as the binomial theorem, and gives the expansion of (a + b)n , where a and b are real numbers and n is a natural number.
The binomial coefficients are found in the nth row of Pascal’s triangle.

In general:

\( (a+b)^n = \sum_{r=0}^{n} {}^{n}C_{r} a^{\,n-r} b^{\,r} \)
\[ = \sum_{r=0}^{n} \begin{pmatrix} n \\[4pt] r \end{pmatrix} a^{\,n-r} b^{\,r} \]
Example
\[ (x+y)^{5} = 1\,x^{5}y^{0} +5\,x^{4}y^{1} +10\,x^{3}y^{2} +10\,x^{2}y^{3} +5\,x^{1}y^{4} +1\,x^{0}y^{5} \] \[ = C^{5}_{0}x^{5}y^{0} + C^{5}_{1}x^{4}y^{1} + C^{5}_{2}x^{3}y^{2} + C^{5}_{3}x^{2}y^{3} + C^{5}_{4}x^{1}y^{4} + C^{5}_{5}x^{0}y^{5} \] \[ = \begin{pmatrix} 5 \\[4pt] 0 \end{pmatrix} x^{5}y^{0} + \begin{pmatrix} 5 \\[4pt] 1 \end{pmatrix} x^{4}y^{1} + \begin{pmatrix} 5 \\[4pt] 2 \end{pmatrix} x^{3}y^{2} + \begin{pmatrix} 5 \\[4pt] 3 \end{pmatrix} x^{2}y^{3} + \begin{pmatrix} 5 \\[4pt] 4 \end{pmatrix} x^{1}y^{4} + \begin{pmatrix} 5 \\[4pt] 5 \end{pmatrix} x^{0}y^{5} \] \[ = x^{5} +5x^{4}y +10x^{3}y^{2} +10x^{2}y^{3} +5xy^{4} +y^{5} \]

Notice that the powers of x and y both add up to 5, and that as the powers of x decrease from 5 to 0, the powers of y increase from 0 to 5.

Example
\[ (1+2x)^{3} = \begin{pmatrix}3\\0\end{pmatrix}1^{3}(2x)^{0} + \begin{pmatrix}3\\1\end{pmatrix}1^{2}(2x)^{1} + \begin{pmatrix}3\\2\end{pmatrix}1^{1}(2x)^{2} + \begin{pmatrix}3\\3\end{pmatrix}1^{0}(2x)^{3} \] \[ = 1 + 3(2x) + 3(2x)^{2} + (2x)^{3} \] \[ = 1 + 6x + 3\cdot 4x^{2} + 8x^{3} \] \[ = 1 + 6x + 12x^{2} + 8x^{3} \]
\[ \text{The sum of the numbers in Pascal’s triangle is equal to } 2^{n}, \text{ where } n \text{ is the row number.} \]
\[ \qquad\qquad (a+b)^{n} = \sum_{r=0}^{n} C^{n}_{r}\,a^{\,n-r} b^{\,r} \] \[ \text{when } a=1 \text{ and } b=1 \] \[ \qquad\qquad (1+1)^{n} = \sum_{r=0}^{n} C^{n}_{r}\,1^{\,n-r} 1^{\,r} \] \[ \qquad\qquad = \sum_{r=0}^{n} C^{n}_{r} \] \[ \therefore\; 2^{n} = \sum_{r=0}^{n} C^{n}_{r} \]

The binomial theorem allows a specific term to be found from the  general form.

\[ (a+b)^{n} \text{ has general term } C^{n}_{r}\,a^{\,n-r} b^{\,r} \] \[ \text{To find any specific term, set } r. \]
Example
\[ \text{When } r = 3 \] \[ C^{n}_{3}\,a^{\,n-3} b^{3} = \frac{n!}{3!\,(n-3)!}\,a^{\,n-3} b^{3} \] \[ = \frac{n(n-1)(n-2)}{3!}\,a^{\,n-3} b^{3} \] \[ \text{Which is the fourth term of the expansion!} \]
\[ \quad C^{n}_{r}\,a^{\,n-r} b^{\,r} \;\text{is the }(r+1)\text{th term} \] \[ \text{in the expansion for } 0 \le r \le n \]
Example

Find the 7th term of the expansion of \( (2x+3y)^9 \).


\[ (2x+3y)^{9} \text{ has general term } C^{n}_{r}\,a^{\,n-r}b^{\,r} \] \[ a = 2x,\quad b = 3y,\quad n = 9 \] \[ r+1 = 7 \;\Rightarrow\; r = 6 \] \[ C^{9}_{6}\,(2x)^{\,9-6}\,(3y)^{6} = \frac{9!}{6!\,3!}\,(2x)^{3}(3y)^{6} \] \[ = 84 \cdot 2^{3} \cdot 3^{6} \cdot x^{3} y^{6} \] \[ = 489888\,x^{3}y^{6} \]
Example

Find the term containing x3 in the expansion of (3 +2x)5

\[ (3 + 2x)^{5} \text{ has general term } C^{n}_{r}\,a^{\,n-r} b^{\,r} \] \[ a = 3,\quad b = 2x,\quad n = 5 \] \[ \text{want term containing } x^{3},\; \Rightarrow\; r = 3 \] \[ C^{5}_{3}\,3^{\,5-3}\,(2x)^{3} = \frac{5!}{3!\,2!}\,3^{2}\,2^{3}\,x^{3} \] \[ = 10 \times 9 \times 8 \, x^{3} \] \[ = 720\,x^{3} \]

Probability and the Binomial Theorem

\[ \text{Let } p \text{ denote the probability of success of an outcome and } q \text{ denote the probability of failure} \] \[ p + q = 1 \] \[ \text{The probability of obtaining } r \text{ successes in } n \text{ independent trials is} \] \[ P(r \text{ successes}) = \; C^{n}_{r}\, q^{\,n-r}\, p^{\,r} \]
Example
\[ \text{The probability that it will rain on any given day is } 0.4. \] \[ \text{What is the probability that it will rain twice in a seven‑day week?} \]

\[ p = 0.4 \qquad q = 0.6 \] \[ n = 7 \; \text{(number of possible outcomes)} \qquad r = 2 \; \text{(number of required outcomes)} \] \[ P(\text{rain twice}) = C^{\,n}_{\,r}\, q^{\,n-r}\, p^{\,r} \] \[ = C^{\,7}_{\,2}\,(0.6)^{5}\,(0.4)^{2} \] \[ = \frac{7!}{2!\,5!}\,(0.6)^{5}\,(0.4)^{2} \] \[ = 21 \times 0.07776 \times 0.16 \] \[ = 0.26127 \] \[ = 26.1\% \]

The Binomial Expansion and e

\[ \left(1 + \frac{1}{n}\right)^{n} = 1 + n\!\left(\frac{1}{n}\right) + \frac{n(n-1)}{2!}\!\left(\frac{1}{n}\right)^{2} + \cdots + \left(\frac{1}{n}\right)^{n} \] \[ \lim_{\,n \to \infty} \left(\frac{1}{n}\right)^{n} = 0 \]
\[ \left(1 + \frac{1}{n}\right)^{n} \;=\; \sum_{r=0}^{\infty} \frac{1}{r!} \] \[ \sum_{r=0}^{\infty} \frac{1}{r!} = e \]
\[ e^{x} = \sum_{r=0}^{\infty} \frac{x^{\,r}}{r!} \] \[ e^{x} = 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \ldots\ldots\ldots \]
Example
\[ e^{3} = 1 + 3 + \frac{3^{2}}{2!} + \frac{3^{3}}{3!} + \frac{3^{4}}{4!} + \frac{3^{5}}{5!} + \frac{3^{6}}{6!} + \frac{3^{7}}{7!} + \ldots \] \[ e^{3} = 1 + 3 + \frac{9}{2} + \frac{27}{6} + \frac{81}{24} + \frac{243}{120} + \frac{729}{720} + \frac{2187}{5040} + \ldots \] \[ e^{3} = 1 + 3 + 4.5 + 4.5 + 3.375 + 2.025 + 1.0125 + 0.4339\ldots \]
Back to BB © Alexander Forrest