How does the factorial formula calculate the number of arrangements of n distinct objects?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In combinatorics, the factorial formula, denoted as n!, calculates the total number of ways to arrange n distinct objects in a row.

This formula works by multiplying all consecutive positive integers from 1 up to and including n:
n!=n×(n−1)×(n−2)×…×1

The logic behind this is based on the sequential choices available when placing objects:
* For the first position, there are n possible objects to choose from.
* For the second position, there are n−1 objects remaining.
* This continues until only one object remains for the final position.

By the fundamental counting principle, the total number of permutations is the product of these choices, resulting in n!. For example, if you have 5 distinct objects, there are 5!=5×4×3×2×1=120 possible arrangements. By convention, 0! is defined as 1.12