The sum of the first n terms · Mathematics Class 9–10 | StemPy Lab
Course 5.2·Lesson 1 of 3
The sum of the first n terms
A long arithmetic progression can be added without adding its terms one by one. Write the terms forwards and backwards: every pair adds to the same number, a+l. That gives Sn=2n(a+l)=2n[2a+(n−1)d]
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
A story about a quick answer
About two hundred years ago, a teacher in Germany wanted some quiet. He told his class to add all the whole numbers from 1 to 100. Within a minute, a boy called Carl Friedrich Gauss put his slate on the desk with the answer: 5050.
Gauss did not add the numbers one by one. He paired them:
1+100=101,2+99=101,3+98=101,…,50+51=101.
There are 50 such pairs, each adding to 101. So the sum is 50×101=5050.
The numbers 1,2,3,…,100 form an arithmetic progression. Gauss's trick works for every arithmetic progression.
Pairing in a picture
A staircase of blue squares: 1 square in the first column, 2 in the second, up to 6 in the sixth. On top of it sits the same staircase in red, turned upside down: 6 squares in the first column down to 1 in the sixth. Together they make a rectangle 6 columns wide, and every column is 7 squares tall. A line below says that blue and red together are 6 times 7, which is 42 squares, so the blue part alone is 42 divided by 2, which is 21.
The blue staircase is 1+2+3+4+5+6. Turn a copy upside down and put it on top. Every column is now 7 squares tall, and there are 6 columns. The two staircases together hold 6×7=42 squares, so one staircase holds 21.
The formula
Let the arithmetic progression have first term a, common difference d and n terms, with last term l. Write the sum twice, once forwards and once backwards:
Sn=a+(a+d)+(a+2d)+⋯+l
Sn=l+(l−d)+(l−2d)+⋯+a
Add the two lines column by column. Each column adds to a+l, and there are n columns:
2Sn=n(a+l),soSn=2n(a+l).
The last term is l=a+(n−1)d. Put that in, and we get the formula to use when l is not given:
Sn=2n[2a+(n−1)d].
Using the formula
Find the sum of the first 15 terms of 7,11,15,19,…
Read the numbers.a=7, d=11−7=4, n=15.
Use the formula.S15=215[2×7+14×4]=215[14+56]=215×70.
Work it out.S15=15×35=525.
Check with the other form. The last term is l=7+14×4=63, and 215(7+63)=215×70=525. Both forms agree.
The first n natural numbers
For 1,2,3,…,n we have a=1 and l=n. So
1+2+3+⋯+n=2n(n+1).
With n=100 this gives 2100×101=5050, Gauss's answer.
Practise with new numbers
Try it in Python
The program adds the same arithmetic progression in three ways: one term at a time, by Gauss's pairs, and by the formula.
Common mistakes
Leaving out the half. The formula is 2n[2a+(n−1)d]. Without the 21, the answer is twice too big.
Using n in place of n−1. The last term is a+(n−1)d, because the first term has no d added.
Mixing up n and l.n counts the terms, and l is the value of the last term.
Losing a negative d. For 40,37,34,…, d=−3, and (n−1)d is negative.
Remember these
Sn=2n(a+l), when the last term l is known.
Sn=2n[2a+(n−1)d], when a and d are known.
1+2+3+⋯+n=2n(n+1).
Check a sum with the other form of the formula.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Write the sum of the first n terms when you know a, n and the last term l.
Find the sum of the first 10 terms of 6,9,12,…
What is 1+2+3+⋯+60?
Ajay adds 2+4+6+⋯+40 and says there are 40 terms. Is he right?
Why does pairing the first term with the last always give the same total as the second term with the second last?
Enroll free in The Sum of an Arithmetic Progression
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.