Pascal's Triangle

Pascal's Triangle displays binomial coefficients and generates the coefficients for polynomial expansion, perfect for computing combinations quickly.

(nk)=(n1k1)+(n1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}

Solve a problem with Pascal's Triangle

Type the problem. The solver will use Pascal's Triangle where Pascal's Triangle is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Pascal's Triangle takes
nn
kk
Pascal's Triangle
SymbolMeaning
nnThe row number in Pascal's Triangle, counting from 0 at the top; represents the total number of items in a combination problem.
kkThe position within a row, counting from 0 at the left; represents how many items you are selecting in a combination problem.

When to use it

Use this recurrence relation when you need to build Pascal's Triangle row by row or find binomial coefficients efficiently.

Level

Usually taught in: Pre-Calculus

Worked examples

1. Calculate a single entry using the recurrence

Problem

Find (42)\binom{4}{2} using the recurrence relation.
  1. (42)=(31)+(32)\binom{4}{2} = \binom{3}{1} + \binom{3}{2}

    Apply the recurrence relation to break down (42)\binom{4}{2} into entries from row 3.

  2. (31)=(20)+(21)\binom{3}{1} = \binom{2}{0} + \binom{2}{1}

    Apply the recurrence again to decompose (31)\binom{3}{1}.

  3. (20)=1,(21)=(10)+(11)=1+1=2\binom{2}{0} = 1, \quad \binom{2}{1} = \binom{1}{0} + \binom{1}{1} = 1 + 1 = 2

    The left edge (20)=1\binom{2}{0} = 1; both (10)\binom{1}{0} and (11)\binom{1}{1} are at the triangle's top, so they equal 1.

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

    Substitute back to compute (31)\binom{3}{1}.

  5. (32)=(21)+(22)=2+1=3\binom{3}{2} = \binom{2}{1} + \binom{2}{2} = 2 + 1 = 3

    Compute (32)\binom{3}{2} using (21)=2\binom{2}{1} = 2 from above and (22)=1\binom{2}{2} = 1 at the right edge.

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

    Combine the two row-3 values to get the final answer.

Answer: (42)=6\binom{4}{2} = 6

This example shows how the recurrence relation lets you compute any binomial coefficient by working backward through Pascal's Triangle until you reach the edges, where all values are 1. This method works for any entry without needing factorials or complicated arithmetic.

2. Build an entire row using the recurrence

Problem

Given row 4 of Pascal's Triangle is 1, 4, 6, 4, 1, use the recurrence relation to build row 5.
  1. (50)=1\binom{5}{0} = 1

    The leftmost entry of every row is always 1 by definition.

  2. (51)=(40)+(41)=1+4=5\binom{5}{1} = \binom{4}{0} + \binom{4}{1} = 1 + 4 = 5

    Add the first two entries from row 4 to get the second entry of row 5.

  3. (52)=(41)+(42)=4+6=10\binom{5}{2} = \binom{4}{1} + \binom{4}{2} = 4 + 6 = 10

    Apply the recurrence by shifting one position right; add the next two adjacent entries from row 4.

  4. (53)=(42)+(43)=6+4=10\binom{5}{3} = \binom{4}{2} + \binom{4}{3} = 6 + 4 = 10

    Continue the pattern; note that by symmetry, (53)\binom{5}{3} should equal (52)\binom{5}{2}, which it does.

  5. (54)=(43)+(44)=4+1=5\binom{5}{4} = \binom{4}{3} + \binom{4}{4} = 4 + 1 = 5

    Compute the second-to-last entry using the last two entries of row 4.

  6. Row 5: 1,5,10,10,5,1\text{Row 5:} \ 1, 5, 10, 10, 5, 1

    The complete row 5, with the rightmost entry always equal to 1.

Answer: Row 5: 1,5,10,10,5,1\text{Row 5:} \ 1, 5, 10, 10, 5, 1

Building row by row demonstrates the power of the recurrence relation: each entry depends only on two entries from the previous row, so you can construct Pascal's Triangle quickly without computing any binomial coefficients directly. This systematic approach is why the recurrence relation is so practical.

3. Solve a combination problem using Pascal's Triangle

Problem

A study group has 5 members and needs to choose 2 people to present first. How many different teams of 2 can be formed? Use the recurrence relation to find (52)\binom{5}{2}.
  1. (52)=(41)+(42)\binom{5}{2} = \binom{4}{1} + \binom{4}{2}

    Set up the recurrence; we need to find (41)\binom{4}{1} and (42)\binom{4}{2} from row 4.

  2. (41)=(30)+(31)=1+3=4\binom{4}{1} = \binom{3}{0} + \binom{3}{1} = 1 + 3 = 4

    Compute (41)\binom{4}{1}; the left edge is always 1, and (31)=3\binom{3}{1} = 3 is a standard row-3 entry.

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

    Compute (42)\binom{4}{2} using the row-3 entries (31)=3\binom{3}{1} = 3 and (32)=3\binom{3}{2} = 3.

  4. (52)=4+6=10\binom{5}{2} = 4 + 6 = 10

    Add the two row-4 values to get the final answer.

Answer: (52)=10\binom{5}{2} = 10

This problem asks for (52)\binom{5}{2}, which counts the number of distinct ways to choose 2 people from a group of 5—exactly what binomial coefficients represent. The recurrence relation breaks this into simpler row-4 calculations, which break into row-3 calculations, eventually reaching base cases where the answer is obvious. There are 10 different possible presenting teams.

Common mistakes

Where Pascal's Triangle usually goes wrong
Answer came out wrong
Writing (nk)=(n1k1)+(nk)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n}{k} (putting the second term as (nk)\binom{n}{k} instead of (n1k)\binom{n-1}{k})
The correct recurrence is (nk)=(n1k1)+(n1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k} — both terms are from row n1n-1.
Trying to compute (nk)\binom{n}{k} using the recurrence without establishing that the edges (where k=0k = 0 or k=nk = n) always equal 1
Always start with the base cases (n0)=1\binom{n}{0} = 1 and (nn)=1\binom{n}{n} = 1, then use the recurrence for interior values.
Applying the recurrence with out-of-range indices, such as trying to compute (41)\binom{4}{-1} or (35)\binom{3}{5}
Always verify that 0kn0 \leq k \leq n before using the recurrence relation; if this condition fails, the answer is 0.
The mistakeWhy it is wrongThe fix
Writing (nk)=(n1k1)+(nk)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n}{k} (putting the second term as (nk)\binom{n}{k} instead of (n1k)\binom{n-1}{k})This reverses the dependency; the second term must come from the row above, not from the current row, which would make the relation circular.The correct recurrence is (nk)=(n1k1)+(n1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k} — both terms are from row n1n-1.
Trying to compute (nk)\binom{n}{k} using the recurrence without establishing that the edges (where k=0k = 0 or k=nk = n) always equal 1Without base cases, the recurrence never terminates—you keep peeling back through rows indefinitely with no way to stop.Always start with the base cases (n0)=1\binom{n}{0} = 1 and (nn)=1\binom{n}{n} = 1, then use the recurrence for interior values.
Applying the recurrence with out-of-range indices, such as trying to compute (41)\binom{4}{-1} or (35)\binom{3}{5}The binomial coefficient (nk)\binom{n}{k} is only defined when 0kn0 \leq k \leq n; outside this range it equals 0 or is undefined.Always verify that 0kn0 \leq k \leq n before using the recurrence relation; if this condition fails, the answer is 0.

Tips and when to use something else

  • Start from the edges of Pascal's Triangle (where entries are 1) and work inward when using the recurrence, rather than starting from an entry and trying to recurse indefinitely.
  • For large values of nn or when you only need one entry, the direct formula (nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} is often faster than building the entire triangle.
  • Pascal's Triangle is symmetric: (nk)=(nnk)\binom{n}{k} = \binom{n}{n-k}, so if k>n/2k > n/2, compute the smaller index instead to reduce your work.
  • The Binomial Theorem uses Pascal's Triangle coefficients to expand (a+b)n(a+b)^n, so if you are expanding a binomial power, this recurrence relation is your starting point.

Frequently asked questions

What is Pascal's Triangle used for?
Pascal's Triangle displays binomial coefficients, which are essential for binomial expansion, counting combinations, and probability. It also reveals number patterns and appears in many areas of mathematics. The recurrence relation makes it easy to compute these coefficients without calculating factorials.
How does the recurrence relation relate to the structure of Pascal's Triangle?
The recurrence (nk)=(n1k1)+(n1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k} is the rule that builds Pascal's Triangle: each entry is the sum of the two entries directly above it. This simple rule creates the entire triangle's distinctive pattern and symmetric structure.
Can I use the recurrence relation to find very large binomial coefficients?
The recurrence works for any size, but building Pascal's Triangle to very large nn becomes slow and memory-intensive. For large coefficients, use the direct formula (nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} or a computer algebra system instead.
Why does the edge of Pascal's Triangle always equal 1?
The edges represent extreme cases: (n0)=1\binom{n}{0} = 1 means there is exactly one way to choose nothing from nn items, and (nn)=1\binom{n}{n} = 1 means there is exactly one way to choose all nn items. These edges are the base cases that make the recurrence relation work.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18