Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Pascal's Triangle


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?
n = 0n = 1n = 2n = 3n = 4n = 5n = 61111211331146C(4, 2)41151010511615201561ROW 4 = COEFFICIENTS OF (a + b)(a + b) = a⁴ + 4a³b + 6a²b² + 4ab³ + b⁴
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).
C(4, 2) = C(3, 1) + C(3, 2)
= 3 + 3 = 6





Key Terms



Key Terms

Pascal's triangle — a triangular array of integers where row nn contains the binomial coefficients (n0),(n1),,(nn)\binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n}. Each interior entry equals the sum of the two entries directly above it; the edges are all 11.

Binomial coefficient $\binom{n}{r}$ — the number of ways to choose rr items from nn distinct items without order. Equivalently the coefficient of anrbra^{n-r} b^r in the expansion of (a+b)n(a + b)^n. Computed as (nr)=n!/(r!(nr)!)\binom{n}{r} = n! / (r! \cdot (n-r)!).

Pascal's identity — the recurrence that builds the triangle: (nr)=(n1r1)+(n1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}. Every interior cell is the sum of the two cells above it.

Hockey-stick identity — a diagonal sum: i=rn(ir)=(n+1r+1)\sum_{i=r}^{n} \binom{i}{r} = \binom{n+1}{r+1}. The starting diagonal cells form the *stick*; the cell below-and-across is the *puck*.

Row sum — the cells in row nn sum to 2n2^n, counting the total number of subsets of an nn-element set across all sizes.

Symmetry — within each row, (nr)=(nnr)\binom{n}{r} = \binom{n}{n-r}. Choosing rr items to include is the same as choosing nrn - 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=6N = 6 (rows 00 through 66) and the cell (42)=6\binom{4}{2} = 6 already focused under Pascal's identity mode. The scene splits into four areas:

The triangle — clickable cells arranged in rows 00 through NN. 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(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 (nr)=n!/(r!(nr)!)\binom{n}{r} = n! / (r! \cdot (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)C(n, r) appears just below it. The right panel immediately shows:

• The selected coefficient — *Selected: C(n,r)=vC(n, r) = v*.

• The factorial breakdown — C(n,r)=n!/(r!(nr)!)=vC(n, r) = n!/(r! \cdot (n-r)!) = v, fully expanded.

• A short interpretation reminder — *C(n,r)C(n, r) counts the number of ways to choose rr items from a set of nn distinct items*.

• The current mode's identity, applied to this cell.

If you reduce NN 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 00 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:

(nr)=(n1r1)+(n1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}


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 (42)\binom{4}{2}:

(42)=(31)+(32)=3+3=6\binom{4}{2} = \binom{3}{1} + \binom{3}{2} = 3 + 3 = 6.

Edge cases:

Apex (00)=1\binom{0}{0} = 1 has no parents — by convention.

Left edge (n0)\binom{n}{0} has only one parent (n10)\binom{n-1}{0}, which is always 11, so left edges are all 11.

Right edge (nn)\binom{n}{n} has only one parent (n1n1)\binom{n-1}{n-1}, also 11, so right edges are all 11.

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-rr entry sums to the cell one row below and one column to the right:

i=rn(ir)=(n+1r+1)\sum_{i=r}^{n} \binom{i}{r} = \binom{n+1}{r+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 (52)=10\binom{5}{2} = 10:

(11)+(21)+(31)+(41)=1+2+3+4=10=(52)\binom{1}{1} + \binom{2}{1} + \binom{3}{1} + \binom{4}{1} = 1 + 2 + 3 + 4 = 10 = \binom{5}{2}.

The right panel shows the full chain of column-11 cells summing to the puck.

The mode reveals why the formula for triangular numbers 1+2++n=(n+12)1 + 2 + \dots + n = \binom{n+1}{2} holds — it's just the column-11 hockey stick.

If the focused cell is in column 00, no valid stick exists; the right panel shows a hint to pick a cell with column ≥ 11.

Mode 3 — Row Sum

The row-sum identity says the cells in row nn add up to 2n2^n:

r=0n(nr)=2n\sum_{r=0}^{n} \binom{n}{r} = 2^n


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 = 2n2^n*. The right panel lists the full sum:

For row 44: (40)+(41)+(42)+(43)+(44)=1+4+6+4+1=16=24\binom{4}{0} + \binom{4}{1} + \binom{4}{2} + \binom{4}{3} + \binom{4}{4} = 1 + 4 + 6 + 4 + 1 = 16 = 2^4.

Combinatorial interpretation: each binomial coefficient (nr)\binom{n}{r} counts subsets of size rr from an nn-element set. Summing across all sizes counts all subsets, of which there are 2n2^n (each of the nn 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}\{1, \dots, n\} is n/2n/2 because the row sum decomposition is symmetric around r=n/2r = n/2.

Mode 4 — Symmetry

The symmetry identity says each row is a palindrome:

(nr)=(nnr)\binom{n}{r} = \binom{n}{n - r}


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 (72)=21\binom{7}{2} = 21:

(72)=(75)=21\binom{7}{2} = \binom{7}{5} = 21.

Combinatorial reading: choosing rr items to include in a selection is the same as choosing nrn - 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 (42)\binom{4}{2} when nr=rn - 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 rr with nrn - 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 44:

(a+b)4=a4+4a3b+6a2b2+4ab3+b4(a + b)^4 = a^4 + 4 a^3 b + 6 a^2 b^2 + 4 a b^3 + b^4


This is the binomial theorem: the coefficient of anrbra^{n-r} b^r is exactly (nr)\binom{n}{r}. 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 rr exist in an nn-element set?

• What is the coefficient of anrbra^{n-r} b^r when you multiply (a+b)(a + b) by itself nn times?

For higher nn 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 (nr)\binom{n}{r} — read *n choose r* — is one of the most important numbers in combinatorics. It admits several equivalent definitions:

Counting subsets. (nr)\binom{n}{r} is the number of rr-element subsets of an nn-element set.

Polynomial coefficient. (nr)\binom{n}{r} is the coefficient of anrbra^{n-r} b^r in (a+b)n(a + b)^n. This is the *binomial theorem*:

(a+b)n=r=0n(nr)anrbr(a + b)^n = \sum_{r=0}^{n} \binom{n}{r} a^{n-r} b^r


Factorial formula. (nr)=n!r!(nr)!\binom{n}{r} = \dfrac{n!}{r! \, (n - r)!}.

Recursive definition. (nr)=(n1r1)+(n1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r} with edge values (n0)=(nn)=1\binom{n}{0} = \binom{n}{n} = 1.

Examples:

(52)=10\binom{5}{2} = 10: there are 1010 ways to choose 22 items from 55, and the coefficient of a3b2a^3 b^2 in (a+b)5(a+b)^5 is 1010.

(525)=2,598,960\binom{52}{5} = 2{,}598{,}960: the number of 55-card poker hands from a standard deck.

(105)=252\binom{10}{5} = 252: middle term of (a+b)10(a+b)^{10}, and the maximum entry of row 1010.

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 (nr)\binom{n}{r} from smaller ones without ever multiplying or dividing factorials. It also gives a *combinatorial proof*: pick a specific element; either you include it (giving (n1r1)\binom{n-1}{r-1}) or you don't (giving (n1r)\binom{n-1}{r}).

Hockey-stick appears in counting problems where you fix the maximum element of a subset. The number of subsets of {1,,n+1}\{1, \dots, n+1\} with r+1r+1 elements is (n+1r+1)\binom{n+1}{r+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 nn-bit binary strings number 2n2^n.

Symmetry is invoked whenever a problem becomes easier from the *complementary* viewpoint — for example, computing (10097)\binom{100}{97} as (1003)=161,700\binom{100}{3} = 161{,}700 rather than evaluating 97!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 (nr)\binom{n}{r} exactly; the triangle is the lookup table for all such values.

Binomial theorem(a+b)n=r=0n(nr)anrbr(a + b)^n = \sum_{r=0}^{n} \binom{n}{r} a^{n-r} b^r. The triangle visualizes this expansion row by row.

Multinomial coefficient — generalizes the binomial to more than two parts: (nn1,n2,,nk)=n!/(n1!nk!)\binom{n}{n_1, n_2, \dots, n_k} = n! / (n_1! \cdots n_k!). The binomial is the k=2k = 2 case.

Combination with repetition — counts multisets, (n+r1r)\binom{n + r - 1}{r}. Different formula, different position in the triangle.

Permutation — ordered selections, n!/(nr)!n!/(n-r)!. Related but distinct from the unordered combinations shown here.

Catalan numbers — appear in Pascal's triangle along a specific diagonal: Cn=(2nn)/(n+1)C_n = \binom{2n}{n} / (n + 1).

Vandermonde's identity(m+nr)=k(mk)(nrk)\binom{m + n}{r} = \sum_{k} \binom{m}{k} \binom{n}{r-k}. Another classical binomial identity expressible through the triangle.

Lucas's theorem — for prime pp, (mn)modp\binom{m}{n} \bmod p is computable digit-by-digit in base pp. Reveals fractal structures (Sierpiński patterns) when the triangle is reduced modulo a prime.

Binomial coefficient calculator — to compute (nr)\binom{n}{r} for larger nn, see the n choose r calculator.