Pascal's Triangle Calculator

Generate Pascal's triangle up to any row and expand (a + b)ⁿ using the binomial theorem. Shows all coefficients and the full polynomial expansion.

Generate Pascal's Triangle

Binomial Expansion (a + b)ⁿ

What Is the Pascal's Triangle Calculator?

Pascal's triangle is a triangular array where each entry is the sum of the two entries directly above it. Row n (starting from row 0) contains the binomial coefficients C(n,0), C(n,1), …, C(n,n), which are the coefficients in the expansion of (a+b)ⁿ. This calculator generates the triangle and performs full binomial expansion for any (a+b)ⁿ.

Formula

C(n,k) = n! / (k! × (n−k)!) | (a+b)ⁿ = Σ C(n,k) × aⁿ⁻ᵏ × bᵏ for k=0..n

How to Use

Enter the number of rows to generate (up to 20). For binomial expansion, enter the exponent n and values for a and b (they can be symbols like 'x' and '1', or numbers). The triangle and expansion are displayed with clear formatting.

Example Calculation

Row 5: 1, 5, 10, 10, 5, 1. These are C(5,0) through C(5,5). Expansion of (x+1)⁵ = x⁵ + 5x⁴ + 10x³ + 10x² + 5x + 1.

Understanding Pascal's Triangle

Pascal's triangle, known in Persia as Khayyam's triangle and in China as Yang Hui's triangle, has been independently discovered across cultures for over a millennium. In Western mathematics it was popularised by Blaise Pascal in his 1653 Traité du triangle arithmétique.

The binomial theorem is one of the most powerful tools in algebra and probability. It allows any power of a binomial expression to be expanded without repeated multiplication, and underpins the binomial probability distribution, which models the number of successes in n independent Bernoulli trials.

In calculus, the binomial series extends the binomial theorem to non-integer and negative exponents using infinite series, enabling approximations like √(1+x) ≈ 1 + x/2 for small x.

The combinatorial interpretation C(n,k) = "n choose k" counts the number of ways to choose k items from n without regard to order — fundamental in probability, statistics, and computer science algorithm analysis.

Frequently Asked Questions

What is Pascal's triangle used for?

Pascal's triangle gives binomial coefficients for expanding (a+b)ⁿ, combinatorics (C(n,k) = nCr), probability (binomial distribution), powers of 11 (11⁰=1, 11¹=11, 11²=121…), and the Fibonacci sequence (diagonal sums).

What is the binomial theorem?

The binomial theorem states that (a+b)ⁿ = Σₖ₌₀ⁿ C(n,k)aⁿ⁻ᵏbᵏ, where C(n,k) = n!/(k!(n−k)!) are the binomial coefficients read from row n of Pascal's triangle.

What patterns appear in Pascal's triangle?

Column 0 and the diagonal are all 1s. The second column is 1,2,3,4,… (natural numbers). Diagonal 2 gives triangular numbers. Row sums are powers of 2 (2ⁿ). Colouring multiples of a prime p reveals fractal Sierpinski-triangle patterns.

How do you find a specific binomial coefficient without the full triangle?

Use C(n,k) = n! / (k!(n−k)!). For example, C(10,3) = 10!/(3!×7!) = (10×9×8)/(3×2×1) = 120. This is faster than building the whole triangle.

Related Tools