Combinations

How many different 5-card poker hands can be dealt from a standard 52-card deck? The answer is not 52×51×50×49×4852 \times 51 \times 50 \times 49 \times 48. A hand does not care about the order in which the cards arrived. Only which five cards you end up holding matters. This distinction is between arrangements that count order and selections that ignore it. It is one of the two founding pillars of enumerative combinatorics. The other pillar is Permutations. A combination is precisely an unordered selection of objects from a collection. The central object of study is the count of such selections. It is denoted (nr)\binom{n}{r} and called the binomial coefficient. Combinations matter because "how many subsets of size rr?" resurfaces everywhere. Examples include choosing a committee from a group of people. Or choosing which coordinates of a bit string are 11. Or choosing which terms survive when you expand (x+y)n(x+y)^n. Or choosing a sample in a probability experiment. The formula for (nr)\binom{n}{r} is deceptively simple. But its proof — via the quotient rule linking permutations and combinations — is a template. It applies to a huge swath of combinatorial arguments. You can build a bijection, count the same set two ways, or divide out an overcounting factor. The big picture is this: permutations count ordered selections, combinations count unordered ones. The relationship between them is governed by a clean division. Once (nr)\binom{n}{r} is established, an enormous structure opens up. This includes Pascal's triangle, the Binomial Theorem, and symmetric identities. It also includes generalizations like Combinations with Repetition, where objects may be chosen more than once. This article gives the rigorous definition of a combination. It proves the standard formula for (nr)\binom{n}{r} two independent ways. It works through nontrivial numerical examples. It also shows exactly which hypotheses are essential by breaking them. These hypotheses include distinctness of objects and no repetition in a selection.

Key takeaways
  • A combination is an unordered selection of rr objects from a set of nn distinct objects, i.e., an rr-element subset.
  • The number of rr-combinations of an nn-set is (nr)=n!r!(n−r)!\binom{n}{r} = \dfrac{n!}{r!(n-r)!}, valid for integers 0≤r≤n0 \le r \le n.
  • Combinations differ from Permutations by exactly the factor r!r!: every subset corresponds to r!r! ordered arrangements.
  • (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r} (choosing what stays equals choosing what goes) and (n0)=(nn)=1\binom{n}{0}=\binom{n}{n}=1.
  • Two independent proofs are given: the quotient-rule (division) proof and a bijective/counting-in-two-ways proof via Pascal's identity.
  • Key idea: counting unordered selections means counting ordered ones and then dividing by the number of orders each selection admits.

Where this lives today

Combinations are the arithmetic backbone of discrete probability: the probability of drawing a specific hand in card games, a specific configuration in a lottery, or a specific outcome in sampling-without-replacement problems is almost always a ratio of binomial coefficients (hypergeometric distributions). In computer science, (nr)\binom{n}{r} governs the running time and correctness analysis of brute-force subset enumeration, feature-selection algorithms in machine learning, and combinatorial optimization bounds. In coding theory and cryptography, binomial coefficients count the number of possible error patterns of a given weight, directly informing the design and analysis of error-correcting codes and the security parameters of code-based cryptosystems. In statistics, (nr)\binom{n}{r} is the normalizing count behind the binomial distribution, and in physics, combinations count microstates in statistical mechanics (e.g., the number of ways to place rr indistinguishable particles into nn distinguishable energy cells subject to exclusion, as in Fermi–Dirac-type counting). The identity (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r} and its relatives feed directly into the Binomial Theorem and the broader web of Binomial Identities used throughout generating-function methods.

Ask the tutor: How does (nr)\binom{n}{r} become the coefficients in the expansion of (x+y)n(x+y)^n under the Binomial Theorem?

DefinitionCombination and the binomial coefficient

Let nn and rr be nonnegative integers with 0≤r≤n0 \le r \le n, and let SS be a set with ∣S∣=n|S| = n distinct elements. An rr-combination of SS (also called an rr-combination of nn objects, or simply an unordered selection) is a subset T⊆ST \subseteq S with ∣T∣=r|T| = r. The number of rr-combinations of an nn-element set is denoted

(nr)(read "n choose r"),\binom{n}{r} \quad \text{(read "}n\text{ choose }r\text{")},

also written C(n,r)C(n,r) or  nCr\,{}_nC_r. By convention this quantity depends only on nn and rr, not on which particular set SS is used, since any two nn-element sets are in bijection with each other and this bijection carries rr-subsets to rr-subsets. For r>nr > n or r<0r < 0, we define (nr)=0\binom{n}{r} = 0, since no rr-element subset of an nn-element set can exist in those cases.

Intuition

Think of a permutation as a seating arrangement: you pick rr objects and decide the order they occupy rr labeled positions. A combination is what remains after you take a photograph of the seating arrangement and then throw away the seat labels — all that survives is who was chosen, not where they sat. Every unordered group of rr people can be seated in r!r! different ordered ways, so the ordered count is exactly r!r! times the unordered count. This single observation — each unordered outcome is "hit" the same number of times by the ordered counting process — is the quotient rule, and it is the engine behind the formula for (nr)\binom{n}{r}. A second useful picture: an rr-combination of {1,2,…,n}\{1, 2, \dots, n\} corresponds exactly to a length-nn binary string with rr ones and n−rn-r zeros (put a 11 in position ii if ii is chosen). Counting subsets of size rr is the same problem as counting binary strings with rr ones — a reformulation that becomes the natural bridge to the Binomial Theorem, where (nr)\binom{n}{r} appears as the coefficient of xryn−rx^r y^{n-r} in (x+y)n(x+y)^n.

Figure
From a 5-set to its 3-subsets: overcounting by order, then dividing by 3! = 6
Set S = {A, B, C, D, E}, choosing r = 3 Ordered selections (permutations): P(5,3) = 5·4·3 = 60 e.g. (A,B,C) (B,A,C) (C,A,B) (A,C,B) (B,C,A) (C,B,A) ← 6 orderings, 1 subset {A,B,C} …and 59 other ordered triples covering the remaining subsets Divide by r! = 3! = 6 orderings per subset Unordered selections (combinations): C(5,3) = 60 / 6 = 10 {A,B,C} {A,B,D} {A,B,E} {A,C,D} {A,C,E} {A,D,E} {B,C,D} {B,C,E} {B,D,E} {C,D,E} Each of the 10 subsets is counted exactly 3! = 6 times among the 60 ordered triples.
TheoremFormula for the number of combinations

Let n,rn, r be integers with 0≤r≤n0 \le r \le n. The number of rr-combinations of a set with nn distinct elements is

(nr)=n!r! (n−r)!.\binom{n}{r} = \frac{n!}{r!\,(n-r)!}.
Proof

We give the standard quotient-rule proof, which reduces the unordered counting problem to the already-established formula for permutations, P(n,r)=n!(n−r)!P(n,r) = \dfrac{n!}{(n-r)!} (the number of ways to choose and arrange rr objects from nn in order).

Step 1: Set up the two-step counting process. Fix an nn-element set SS. Let C\mathcal{C} denote the collection of all rr-element subsets of SS (the rr-combinations), and let P\mathcal{P} denote the collection of all ordered rr-tuples of distinct elements of SS (the rr-permutations). We know ∣P∣=P(n,r)=n!(n−r)!|\mathcal{P}| = P(n,r) = \dfrac{n!}{(n-r)!}, proved independently in the theory of Permutations by the product rule: there are nn choices for the first position, n−1n-1 for the second, down to n−r+1n-r+1 for the rr-th.

Step 2: Build the surjection from P\mathcal{P} to C\mathcal{C}. Define a map f:P→Cf : \mathcal{P} \to \mathcal{C} that sends an ordered tuple (a1,a2,…,ar)(a_1, a_2, \dots, a_r) to its underlying set {a1,a2,…,ar}\{a_1, a_2, \dots, a_r\}. Since the entries of a tuple in P\mathcal P are distinct elements of SS, this underlying set indeed has exactly rr elements, so ff is well defined into C\mathcal{C}. The map ff is surjective: given any rr-subset T={b1,…,br}∈CT = \{b_1, \dots, b_r\} \in \mathcal{C}, the tuple (b1,…,br)(b_1, \dots, b_r) (in any fixed order) is an element of P\mathcal{P} mapping to TT.

Step 3: Compute the size of each fiber. Fix T∈CT \in \mathcal{C}, an rr-element subset. We claim f−1(T)f^{-1}(T), the set of ordered tuples whose underlying set is exactly TT, has size r!r!. Indeed, a tuple (a1,…,ar)∈P(a_1,\dots,a_r) \in \mathcal P satisfies f(a1,…,ar)=Tf(a_1,\dots,a_r) = T if and only if (a1,…,ar)(a_1,\dots,a_r) is a listing of the rr elements of TT in some order, with no repetitions (repetitions are already excluded since P\mathcal P consists of tuples of distinct elements). The number of orderings of an rr-element set is r!r!, by the standard permutation count applied to the set TT itself (arrange all rr of its elements: rr choices, then r−1r-1, ..., then 11, giving r⋅(r−1)⋯1=r!r \cdot (r-1) \cdots 1 = r!). Hence ∣f−1(T)∣=r!|f^{-1}(T)| = r! for every T∈CT \in \mathcal{C}.

Step 4: Apply the sum/partition principle. The sets {f−1(T):T∈C}\{f^{-1}(T) : T \in \mathcal{C}\} partition P\mathcal{P}, because every tuple in P\mathcal P has a well-defined underlying subset (it lies in exactly one fiber). Therefore

∣P∣=∑T∈C∣f−1(T)∣=∑T∈Cr!=∣C∣⋅r!,|\mathcal{P}| = \sum_{T \in \mathcal{C}} |f^{-1}(T)| = \sum_{T \in \mathcal{C}} r! = |\mathcal{C}| \cdot r!,

since there are ∣C∣|\mathcal C| terms in the sum, each equal to r!r! by Step 3.

Step 5: Solve for ∣C∣|\mathcal{C}|. Since r!≥1>0r! \ge 1 > 0, we may divide:

∣C∣=∣P∣r!=P(n,r)r!=n!/(n−r)!r!=n!r! (n−r)!.|\mathcal{C}| = \frac{|\mathcal{P}|}{r!} = \frac{P(n,r)}{r!} = \frac{n!/(n-r)!}{r!} = \frac{n!}{r!\,(n-r)!}.

By definition ∣C∣=(nr)|\mathcal{C}| = \binom{n}{r}, since C\mathcal C is exactly the set of rr-combinations of SS. This proves the formula. ■\blacksquare

∎
LemmaSymmetry identity

For integers 0≤r≤n0 \le r \le n,

(nr)=(nn−r).\binom{n}{r} = \binom{n}{n-r}.
Proof

By the formula just proved,

(nr)=n!r!(n−r)!,(nn−r)=n!(n−r)! (n−(n−r))!=n!(n−r)! r!.\binom{n}{r} = \frac{n!}{r!(n-r)!}, \qquad \binom{n}{n-r} = \frac{n!}{(n-r)!\,(n-(n-r))!} = \frac{n!}{(n-r)!\,r!}.

The two right-hand sides are identical expressions (multiplication is commutative in the denominator), so the identity holds algebraically. Combinatorially, this reflects the complementation bijection T↦S∖TT \mapsto S \setminus T, which sends an rr-subset of SS to an (n−r)(n-r)-subset of SS; it is its own inverse, hence a bijection between the two collections, so they have equal size. ■\blacksquare

∎
CorollaryBoundary values

For every integer n≥0n \ge 0: (n0)=1\binom{n}{0} = 1 and (nn)=1\binom{n}{n} = 1.

Proof

Directly from the formula, using 0!=10! = 1: (n0)=n!0! n!=1\binom{n}{0} = \frac{n!}{0!\,n!} = 1 and (nn)=n!n! 0!=1\binom{n}{n} = \frac{n!}{n!\,0!} = 1. Combinatorially, the only 00-element subset of any set is the empty set, and the only nn-element subset of an nn-element set is the whole set. ■\blacksquare

∎

Worked examples

Example 1 — Committee selection with a structural constraint. A university club has 1212 members: 77 juniors and 55 seniors. A steering committee of 44 people is to be chosen, with the requirement that at least 22 seniors are on the committee. How many such committees are possible? We split into cases by the exact number of seniors, since "at least 2" is not directly a single binomial coefficient — it is a sum over disjoint cases. Case k=2k=2 seniors, 22 juniors: choose which 22 of the 55 seniors, and independently which 22 of the 77 juniors:

(52)(72)=10⋅21=210.\binom{5}{2}\binom{7}{2} = 10 \cdot 21 = 210.

Case k=3k=3 seniors, 11 junior:

(53)(71)=10⋅7=70.\binom{5}{3}\binom{7}{1} = 10 \cdot 7 = 70.

Case k=4k=4 seniors, 00 juniors:

(54)(70)=5⋅1=5.\binom{5}{4}\binom{7}{0} = 5 \cdot 1 = 5.

These three cases are pairwise disjoint (a committee has a unique number of seniors) and together exhaust all committees with at least 22 seniors, so by the sum rule the total is

210+70+5=285.210 + 70 + 5 = 285.

As a check via complementary counting: the total number of 44-person committees from 1212 people is (124)=12!4! 8!=495\binom{12}{4} = \frac{12!}{4!\,8!} = 495. Committees with fewer than 22 seniors are those with 00 or 11 senior:

(50)(74)+(51)(73)=1⋅35+5⋅35=35+175=210.\binom{5}{0}\binom{7}{4} + \binom{5}{1}\binom{7}{3} = 1\cdot 35 + 5 \cdot 35 = 35 + 175 = 210.

Then 495−210=285495 - 210 = 285, matching the direct computation exactly.

Example 2 — A lattice path count via a bijection to combinations. How many shortest lattice paths go from (0,0)(0,0) to (9,4)(9,4) on the integer grid, moving only right (RR) or up (U)U) one step at a time? Any shortest such path takes exactly 99 steps of type RR and 44 steps of type UU (since the xx-coordinate must increase by 99 total and the yy-coordinate by 44 total, and no step decreases either coordinate). A path is completely determined by choosing, among its 9+4=139+4 = 13 total steps, which 44 of the 1313 positions are UU-steps (the rest are automatically RR). This is exactly an unordered selection of a 44-element subset from a 1313-element set of step-positions — a combination, not a permutation, because swapping which two UU-steps occupy which of their chosen positions changes nothing about the resulting string of R's and U's. Hence the number of such paths is

(134)=13!4! 9!=13⋅12⋅11⋅104⋅3⋅2⋅1=1716024=715.\binom{13}{4} = \frac{13!}{4!\,9!} = \frac{13 \cdot 12 \cdot 11 \cdot 10}{4 \cdot 3 \cdot 2 \cdot 1} = \frac{17160}{24} = 715.

As a sanity check with the symmetry lemma, choosing which 99 positions are RR should give the same count: (139)=(134)=715\binom{13}{9} = \binom{13}{4} = 715, confirming the identity (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r} in a nontrivial, asymmetric case (9≠49 \ne 4).

CounterexampleWhy "distinct objects, unordered, no repetition" cannot be dropped

The formula (nr)=n!r!(n−r)!\binom{n}{r} = \frac{n!}{r!(n-r)!} is a theorem about selecting rr-element subsets of a set of nn distinct elements — no element may be chosen twice, and repeated elements in the source are forbidden by the very meaning of "set." Drop the hypothesis that the source objects are distinct, and the formula fails outright. Consider n=4n = 4 "objects" that are not distinct: the multiset M={a,a,b,c}M = \{a, a, b, c\} (say, three chips, two of which happen to be identical red chips aa, plus one blue chip bb and one green chip cc). Ask for the number of ways to select 22 chips, where two selections are considered the same outcome exactly when they contain the same multiset of colors. If we naively applied (42)=6\binom{4}{2} = 6, we would be counting as if all four objects were distinguishable, listing selections such as {a1,a2},{a1,b},{a1,c},{a2,b},{a2,c},{b,c}\{a_1,a_2\}, \{a_1,b\}, \{a_1,c\}, \{a_2,b\}, \{a_2,c\}, \{b,c\} using subscripts to fake distinctness. But {a1,a2}\{a_1,a_2\} is really just "two red chips" (one outcome), {a1,b}\{a_1,b\} and {a2,b}\{a_2,b\} are really the same outcome "one red, one blue" (collapsing two of the six into one), and likewise {a1,c}\{a_1,c\} and {a2,c}\{a_2,c\} collapse into "one red, one green." The genuinely distinct outcomes are:

{red,red},{red,blue},{red,green},{blue,green},\{\text{red,red}\}, \quad \{\text{red,blue}\}, \quad \{\text{red,green}\}, \quad \{\text{blue,green}\},

which is 44 outcomes, not 66. The formula (42)=6\binom{4}{2}=6 overcounts by exactly the multiplicity collapsing caused by the repeated element aa. This shows the hypothesis "SS has nn distinct elements" is not a formality — remove it, and the clean quotient-rule proof breaks at Step 3: the fiber sizes ∣f−1(T)∣|f^{-1}(T)| are no longer uniformly r!r!, because some tuples that look different as ordered lists (e.g. (a1,a2)(a_1, a_2) vs. (a2,a1)(a_2, a_1) using two copies of the same physical chip aa) do not correspond to genuinely different orderings of distinguishable items, collapsing further than the formula assumes. Counting multisets correctly requires the separate theory of Combinations with Repetition, where a different formula, (n+r−1r)\binom{n+r-1}{r}, applies to selections drawn with repetition from nn distinct types.

Scope, edge cases & common traps

SituationCorrect handling
r=0r = 0(n0)=1\binom{n}{0} = 1 (the empty selection is always available, exactly one way)
r=nr = n(nn)=1\binom{n}{n} = 1 (select everything, exactly one way)
r>nr > n(nr)=0\binom{n}{r} = 0 by convention; no subset that large exists
Order matters in the problemUse P(n,r)=n!/(n−r)!P(n,r) = n!/(n-r)!, not (nr)\binom{n}{r}
Objects repeat / selection allows repeatsUse Combinations with Repetition, not this formula
"At least/at most kk" constraintsSum disjoint cases or use complementary counting, never a single binomial coefficient

The mathematician behind it

Origins · 1 minBlaise Pascal and how this was discovered
BP
Blaise Pascal
1623–1662 · 17th-century France, correspondence with Fermat on games of chance

Pascal was a mathematician, physicist, and philosopher whose 1654 correspondence with Pierre de Fermat, prompted by a gambling problem posed by the Chevalier de Méré, is often cited as a founding moment of formal probability theory. Pascal's Traité du triangle arithmétique (1654, published 1665) systematically organized the binomial coefficients into the triangular array now called Pascal's triangle, established the recurrence (nr)=(n−1r−1)+(n−1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}, and connected the triangle to combinations, probabilities in games of chance, and the coefficients arising in the expansion of (x+y)n(x+y)^n. The triangle and many of its properties had been discovered independently earlier — in India, Persia, and China (notably by Yang Hui and, before him, in the Chandaḥśāstra of Piṅgala) — but Pascal's treatise gave the first fully systematic, proof-based European treatment linking it to combinatorics and probability.

History
- ~200 BCE: Indian mathematician Piṅgala's work on prosody implicitly tabulates binomial-coefficient-like counts.
- 1261 CE: Yang Hui, in China, publishes a triangular array of binomial coefficients (building on the earlier Jia Xian).
- 1654: Pascal and Fermat exchange letters resolving problems of games of chance, laying groundwork for probability.
- 1665: Pascal's Traité du triangle arithmétique is published posthumously, systematizing (nr)\binom{n}{r} and its triangle.
- 1713: Jacob Bernoulli's Ars Conjectandi further formalizes combinations in the context of probability theory.
What exactly distinguishes a combination from a permutation?

A permutation is an ordered selection: the outcome depends on which objects are chosen and the order/role assigned to each. A combination is an unordered selection: only the set of chosen objects matters, not any order among them. Formally, permutations of rr objects from nn are counted by tuples with distinct entries, P(n,r)=n!/(n−r)!P(n,r) = n!/(n-r)!, while combinations are counted by subsets, (nr)=n!/(r!(n−r)!)\binom{n}{r} = n!/(r!(n-r)!). Since every rr-element subset can be arranged in r!r! different orders, P(n,r)=r!⋅(nr)P(n,r) = r!\cdot \binom{n}{r} always holds — permutations are always at least as numerous as combinations for r≥1r \ge 1, and equal only when r≤1r \le 1.

Why is (nr)\binom{n}{r} always an integer, given that its formula involves division?

This follows from the combinatorial meaning: (nr)\binom{n}{r} counts an actual finite set of subsets, so it must be a nonnegative integer regardless of how the formula is algebraically simplified. One can also prove integrality directly from Pascal's identity (nr)=(n−1r−1)+(n−1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r} by induction on nn, since a sum of two integers is an integer, with base case (00)=1\binom{0}{0}=1. This gives an independent, purely arithmetic proof of integrality that does not rely on the counting interpretation at all.

Does (nr)\binom{n}{r} make sense for non-integer or negative nn?

The combinatorial definition (counting subsets) requires nn to be a nonnegative integer, since it refers to the size of an actual finite set. However, the algebraic expression (xr)=x(x−1)⋯(x−r+1)r!\binom{x}{r} = \frac{x(x-1)\cdots(x-r+1)}{r!} makes sense for any real or complex xx and nonnegative integer rr, and this generalized binomial coefficient is exactly what appears in Newton's generalized binomial series. That extension is a separate, purely algebraic construction; it agrees with the combinatorial (nr)\binom{n}{r} whenever x=nx=n is a nonnegative integer, but the counting proof given here applies only in that integer regime.

How do combinations relate to the rows of Pascal's triangle?

Row nn of Pascal's triangle (starting the count at row 00) lists (n0),(n1),…,(nn)\binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n} in order. The recurrence generating each entry from the row above, (nr)=(n−1r−1)+(n−1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}, has a direct combinatorial proof: fix one distinguished element xx in an nn-set; an rr-subset either contains xx (then choose the remaining r−1r-1 elements from the other n−1n-1: (n−1r−1)\binom{n-1}{r-1} ways) or excludes xx (then choose all rr elements from the other n−1n-1: (n−1r)\binom{n-1}{r} ways), and these two cases are disjoint and exhaustive.

Can (nr)\binom{n}{r} be computed without evaluating large factorials directly?

Yes, and this matters for both hand computation and numerical stability. The multiplicative formula

(nr)=n(n−1)⋯(n−r+1)r!\binom{n}{r} = \frac{n(n-1)\cdots(n-r+1)}{r!}

avoids computing n!n! and (n−r)!(n-r)! separately as huge intermediate numbers; it only involves rr factors in the numerator. Computing terms iteratively (multiply by (n−i+1)(n-i+1), divide by ii, at each step i=1,…,ri=1,\dots,r) also guarantees every intermediate quantity stays an integer, since (ni)\binom{n}{i} is an integer at every step, which is useful for exact arithmetic in software implementations.

Why does the problem's wording sometimes hide whether it wants a permutation or combination?

Natural language is often ambiguous about whether the roles assigned to selected objects are distinguishable. The safest method is to ask: if I select the same objects but assign them differently (different order, different labels, different positions), is that a new outcome? If yes, use P(n,r)P(n,r); if the outcome is identical regardless of internal order, use (nr)\binom{n}{r}. Concrete tests help: "choose a committee" (no roles) is a combination; "choose a president and vice-president" (roles attached) is a permutation, even though both use the verb "choose."

Before this

Where this leads