Pascal’s Triangle, Explained
By: Siddharth Rout
Tags: Teens, Teenagers, Math, Python

For anyone who has experience with Mathematics, Pascal’s Triangle should need no introduction. It was discovered by Chinese mathematician Jia Xian, when he discovered a triangle that was a representation of the coefficients in a binomial expansion. This triangle was further popularized by Chinese mathematician Yang Hui, which is why it is often known as the Yanghui triangle in China. Despite this, the modern world mostly knows this triangle as Pascal’s Triangle, after 17th century French mathematician Blaise Pascal.

Pascal’s Triangle, via Desmos

Sums

The most basic property of Pascal’s Triangle is that every block has a value that is equal to the sum of the two blocks above it.

Binomial Expansion

The main usage of this triangle is representing the coefficients in a binomial expansion. Binomial expansion, like its name suggests, is the algebraic expansion of binomials raised to powers. The most well-known formula, which is the formula used for the expansion of a binomial (a + b) raised to the second power, is shown below.

If you take the binomial (a + b) and raise it to the third power, you will get a^3 + 3a^2b + 3ab^2 + b^3 . Pascal's Triangle is the representation of the coefficients of each of the terms in a binomial expansion. The power that the binomial is raised to represents the line, from the top, that the coefficients are in.

In simpler terms, the coefficients of the terms in (a + b)^2 , or the number that each term is multiplied by is, in order, [1, 2, 1] .

Since the expression above is the expansion of (a + b)^2 , [1, 2, 1] will be the second line of the triangle from the top. The third line will be made up of the coefficients of the terms in (a + b)^3 , or [1, 2, 3, 2, 1] .

First 6 layers of Pascal’s Triangle, via Online Math Learning

Pascal’s Triangle is an incredibly helpful tool which allows you to easily calculate the expansions of binomials. Once you have the coefficients of each term, all you need to do is add in the exponents for a and b for each term. This is not difficult, as the the sum of x and y in a term where a^x and b^y is the same across all terms in an expansion.

For example, in (a + b)^2 , the sum of the exponents across all terms in two. In the first term, x = 2 and y = 0 , giving us a sum of two. In the second term, x = 1 and y = 1 , and in the final term, x = 0 and y = 2 . The sum of the exponents in each term is 2, which is equal to the power to which the binomial was initially raised.

To find out the exponents in a binomial expansion, you begin with raising a to the power to which you raised the binomial to, and you raise b to the power 0, therefore fitting the rule mentioned above. For the second term, you take 1 away from the power a is raised to, and you increase the power that b is raised to by 1. This is continued until the power that b is raised to is equal to the exponent to which the binomial was initially raised, or until the power that a is raised to is 0.

In simpler terms:

where k is the index of the term in the expansion and n is the exponent that (a + b) is raised to.

Number Sequences

Pascal’s Triangle can be broken up into diagonals which start at any term in the right edge and continue through the terms to the direct bottom right to it. Each diagonal is a different number sequence.

In the first diagonal, which starts at the top of the triangle and continues through the left edge, the increment (the difference between a number and the next) is 0. This causes the sequence to be made up entirely of ones.

The numbers in the second diagonal are the natural numbers, or the “counting numbers”. If you extend this diagonal, you will get all of the positive integers. The numbers in the third diagonal are the triangular numbers, with the formula n(n + 1)/2 . The numbers in the fourth diagonal are the tetrahedral numbers, which you can read more about here .

Squares

If you take any number in the second diagonal (the “counting numbers”), the square of the number is equal to the sum of the numbers on its right and the number to its bottom right.

Take the example of the number 4 in the 5th row. 4^2 = 16 , which is equal to the sum of 6 (the number to its right) and 10 (the number to its bottom-right). This works for any number in the second diagonal.

Squares in Pascal’s Triangle, via Mathsisfun

Powers of Two

The sums of each of the horizontal layers in Pascal’s triangle are the powers of 2. The sum of the first layer is 1, or 2⁰. The sum of the second layer is 2, or 2¹. If you take the sum of the 5th layer, the sum will be 2⁴, or 16. This continues down the triangle forever.

Powers of two in Pascal’s Triangle, via Mathsisfun

Fibonacci Series

Another secret of Pascal’s Triangle is the presence of the Fibonacci series. The Fibonacci series is a series where each term is the sum of the two terms preceding it.

To find this series, you have to draw “shallow diagonals” through the triangle, starting from the top and moving bottom. The sum of these diagonals are the terms in the Fibonacci series, starting with 1.

Fibonacci series diagonals, via Britannica

Due to the symmetric nature of Pascal’s Triangle, the “shallow diagonals” can be drawn in reverse as well.

Sierpinski Triangle

A fractal is a pattern which can be infinitely repeated, and one which has no end no matter how much you zoom in. In theory, if you zoom into a fractal, you will discover a smaller version of the original image, which continues forever. This means that fractals can never be physically constructed, as every physical object can only have changes larger than a single atom, which makes fractals mostly theoretical. If the triangle is extended and all of the odd numbers are colored in, a fractal known as the Sierpinski Triangle is formed.

The Sierpinski triangle, via Researchgate

The Sierpinski Triangle is a plane fractal, or a 2D fractal, which means that it is formed on a 2D surface. There are many 3D fractals as well, such as the Menger Sponge or the Mandelbulb, both of which repeat infinitely.

Generating Pascal’s Triangle Until the nth Layer

This function prints Pascal’s triangle until the nth layer (only works if n >= 2 ). The blocks are not lined up properly due to changing lengths of numbers. Other than that, this function works as intended.

This function can also be modified to return the nth layer in Pascal’s Triangle.