Combinations: counting selections when order doesn’t matter
A combination counts how many ways you can choose a group of \(r\) items from \(n\) distinct items
when the order of the chosen items is irrelevant. For example, if you form a 3-person team from 10 students,
the team \(\{A,B,C\}\) is the same team as \(\{C,B,A\}\), so we count it once. The standard notation is
\(\binom{n}{r}\), read “\(n\) choose \(r\)”, and the value is also called the binomial coefficient.
Why the formula is \( \binom{n}{r}=\dfrac{n!}{r!(n-r)!} \)
One way to derive the formula is to start from permutations. The number of ordered arrangements of \(r\) items from \(n\)
without repetition is \(P(n,r)=\dfrac{n!}{(n-r)!}\). But each unordered selection corresponds to exactly \(r!\) different
orders (every chosen set can be arranged in \(r!\) ways). Therefore, dividing removes the overcount:
\[
\binom{n}{r}=\frac{P(n,r)}{r!}=\frac{n!}{r!(n-r)!}.
\]
This is why the factorials appear: they are bookkeeping tools that handle “arrange” and then “un-arrange”.
Symmetry and a practical computation trick
A key identity is symmetry:
\[
\binom{n}{r}=\binom{n}{n-r}.
\]
Choosing \(r\) items to include is equivalent to choosing \(n-r\) items to exclude. In computation, this matters because it is
often faster to use \(k=\min(r,n-r)\), which keeps products short and reduces rounding risk. A stable product form is
\[
\binom{n}{r}=\prod_{i=1}^{k}\frac{n-k+i}{i},
\quad k=\min(r,n-r).
\]
This tool uses that product structure (and integer reductions) so results remain accurate even when the numbers are large.
Connections: Pascal’s triangle and the binomial theorem
Binomial coefficients appear in Pascal’s triangle, where each entry is the sum of the two above it.
They also appear in the binomial theorem:
\[
(x+y)^n=\sum_{r=0}^{n}\binom{n}{r}x^{n-r}y^{r}.
\]
This explains why \(\binom{n}{r}\) shows up across probability and algebra: it counts how many ways \(r\) successes can occur
among \(n\) independent trials, and it measures coefficients when expanding powers.
How to use this calculator
Enter \(n\) and \(r\) (or choose a preset like “6 from 49” for lottery-style counts). Click Calculate to see
the exact integer when feasible, plus a scientific-notation approximation for very large values.
The step-by-step section shows the factorial formula, applies symmetry by computing \(k=\min(r,n-r)\), and rewrites the result
using the product form. The interactive canvas illustrates what “choosing” means by highlighting selected items and animates the
product terms as you press Play. For university-level extensions, combinations can be generalized to
multisets (combinations with repetition) using “stars and bars”, producing counts like \(\binom{n+r-1}{r}\).