Polynomials & Factoring

Pascal's Triangle

Pascal’s triangle is a triangle of numbers with 11s down both edges, where every other entry is the sum of the two entries directly above it. Entry kk in row nn equals (nk)=n!k! (n−k)!\binom{n}{k}=\dfrac{n!}{k!\,(n-k)!}, and row nn lists the coefficients of (a+b)n(a+b)^n.

(nk)=(n−1k−1)+(n−1k)=n!k! (n−k)!\binom{n}{k}=\binom{n-1}{k-1}+\binom{n-1}{k}=\dfrac{n!}{k!\,(n-k)!}

Try it with your numbers

Show every step

That one rule turns the expansion of a power of a binomial into reading off a row. It also links counting, probability and polynomials in a single picture. Rows and positions both start counting at 00, and that is where most lost points begin.

How do you build Pascal’s triangle row by row?

Write a single 11 at the top. Each new row starts and ends with 11, and every number in between is the sum of the two numbers diagonally above it. To get row 5 from row 4 (which is 1,4,6,4,11, 4, 6, 4, 1), the middle entries are 1+4=51+4=5, 4+6=104+6=10, 6+4=106+4=10 and 4+1=54+1=5. That gives 1,5,10,10,5,11, 5, 10, 10, 5, 1.

Count from zero

The top row is row 00 and the first entry of each row is position 00. Row nn has n+1n+1 entries, and it matches (a+b)n(a+b)^n.

Some textbooks call the top row “row 1”. If a problem says “the 5th row”, look at the answer key or an example to see which convention it uses. If you ever see the mismatch, the fix is to count the exponent, not the line number: the row that expands a 4th power is always 1,4,6,4,11, 4, 6, 4, 1.

The table below shows the first nine rows. The last column is worth a glance now, because it comes back as a checking tool.

Row nn Entries Sum
00 11 11
11 1,11, 1 22
22 1,2,11, 2, 1 44
33 1,3,3,11, 3, 3, 1 88
44 1,4,6,4,11, 4, 6, 4, 1 1616
55 1,5,10,10,5,11, 5, 10, 10, 5, 1 3232
66 1,6,15,20,15,6,11, 6, 15, 20, 15, 6, 1 6464
77 1,7,21,35,35,21,7,11, 7, 21, 35, 35, 21, 7, 1 128128
88 1,8,28,56,70,56,28,8,11, 8, 28, 56, 70, 56, 28, 8, 1 256256

Quick check

Row 8 is 1,8,28,56,70,56,28,8,11, 8, 28, 56, 70, 56, 28, 8, 1. Write row 9.

Why does adding the two numbers above work?

The cleanest explanation comes from multiplying by (x+1)(x+1) again and again. Each time you multiply by (x+1)(x+1), every term is copied twice: once multiplied by xx (which shifts it one place to the left) and once multiplied by 11 (which leaves it where it is). So each coefficient in the new polynomial is the sum of two neighbours in the old one. You can see it in the product below, which is multiplying polynomials with a pattern:

(x3+3x2+3x+1)(x+1)=x4+(3+1)x3+(3+3)x2+(1+3)x+1(x^3+3x^2+3x+1)(x+1)=x^4+(3+1)x^3+(3+3)x^2+(1+3)x+1

That simplifies to x4+4x3+6x2+4x+1x^4+4x^3+6x^2+4x+1, which is row 4. The triangle is just a record of what happens when you multiply by (x+1)(x+1) over and over.

There is a counting reason too. To choose kk people from nn, single out one person. Either that person is on the team, leaving k−1k-1 more to pick from n−1n-1 people, or that person is not, leaving kk to pick from n−1n-1. Those two cases cover every team exactly once:

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

Test it on (52)\binom{5}{2}: (41)+(42)=4+6=10\binom{4}{1}+\binom{4}{2}=4+6=10, which is the entry in row 5, position 2.

How do you expand a binomial with Pascal’s triangle?

To expand (a+b)n(a+b)^n, use row nn for the coefficients. Then attach powers: the power of aa starts at nn and drops by one each term, while the power of bb starts at 00 and rises by one. The powers in every term add up to nn.

  1. Choose row nn of the triangle.
  2. Write n+1n+1 terms, with aa descending from ana^n and bb ascending to bnb^n.
  3. Multiply each term by its coefficient from the row.
  4. Evaluate any numbers, such as 232^3 or (−3)2(-3)^2, last.

Rows 2 and 3 are old friends. Row 2 is 1,2,11, 2, 1, which is the pattern behind the special products of binomials and the middle term that the FOIL method produces. A perfect square trinomial is exactly this row with a perfect square at each end. The expansion has n+1n+1 terms and its degree is nn, which gives you an instant sanity check.

Example 1. Expand (x+2)4(x+2)^4. Row 4 is 1,4,6,4,11, 4, 6, 4, 1, with a=xa=x and b=2b=2:

(x+2)4=1⋅x4+4⋅x3(2)+6⋅x2(22)+4⋅x(23)+1⋅24(x+2)^4=1\cdot x^4+4\cdot x^3(2)+6\cdot x^2(2^2)+4\cdot x(2^3)+1\cdot 2^4

=x4+8x3+24x2+32x+16=x^4+8x^3+24x^2+32x+16

Check at x=1x=1: the left side is 34=813^4=81, and the right side is 1+8+24+32+16=811+8+24+32+16=81.

Quick check

Find the coefficient of x2x^2 in (x+3)4(x+3)^4.

How do you use Pascal’s triangle with negatives and coefficients?

Wrong versus right first term when expanding (2x+5)³ with Pascal's triangle row 3
Put each piece in parentheses before applying the power, so the first term is 8x³ and not 2x³.

For a difference such as (a−b)n(a-b)^n, treat it as (a+(−b))n(a+(-b))^n. The row of coefficients does not change, but the signs do: odd powers of the negative term stay negative, even powers turn positive. So the signs alternate +,−,+,−+,-,+,- down the expansion.

The trap that costs most students points is a coefficient on the variable. In (2x+5)3(2x+5)^3, the whole term 2x2x is the first piece, so the first term is (2x)3=8x3(2x)^3=8x^3, not 2x32x^3. Put each piece in parentheses before you raise it to a power.

Example 2. Expand (2x−3)3(2x-3)^3. Row 3 is 1,3,3,11, 3, 3, 1, with a=2xa=2x and b=−3b=-3:

(2x−3)3=(2x)3+3(2x)2(−3)+3(2x)(−3)2+(−3)3(2x-3)^3=(2x)^3+3(2x)^2(-3)+3(2x)(-3)^2+(-3)^3

=8x3+3(4x2)(−3)+3(2x)(9)−27=8x3−36x2+54x−27=8x^3+3(4x^2)(-3)+3(2x)(9)-27=8x^3-36x^2+54x-27

Check at x=1x=1: the left side is (−1)3=−1(-1)^3=-1, and the right side is 8−36+54−27=−18-36+54-27=-1.

A related trap: (a−b)3(a-b)^3 is not a3−b3a^3-b^3. The cube of a difference has four terms, while factoring a difference of cubes is a different identity that goes the other way. Fractions behave the same as whole numbers: (x2+1)3=x38+3x24+3x2+1\left(\tfrac{x}{2}+1\right)^3=\tfrac{x^3}{8}+\tfrac{3x^2}{4}+\tfrac{3x}{2}+1.

Try this: Expand (x−1)5(x-1)^5 using row 5. Then substitute x=2x=2 into both the original and your answer. Both should equal 11.

How do you find one entry without the whole triangle?

If you need the entry in row 1212, writing eleven rows above it is slow and invites arithmetic slips. Use the formula instead, since entry kk of row nn is (nk)\binom{n}{k}:

(nk)=n!k! (n−k)!=n(n−1)(n−2)⋯(n−k+1)k!\binom{n}{k}=\frac{n!}{k!\,(n-k)!}=\frac{n(n-1)(n-2)\cdots(n-k+1)}{k!}

The second form is the one to use by hand: it has exactly kk factors on top and kk factors on the bottom.

Example 3. Find the entry in row 1212, position 44.

(124)=12⋅11⋅10⋅94⋅3⋅2⋅1\binom{12}{4}=\frac{12\cdot 11\cdot 10\cdot 9}{4\cdot 3\cdot 2\cdot 1}

Cancel before multiplying: 12÷(4⋅3)=112\div(4\cdot 3)=1 and 10÷2=510\div 2=5. What is left is 11⋅5⋅9=49511\cdot 5\cdot 9=495.

Use symmetry to shrink the work

Each row reads the same forwards and backwards, so (2017)=(203)=20⋅19⋅186=1140\binom{20}{17}=\binom{20}{3}=\dfrac{20\cdot19\cdot18}{6}=1140. Always compute with the smaller of kk and n−kn-k.

A quick mental check: an interior entry must be larger than either of the two entries above it, and the biggest entry in a row sits in the middle. In row 1212, the middle entry is (126)=924\binom{12}{6}=924, so 495495 is plausible for a position two steps from the centre.

What patterns hide inside Pascal’s triangle?

Row 5 of Pascal's triangle with carries producing 161051, the fifth power of 11
The 10s in row 5 need two digits, so they carry left and the digits become 161051.

Every pattern below follows from the single addition rule, so none of them is a coincidence. A few are useful as shortcuts.

  • Row sums. Row nn adds to 2n2^n. This is the expansion of (1+1)n(1+1)^n, and the table earlier shows it.
  • Alternating sums. Row nn with signs +,−,+,−+,-,+,- adds to 00 for n≥1n\ge 1 (row 4: 1−4+6−4+1=01-4+6-4+1=0). This is (1−1)n(1-1)^n.
  • Hockey stick. Start at a 11 on an edge and add down a diagonal. The total is the entry one step below the end, off to the side: 1+3+6+10=201+3+6+10=20, and 2020 sits just below and beside the 1010.
  • Triangular numbers. The diagonal 1,3,6,10,151, 3, 6, 10, 15 is (n2)\binom{n}{2}, and (n+12)=n(n+1)2\binom{n+1}{2}=\dfrac{n(n+1)}{2} is the same sum you get from the arithmetic series formula.
  • Powers of 11. Rows 0 to 4 read as digits give 1,11,121,1331,146411, 11, 121, 1331, 14641, which are the powers of 1111.

The powers-of-11 trick breaks at row 5, and it shows how place value hides the truth. The entries 1,5,10,10,5,11, 5, 10, 10, 5, 1 include a two-digit number, so carries happen, and 115=16105111^5=161051. The row is not the answer; the carrying is.

Other patterns exist too. Sums along shallow diagonals produce the Fibonacci numbers, and shading every odd entry builds the Sierpinski triangle fractal.

Quick check

Use the hockey stick pattern to find 1+4+10+20+351+4+10+20+35 without adding.

How is Pascal’s triangle used in probability and counting?

Each entry in row nn counts the ways to choose kk items from nn. That makes the row the full distribution for nn yes/no events. Flip a fair coin five times: the numbers of ways to get 00 to 55 heads are 1,5,10,10,5,11, 5, 10, 10, 5, 1, out of 25=322^5=32 equally likely outcomes.

So P(exactly 2 heads)=1032=516P(\text{exactly 2 heads})=\dfrac{10}{32}=\dfrac{5}{16}, and P(at least 4 heads)=5+132=316P(\text{at least 4 heads})=\dfrac{5+1}{32}=\dfrac{3}{16}. The row sum 2n2^n is what you divide by, and the symmetry of the row tells you that three heads is exactly as likely as two.

The same entries count committees and routes. A club picking 33 officers from 88 members has (83)=56\binom{8}{3}=56 choices (row 8, position 3 in the table). A shortest walk across a grid that takes 22 steps right and 33 steps up has (52)=10\binom{5}{2}=10 orderings of the steps.

When is Pascal’s triangle the wrong tool?

The triangle is a hand tool for small whole-number exponents. At row 3030 you would be writing 3131 entries, each one built on the ones above it, so one slip early on ruins the whole row. For a single coefficient in a large power, use (nk)\binom{n}{k} directly, as in Example 3. For the full theory, including the general term, see the binomial theorem.

It also does not apply to negative or fractional exponents. (1+x)−1(1+x)^{-1} has no finite row, and its expansion 1−x+x2−x3+⋯1-x+x^2-x^3+\cdots is an infinite series that only converges when ∣x∣<1|x|<1. The triangle covers exponents 0,1,2,3,…0, 1, 2, 3, \dots and nothing else.

It does help in reverse. If a cubic has coefficients that look like 1,3⋅c,3⋅c2,c31, 3\cdot c, 3\cdot c^2, c^3, it is a perfect cube. For x3+6x2+12x+8x^3+6x^2+12x+8, you get 3⋅2=63\cdot 2=6, 3⋅22=123\cdot 2^2=12 and 23=82^3=8, so it equals (x+2)3(x+2)^3. Spotting this saves a long search in factoring practice problems.

How can you check a Pascal’s triangle expansion?

Substitute a value of the variable that makes both sides easy. For an expansion in xx, try x=1x=1, which makes every power of xx equal 11, then compare (1+b)n(1+b)^n with the sum of your terms. In Example 1, 34=813^4=81 matched 1+8+24+32+161+8+24+32+16. A second test at x=0x=0 checks only the constant term: (x+2)4(x+2)^4 at x=0x=0 gives 1616, and the last term is 24=162^4=16.

Then check the structure. You should have n+1n+1 terms, the powers should add to nn in every term, and for (a−b)n(a-b)^n the signs should alternate. If the second term is a negative number, the coefficients in your answer should flip sign every term. When the first term has a coefficient, such as 2x2x, the leading coefficient of the answer must be that coefficient raised to the nn.

The last test is the row itself. If you add the raw row entries, you should get 2n2^n. A row that fails this test was copied or added wrong, and the entire expansion will be off with it.

Practice problems

0 of 5 solved

  1. What is the entry in row 66, position 22 of Pascal's triangle (count both rows and positions from 00)?

  2. Expand (x+1)5(x+1)^5.

  3. Expand (x−2)4(x-2)^4.

  4. Find the coefficient of x3x^3 in (2x+1)5(2x+1)^5.

  5. Find the coefficient of x2x^2 in (3x−2)4(3x-2)^4.

Common questions

What is Pascal's triangle used for?

It gives the coefficients when you expand (a+b)n(a+b)^n, and it lists every value of (nk)\binom{n}{k}, the number of ways to choose kk items from nn. That makes it useful for binomial expansion, combinations and simple probability with two outcomes.

Is the top of Pascal's triangle row 0 or row 1?

Most algebra and combinatorics sources call the top row (a single 11) row 00, so row nn has n+1n+1 entries and matches (a+b)n(a+b)^n. Some textbooks start at row 11, so check which convention your course uses.

How do you find the sum of a row in Pascal's triangle?

The sum of row nn is 2n2^n. For example, row 55 is 1,5,10,10,5,11, 5, 10, 10, 5, 1, which adds to 32=2532=2^5.

How do you find a specific row of Pascal's triangle without writing all the rows above it?

Compute each entry with (nk)=n!k! (n−k)!\binom{n}{k}=\dfrac{n!}{k!\,(n-k)!} for k=0k=0 up to nn. You only need to calculate half the row, because the row is symmetric.

Who invented Pascal's triangle?

Blaise Pascal did not invent it. Chinese, Indian and Persian mathematicians described it centuries earlier, and in China it is often called Yang Hui's triangle. Pascal's name stuck because he organized its properties and uses in the 1650s.

How is Pascal's triangle connected to the binomial theorem?

Row nn of the triangle is the list of coefficients in the binomial theorem for (a+b)n(a+b)^n. The theorem adds the powers of aa and bb to each coefficient.

Up next