Skip to content

Factorials: Counting Arrangements

Textbook

For an integer $n\ge1$, the factorial is $n!=1\cdot2\cdots n$; a separate definition sets $0!:=1$. For $n\ge1$, it satisfies $n!=n(n-1)!$. The exclamation mark denotes the factorial operation.

There are $n!$ ways to arrange $n$ distinct objects. The first position has $n$ candidates; after choosing one, the next has $n-1$, then $n-2$, down to one. Multiplying the choices gives the factorial. If objects are indistinguishable, this unadjusted calculation counts identical arrangements repeatedly.

The recurrence matches the counting interpretation: choosing the first object leaves $(n-1)!$ orders for the rest, and there are $n$ possible first choices. At $n=1$, it reads $1!=1\cdot0!$, so $0!=1$ preserves one consistent rule. In this definition the argument is a nonnegative integer; inserting a negative number into the finite chain does not automatically define a factorial.

Definitions and further reading: Mathematics for Computer Science.

In plain language

A factorial counts orders of distinct objects: four tasks offer four first choices, then three, two, and one. Each schedule still contains four tasks; twenty-four counts the ways to arrange them. A fifth task multiplies the number of orders by five through the extra branching choices. An empty list has one order, so $0!=1$: even no tasks receive a valid plan, without stretching the working day.

Example

The example arranges four illustrative cards A, B, C, and D. The scene fixes one possible choice at a time, while the formula counts every branch, not just the displayed arrangement.

Factorials: Counting Arrangements

First position

Any of the four cards may come first.

Step 1 of 3: First position

Read all steps
  1. First position

    Any of the four cards may come first.

    State
    AcurrentBcurrentCcurrentDcurrent
  2. Continuations

    After A, there are three choices and then two.

    State
    A | BcurrentA | CcurrentA | Dcurrent
  3. Complete arrangement

    The last card is forced; there are 24 arrangements.

    State
    A | B | C | Dcurrent24current

The scene follows one branch, such as A first, but that branch still permits six tails made from B, C, and D. Four such groups of six correspond to the four first choices. This gives $4\cdot6=24$, matching the full formula. Adding $4+3+2+1$ would count options at individual decisions without combining them, so it would not count completed arrangements.

Related concepts: Choosing without order.

The original text of this free article is published under CC BY-NC-ND 4.0.

Previous / next

Previous
Finite Products: Reading the Product Sign
Next
Binomial Coefficients: Choosing Without Order
  • Natural Numbers: Counting Discrete Objects

    Which values count discrete objects, and why the zero convention must be stated.

    Read article
    Math
  • Integers: Counting on Both Sides of Zero

    Positive and negative integers, zero, and the limits of integer division.

    Read article
    Math
  • Rational Numbers: Ratios of Integers

    Numbers as ratios of integers: equivalent fractions and the nonzero denominator requirement.

    Read article
    Math