 Home Explore the BBC     Life | The Universe | Everything | Advanced Search            Click here to complete your registration. 3. Everything / Maths, Science & Technology / Mathematics

Triangular Numbers  Square numbers are common and handy for finding areas, and are widely used in algebra. They can be shown by drawing a square gird and counting the number of cells in that grid, or by multiplying a number by itself:

 n=1 1
 n=2 1 2 3 4
 n=3 1 2 3 4 5 6 7 8 9

n is a symbol representing a number's position in a sequence. For the first row n=1, and the result is also 1 (12). For the second row n=2 and the result is 4 (22), and so on. n can take any integer1 value.

Triangular numbers follow similar rules, but using triangles. Each successive row has one extra cell in it:

 n=1 n=2 n=3 n=4 n=5
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Because this is a sum of increasing numbers (1 + 2 + 3 + 4 + 5), it is a sum of integers from 1 to n.

The Formula

The equation to generate square numbers is simple and can be written as n2. However the formula for triangular numbers is more complicated. It is still a quadratic (an2 + bn + c) however.

The easiest way to think of the formula for triangular numbers is using fence posts and rope. If a person takes three fence posts, and wants to tie each post to each other post with rope, then he must use 3 pieces of rope (tie post 1 to post 2, post 1 to post 3 and post 2 to post 3). If the same person takes n posts, then obviously he doesn't need to tie the post to itself, and tying each to all of the others will give twice as many ties as necessary (as 1 would be tied to 3, and 3 to 1). Therefore the formula for this is:

( ½ n ) x ( n - 1 )

These are triangular numbers, as it is a sum of successive numbers. With one post there are 0 pieces of rope. With two posts there is one piece of rope (1 to 2). With three there are 2 + 1 pieces of rope (1 to 2 and 1 to 3 - 2 to 3). With four posts there are 3 + 2 + 1 pieces of rope (1 to 2, 1 to 3 and 1 to 4 - 2 to 3 and 2 to 4 - 3 to 4). This is the same as adding an extra row to the triangle in the table shown above.

As the example above takes zero to be the first triangular number (with one post) the formula needs modifying to take 1 as the first triangular number. This can be done by replacing n throughout with n + 1. After simplifying this gives:

( ½ n ) x (n + 1)

This is the triangular number equation.

Proving the formula graphically

This equation can be proved graphically by separating the triangular number into two halves, and using the two halves to make a rectangle. By doing this the height and width can be written in terms of n, with the area of this rectangle giving the equation. For an odd number in the sequence (when n is odd):

 1 2 3
- - - - - - - - - - - - - - - - - - -
 4 5 6 7 8 9 10 11 12 13 14 15

Taking the top of this and rotating it 180° gives:

 3 2 4 5 6 1 7 8 9 10 11 12 13 14 15

The height of this rectangle is ½ (n + 1), and the width is n. The area (and therefore the equation) is ½ (n + 1) x n, or rearranged ( ½ n ) x (n + 1).

For even numbers in the sequence (when n is even) the same principle can be used:

 1 2 3 4 5 6
- - - - - - - - - - - - - - - - - - - - -
 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Taking the top half of the table and rotating it 180° gives:

 6 5 4 7 8 9 10 3 2 11 12 13 14 15 1 16 17 18 19 20 21

The height of this is ½ n, and the width is n + 1. The area (and the equation) is therefore ( ½ n  ) x (n + 1). The equations for both odd and even numbers in the sequence are the same, and are the triangular number equation (as above).

The relationship between triangular numbers and square numbers

Triangular numbers are closely related to square numbers. A triangular number plus the previous triangular number is a square number:

 10 9 8 7 1 6 5 4 2 3 3 2 4 5 6 1 7 8 9 10 11 12 13 14 15

Taking the larger of the triangles to be number n in the sequence, and the smaller of the triangles to be n - 1 the equation [ ( ½ n ) x (n + 1) ]  +  [ ( ½ (n - 1)) x ((n - 1) + 1) ] = n2 can be written. This shows algebraically the link between triangular numbers and square numbers.

Triangular numbers and Pascal's Triangle

Triangular numbers can also be generated using Pascal's Triangle. The first row on Pascal's Triangle is equal to 1 plus a sequence of zeros, giving 1 every time. The second row is a sum of a sequence of 1's, giving 1, 2, 3, 4 etc. The third row however is a sum of successive integers (i.e. a sum of integers from 1 to n), giving triangular numbers:

 1
 1 1
 1 2 1
 1 3 3 1
 1 4 6 4 1

1 A whole number. People have been talking about this Guide Entry. Here are the most recent Conversations:
 Integers versus Whole Numbers (Last Posting: Dec 17, 2001)      Add your Opinion!There are tens of thousands of h2g2 Guide Entries, written by our Researchers. If you want to be able to add your own opinions to the Guide, simply become a member as an h2g2 Researcher. Tell me More!       Entry Data
Entry ID: A649875 (Edited)

Written and Researched by:
WeS

Edited by:
Frogbit's last day on H2G2...Bye!

Date: 12   December   2001

 Text only Like this page?Send it to a friend

 Referenced Guide Entries Pascals Triangle

Most of the content on this site is created by h2g2's Researchers, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the BBC. The BBC is not responsible for the content of any external sites referenced. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here to alert our Moderation Team. For any other comments, please start a Conversation below.            Most of the content on h2g2 is created by h2g2's Researchers, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the BBC. The BBC is not responsible for the content of any external sites referenced. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here. For any other comments, please start a Conversation above. About the BBC | Help | Terms of Use | Privacy & Cookies Policy