Combinatorics: Definition, Formula & Example

Combinatorics is the branch of mathematics concerned with counting, arranging, selecting, and organizing objects under specific rules. Instead of listing every possible outcome one by one, combinatorics provides systematic methods for determining how many possibilities exist.
A question such as “How many different three-person committees can be chosen from eight people?” is a combinatorics problem. So is “How many ways can five books be arranged on a shelf?” The key difference between these examples is whether order matters, which determines the counting method to use.
Combinatorics is part of the broader study of arithmetic and number theory and connects naturally with probability, discrete mathematics, computer science, scheduling, coding, and optimization.
What Is Combinatorics?
Combinatorics studies finite or countable structures by answering questions about how objects can be selected or arranged.
Most introductory combinatorics problems involve one or more of these ideas:
- counting possible outcomes;
- arranging objects in different orders;
- selecting objects from a larger group;
- counting choices made in several stages;
- determining whether repetition is allowed;
- calculating probabilities by counting favorable and total outcomes.
The central question is usually:
How many distinct possibilities satisfy the stated conditions?
The formula depends on the structure of the problem rather than on one universal combinatorics equation.
The Fundamental Counting Principle
One of the most important ideas in combinatorics is the multiplication principle.
If one step can occur in m ways and a second independent step can occur in n ways, then the two-step process can occur in:
Total possibilities = m × n
For three stages:
Total possibilities = a × b × c
More generally, if a process contains several successive choices:
Total possibilities = n₁ × n₂ × n₃ × … × nₖ
Example
Suppose a restaurant offers:
3 appetizers
5 main courses
2 desserts
If a meal consists of one choice from each category:
Total meals = 3 × 5 × 2
Total meals = 30
There are 30 possible meals.
This principle becomes especially powerful when many stages are involved.
The Addition Principle
When a choice can be made through separate, mutually exclusive alternatives, the number of possibilities can be added.
If one option can occur in m ways and another non-overlapping option can occur in n ways:
Total possibilities = m + n
For example, suppose a student may choose either one of 6 mathematics electives or one of 4 computer science electives.
Total choices = 6 + 4 = 10
The addition principle applies because the student is selecting from one group or the other.
Factorials in Combinatorics
Many combinatorics formulas use the factorial operation.
For a positive integer n:
n! = n × (n – 1) × (n – 2) × … × 2 × 1
For example:
5! = 5 × 4 × 3 × 2 × 1
5! = 120
By convention:
0! = 1
Factorials count arrangements particularly well because the number of available choices decreases after each object is used.
The workbook also distinguishes the broader discussion of factorials from the individual factorial calculation itself.
Permutations: When Order Matters
A permutation is an arrangement in which order matters.
Suppose three winners—first, second, and third—must be selected from ten contestants. Choosing Alice, Ben, and Carlos in that order is different from choosing Carlos, Alice, and Ben because each position has a different meaning.
The number of ordered arrangements of r objects chosen from n distinct objects is:
nPr = n! / (n – r)!
Example: Awarding Three Places
There are 10 contestants and three finishing positions.
10P3 = 10! / (10 – 3)!
10P3 = 10! / 7!
Canceling the common factorial terms gives:
10P3 = 10 × 9 × 8
10P3 = 720
There are 720 possible ordered podium results.
The dedicated permutations topic covers the nPr calculation more specifically.
Combinations: When Order Does Not Matter
A combination is a selection in which order does not matter.
If three people are selected to form a committee, choosing Ava, Bilal, and Chen creates the same committee regardless of the order in which their names are listed.
The basic combination formula is:
nCr = n! / (r! × (n – r)!)
Here:
n = total number of available objects
r = number selected
Example: Choosing 3 People From 8
Suppose a committee of 3 people must be chosen from a group of 8.
8C3 = 8! / (3! × 5!)
Expand only the necessary factors:
8C3 = (8 × 7 × 6) / (3 × 2 × 1)
8C3 = 336 / 6
8C3 = 56
There are 56 different committees.
The combinations page focuses specifically on the nCr calculation and its use, while combinatorics covers the wider counting framework.
Permutations vs. Combinations
The fastest way to decide between these methods is to ask:
Would changing the order create a different outcome?
If yes, the problem generally involves a permutation.
If no, the problem generally involves a combination.
Consider choosing three letters from A, B, C, D, and E.
If the letters form first, second, and third positions, then:
ABC and BAC are different.
That is a permutation problem.
If the task is simply to select the three letters, then:
{A, B, C} and {B, A, C}
represent the same selection.
That is a combination problem.
Problems containing both ideas can require several stages, which is why permutations and combinations are often analyzed together.
Counting With Repetition
Another important question in combinatorics is whether an item may be used more than once.
Suppose a four-digit PIN can use any digit from 0 through 9, and digits may repeat.
Each position has 10 possibilities:
Total PINs = 10 × 10 × 10 × 10
Total PINs = 10⁴
Total PINs = 10,000
Repetition changes the structure dramatically.
If repeated digits were not permitted, the count would instead be:
10 × 9 × 8 × 7 = 5,040
The first version has 10,000 possibilities, while the version without repetition has 5,040.
Arranging All Distinct Objects
If all n distinct objects are arranged, the number of possible orders is:
Number of arrangements = n!
Suppose five different books are placed on one shelf.
For the first position, any of 5 books can be chosen. After one is placed, 4 remain, then 3, then 2, then 1.
Arrangements = 5 × 4 × 3 × 2 × 1
Arrangements = 5!
Arrangements = 120
There are 120 different arrangements.
Arrangements With Identical Objects
When some objects are identical, simply calculating n! overcounts the number of distinct arrangements.
Suppose a collection contains n objects, with:
a identical objects of one type,
b identical objects of another type,
and so on.
The number of distinct arrangements is:
Distinct arrangements = n! / (a! × b! × …)
For example, consider the letters in LEVEL.
There are 5 letters, but L appears twice and E appears twice.
Distinct arrangements = 5! / (2! × 2!)
Distinct arrangements = 120 / 4
Distinct arrangements = 30
Therefore, the letters of LEVEL have 30 distinct arrangements.
A Step-by-Step Method for Combinatorics Problems
Before choosing a formula, identify the structure of the problem.
First, determine exactly what is being counted. Then ask whether the outcome consists of one choice or several stages.
Next, determine whether order matters. A ranking, seating order, password, sequence, or assignment to labeled positions normally treats order as significant. A committee or unordered group normally does not.
Then determine whether repetition is allowed. A digit in a code may sometimes be reused, while a person selected for one committee position normally cannot be selected again for another.
Finally, identify any restrictions. Some choices may be prohibited, required, or dependent on earlier choices.
Only after those questions are answered should the formula be selected.
Worked Example: Creating a Code Without Repetition
Suppose a code contains three different letters followed by two different digits.
Assume 26 letters and 10 digits are available.
The letter positions can be filled in:
26 × 25 × 24
ways.
The digit positions can be filled in:
10 × 9
ways.
Therefore:
Total codes = 26 × 25 × 24 × 10 × 9
Calculate the letter portion:
26 × 25 × 24 = 15,600
Calculate the digit portion:
10 × 9 = 90
Then:
Total codes = 15,600 × 90
Total codes = 1,404,000
There are 1,404,000 valid codes.
Worked Example: Selecting a Team
Suppose 12 employees are available and a project team of 4 must be selected.
Because the order in which the four names are selected does not change the team, this is a combination.
12C4 = 12! / (4! × 8!)
Simplify:
12C4 = (12 × 11 × 10 × 9) / (4 × 3 × 2 × 1)
12C4 = 11,880 / 24
12C4 = 495
There are 495 possible teams.
Combinatorics and Probability
Combinatorics frequently provides the counting step needed for probability.
For equally likely outcomes:
Probability = favorable outcomes / total outcomes
If both the numerator and denominator require counting many possible selections or arrangements, combinatorial formulas can make the calculation manageable.
For example, binomial probability uses combination coefficients because the same number of successes can occur in multiple different trial positions.
Another famous application is the birthday paradox, where counting and probability show that matching birthdays become surprisingly likely in a relatively small group.
Combinatorics and Prime Factorization
Large factorial expressions can contain enormous numbers. In some calculations, identifying their underlying prime factors can help analyze divisibility or simplify exact integer expressions.
That creates a connection with prime factorization, although prime factorization and combinatorics answer different primary questions.
Similarly, identifying common factors may help simplify some arithmetic expressions, but the purpose of combinatorics remains counting possible structures and outcomes.
Applications of Combinatorics
Combinatorics appears anywhere a finite collection of choices must be analyzed.
In computer science, it can describe possible passwords, search spaces, network arrangements, and algorithmic states.
In probability, it counts possible outcomes before probabilities are assigned.
In scheduling, it can measure possible assignments of people, jobs, rooms, or time slots.
In genetics, combinatorial thinking can describe possible inheritance patterns under simplified models.
In games and cards, it counts hands, arrangements, selections, and possible sequences of play.
In optimization, combinatorics helps reveal how quickly the number of possible solutions grows as a problem becomes larger.
Why Combinatorial Counts Become Large So Quickly
Combinatorial quantities often grow extremely fast.
For example:
5! = 120
10! = 3,628,800
15! = 1,307,674,368,000
This rapid growth explains why checking every possible arrangement can become impractical even when the original problem contains only a moderate number of objects.
It also explains why efficient mathematical counting is important: a compact formula can describe a search space far too large to enumerate manually.
When Combinatorics Is Not the Right Method
Not every mathematical question involving several numbers is combinatorial.
A problem about calculating lumber volume using board feet is fundamentally a measurement problem, not a counting-arrangements problem.
Likewise, completing the square is an algebraic procedure for transforming quadratic expressions and equations. It does not count selections or arrangements.
Recognizing the structure of a problem is therefore just as important as knowing a formula.
Common Combinatorics Mistakes
A frequent mistake is using a permutation when order does not matter, which counts the same group several times.
The reverse problem also occurs: using a combination when positions or rankings are distinct causes valid outcomes to be undercounted.
Another common error is ignoring repetition. Ten choices for every position produce a very different count from ten choices for the first position, nine for the next, and so on.
Factorial cancellation also causes errors. For example:
8! / 5!
is not 3!.
Instead:
8! / 5! = 8 × 7 × 6 = 336
It is also important to distinguish independent stages from mutually exclusive alternatives. Independent consecutive choices generally multiply, while separate either-or cases generally add.
How to Check a Combinatorics Answer
For a small version of the problem, list the outcomes manually.
If two objects A and B are arranged, the outcomes are:
AB
BA
So:
2! = 2
If two objects are selected from A, B, and C without regard to order, the groups are:
AB
AC
BC
So:
3C2 = 3
Small test cases can quickly reveal whether a formula is counting each outcome once, counting it several times, or missing valid possibilities.
Frequently Asked Questions
What is combinatorics in simple terms?
Combinatorics is the mathematics of counting possible selections, arrangements, and structures without having to list every possibility individually.
What are the main formulas used in combinatorics?
Common formulas include factorials, permutations, and combinations:
n! = n × (n – 1) × … × 1
nPr = n! / (n – r)!
nCr = n! / (r! × (n – r)!)
The multiplication and addition principles are also fundamental counting tools.
How do I know whether to use a permutation or combination?
Ask whether changing the order produces a different outcome. If order matters, use a permutation-based method. If only the selected group matters, use a combination-based method.
Is probability the same as combinatorics?
No. Combinatorics focuses on counting possibilities. Probability measures how likely an event is. However, combinatorial counting is frequently used to calculate probabilities.
Why is 0! equal to 1?
Defining 0! = 1 keeps factorial formulas consistent, including formulas for combinations and permutations where selecting or arranging zero objects can occur mathematically.
Does combinatorics always use factorials?
No. Some problems are solved directly with multiplication or addition. Problems involving repeated independent choices may use powers such as n^r instead of factorials.
What does it mean when repetition is allowed?
It means an object or option can be selected more than once. For example, a four-digit PIN normally permits the same digit to appear in multiple positions unless a restriction says otherwise.
What is the difference between counting and listing outcomes?
Listing writes out every possible outcome individually. Counting determines how many outcomes exist, usually through a rule or formula. Combinatorics is especially useful when listing every possibility would be impractical.
Final Example
Suppose a club has 9 members and needs to choose a president, vice president, and treasurer.
Because the three positions are different, order matters.
9P3 = 9! / 6!
9P3 = 9 × 8 × 7
9P3 = 504
There are 504 possible officer assignments.
If the same club instead selects an unordered three-person committee:
9C3 = 9! / (3! × 6!)
9C3 = (9 × 8 × 7) / (3 × 2 × 1)
9C3 = 84
There are only 84 different committees.
That contrast captures one of the central ideas in combinatorics: before calculating anything, determine exactly what makes two outcomes different.



