Pascal's triangle displays the binomial coefficients C(n, r). Click any cell to focus on it, then switch modes to see different identities the triangle encodes: Pascal's rule, hockey-stick sums, row sums (= 2n), and symmetry.
n =6?
Pascal's identity
Selected: C(4, 2) = 6
C(4, 2) = 4! / (2! · 2!) = 24 / (2 · 2) = 6
C(n, r) counts the number of ways to choose r items from a set of n distinct items (order doesn't matter).
Pascal's identity. Every interior cell equals the sum of the two cells immediately above it: C(n, r) = C(n−1, r−1) + C(n−1, r).
Pascal's triangle — a triangular array of integers where row n contains the binomial coefficients (0n),(1n),…,(nn). Each interior entry equals the sum of the two entries directly above it; the edges are all 1.
Binomial coefficient $\binom{n}{r}$ — the number of ways to choose r items from n distinct items without order. Equivalently the coefficient of an−rbr in the expansion of (a+b)n. Computed as (rn)=n!/(r!⋅(n−r)!).
Pascal's identity — the recurrence that builds the triangle: (rn)=(r−1n−1)+(rn−1). Every interior cell is the sum of the two cells above it.
Hockey-stick identity — a diagonal sum: ∑i=rn(ri)=(r+1n+1). The starting diagonal cells form the *stick*; the cell below-and-across is the *puck*.
Row sum — the cells in row n sum to 2n, counting the total number of subsets of an n-element set across all sizes.
Symmetry — within each row, (rn)=(n−rn). Choosing r items to include is the same as choosing n−r items to exclude.
Focus — the cell currently selected by clicking. The four modes highlight different relatives of the focus cell.
Getting Started
The tool opens with N=6 (rows 0 through 6) and the cell (24)=6 already focused under Pascal's identity mode. The scene splits into four areas:
• The triangle — clickable cells arranged in rows 0 through N. The focused cell is filled in accent blue; its relatives (depending on mode) appear with amber or green outlines.
• A polynomial banner below the triangle showing the focused row's expansion of (a+b)n. The triangle's row values *are* the polynomial's coefficients.
• A mode group in the control bar with four buttons: *Pascal's identity*, *Hockey stick*, *Row sum*, *Symmetry*.
• A right info panel showing the factorial breakdown (rn)=n!/(r!⋅(n−r)!) for the focused cell, plus an identity-specific arithmetic block.
To explore:
• Click any cell to focus it. The triangle re-highlights and the right panel updates with the factorial breakdown and the active identity's specific arithmetic for that cell.
• Switch modes to see the same focused cell through a different identity.
• Adjust N to add or remove rows.
• Clear selection to return to an unfocused view.
Clicking Cells and Focus
Every cell in the triangle is clickable. Clicking a cell sets it as the focus — the anchor for whichever identity mode is currently active.
The focused cell renders in solid accent blue with white text, and its label C(n,r) appears just below it. The right panel immediately shows:
• The selected coefficient — *Selected: C(n,r)=v*.
• The factorial breakdown — C(n,r)=n!/(r!⋅(n−r)!)=v, fully expanded.
• A short interpretation reminder — *C(n,r) counts the number of ways to choose r items from a set of n distinct items*.
• The current mode's identity, applied to this cell.
If you reduce N below the focused cell's row, the focus clears automatically. Press Clear selection in the control bar to clear focus manually; the cells return to their default outlined state and the right panel shows a hint to click any cell.
The polynomial banner always shows the row of the focused cell (or row 0 when nothing is focused).
Mode 1 — Pascal's Identity
Pascal's identity says every interior cell is the sum of the two cells immediately above it:
(rn)=(r−1n−1)+(rn−1)
In this mode, the focused cell is connected to its two parents by dashed accent lines, and both parents are outlined in amber as *related* cells. The right panel shows the concrete arithmetic — for example, with focus on (24):
(24)=(13)+(23)=3+3=6.
Edge cases:
• Apex(00)=1 has no parents — by convention.
• Left edge(0n) has only one parent (0n−1), which is always 1, so left edges are all 1.
• Right edge(nn) has only one parent (n−1n−1), also 1, so right edges are all 1.
This identity is what *builds* the triangle — knowing the top row, you can construct every subsequent row by addition alone, without ever computing factorials.
Mode 2 — Hockey Stick
The hockey-stick identity says a diagonal of cells starting from a column-r entry sums to the cell one row below and one column to the right:
i=r∑n(ri)=(r+1n+1)
In this mode, treat the focused cell as the *puck* — the cell where all the action ends up. The triangle highlights the diagonal stick (cells one column to the left, running from the puck's row back up to the row matching that column) and draws an amber path connecting them down to the puck.
For example, focusing on (25)=10:
(11)+(12)+(13)+(14)=1+2+3+4=10=(25).
The right panel shows the full chain of column-1 cells summing to the puck.
The mode reveals why the formula for triangular numbers 1+2+⋯+n=(2n+1) holds — it's just the column-1 hockey stick.
If the focused cell is in column 0, no valid stick exists; the right panel shows a hint to pick a cell with column ≥ 1.
Mode 3 — Row Sum
The row-sum identity says the cells in row n add up to 2n:
r=0∑n(rn)=2n
In this mode, every cell in the focused row (other than the focus itself) is outlined in amber as *related*. A label appears on the right edge of the row showing *sum = 2n*. The right panel lists the full sum:
For row 4: (04)+(14)+(24)+(34)+(44)=1+4+6+4+1=16=24.
Combinatorial interpretation: each binomial coefficient (rn) counts subsets of size r from an n-element set. Summing across all sizes counts all subsets, of which there are 2n (each of the n elements is independently in or out).
This identity is the source of many later results — for example, the expected size of a random subset of {1,…,n} is n/2 because the row sum decomposition is symmetric around r=n/2.
Mode 4 — Symmetry
The symmetry identity says each row is a palindrome:
(rn)=(n−rn)
In this mode, the focused cell and its mirror across the row's center are both highlighted, and a curved green arc connects them through the row label above.
For example, focusing on (27)=21:
(27)=(57)=21.
Combinatorial reading: choosing r items to include in a selection is the same as choosing n−r items to leave out. The two selections describe identical events from opposite sides.
Special case — the center of an even-length row maps to itself. Focusing on (24) when n−r=r gives a self-symmetry; the right panel notes this and skips the arc since the focus and the mirror coincide.
This identity is why the triangle is left-right symmetric and why so many identities have *dual* forms — you can always swap r with n−r to get an equivalent statement.
The Polynomial Banner
Below the triangle sits a banner labeled *ROW n = COEFFICIENTS OF (a + b)^n*, showing the full expansion of the focused row's polynomial.
For row 4:
(a+b)4=a4+4a3b+6a2b2+4ab3+b4
This is the binomial theorem: the coefficient of an−rbr is exactly (rn). The triangle's row values *are* the polynomial's coefficients, in order.
The banner updates whenever you focus a cell in a different row, making it easy to see why each row of Pascal's triangle answers two questions at once:
• How many subsets of size r exist in an n-element set?
• What is the coefficient of an−rbr when you multiply (a+b) by itself n times?
For higher n the polynomial is rendered at a smaller font to fit; the actual values remain accurate. The banner color matches the formula card styling used elsewhere in the tool.
What Are Binomial Coefficients
The binomial coefficient(rn) — read *n choose r* — is one of the most important numbers in combinatorics. It admits several equivalent definitions:
Counting subsets.(rn) is the number of r-element subsets of an n-element set.
Polynomial coefficient.(rn) is the coefficient of an−rbr in (a+b)n. This is the *binomial theorem*:
(a+b)n=r=0∑n(rn)an−rbr
Factorial formula.(rn)=r!(n−r)!n!.
Recursive definition.(rn)=(r−1n−1)+(rn−1) with edge values (0n)=(nn)=1.
Examples:
• (25)=10: there are 10 ways to choose 2 items from 5, and the coefficient of a3b2 in (a+b)5 is 10.
• (552)=2,598,960: the number of 5-card poker hands from a standard deck.
• (510)=252: middle term of (a+b)10, and the maximum entry of row 10.
For deeper coverage including identities, generating functions, and applications, see the binomial coefficients section on the combinations theory page.
Why These Identities Matter
The four identities highlighted in this tool aren't isolated curiosities — they're the workhorses of combinatorial proofs and probability calculations.
Pascal's identity is the recursive backbone. It lets you compute any (rn) from smaller ones without ever multiplying or dividing factorials. It also gives a *combinatorial proof*: pick a specific element; either you include it (giving (r−1n−1)) or you don't (giving (rn−1)).
Hockey-stick appears in counting problems where you fix the maximum element of a subset. The number of subsets of {1,…,n+1} with r+1 elements is (r+1n+1), and grouping by the max element gives the diagonal sum.
Row sum $2^n$ is the source of countless probability results — it underlies binomial distribution normalization, the cardinality of power sets, and the fact that n-bit binary strings number 2n.
Symmetry is invoked whenever a problem becomes easier from the *complementary* viewpoint — for example, computing (97100) as (3100)=161,700 rather than evaluating 97! directly.
Together, these four are sufficient to derive most other binomial identities by combination and induction.
Related Concepts
Simple combination — the no-repetition unordered selection. Formula (rn) exactly; the triangle is the lookup table for all such values.
Binomial theorem — (a+b)n=∑r=0n(rn)an−rbr. The triangle visualizes this expansion row by row.
Multinomial coefficient — generalizes the binomial to more than two parts: (n1,n2,…,nkn)=n!/(n1!⋯nk!). The binomial is the k=2 case.
Combination with repetition — counts multisets, (rn+r−1). Different formula, different position in the triangle.
Permutation — ordered selections, n!/(n−r)!. Related but distinct from the unordered combinations shown here.
Catalan numbers — appear in Pascal's triangle along a specific diagonal: Cn=(n2n)/(n+1).
Vandermonde's identity — (rm+n)=∑k(km)(r−kn). Another classical binomial identity expressible through the triangle.
Lucas's theorem — for prime p, (nm)modp is computable digit-by-digit in base p. Reveals fractal structures (Sierpiński patterns) when the triangle is reduced modulo a prime.
Binomial coefficient calculator — to compute (rn) for larger n, see the n choose r calculator.