If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Proof of finite arithmetic series formula

Watch Sal prove the expression for the sum of all positive integers up to and including n. Created by Sal Khan.

Want to join the conversation?

  • orange juice squid orange style avatar for user Max Feige
    First off I find this kind of algebra awe inspiring. But I'm wondering where does the intuition for this problem come from? How did people originally figure out how to do this?
    (40 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Marco Merlini
      The formula for this probably dates back some one or two thousand years, but perhaps you will be interested by this amusing story:

      It is said that Carl Friedrich Gauss, one of the greatest mathematicians of all time, was punished by a very mean teacher. His teacher wanted him to add up all the numbers from 1 to 100, thinking that it would take Gauss all afternoon. Of course, Gauss noticed that if he added 1 to 100, and 2 to 99, and 3 to 98, all the sums added up to 101. So, since you had 100 numbers, that means you had 50 pairs of numbers, that all added up to 101. The total sum is then a very easily computable 50 * 101 = 5050. There are many versions of this story, and it is not very clear if it is even true...

      Like many mathematical results, it is often unclear from where they originate. (Many results in physics and calculus were discovered long before Newton published them) However, there are some amusing anecdotes like that Gauss story for many other results. For example, it is said that Napier invented the base of the natural logarithm because he wanted to know how much money he would make if it were compounded continuously.

      I hope that although I couldn't answer your question, that I at least entertained you a bit with these stories.

      Cheers
      (138 votes)
  • mr pink red style avatar for user forrtayh
    Well for example if I had a repeating dec mail what would I do
    (11 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user shriram1841
    Where did Sal prove it by induction?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user ange umutoni
    I don't really understand how you came up with the second method.Where the s(n)=1+2+3....n+(n-1) is from? From the question or elsewhere.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user Alex
      S(N) = 1 + 2 + ...+(n-1) + n ; comes from the definition of the sum of n integers. It is defined to be the summation of your chosen integer and all preceding integers (ending at 1).
      S(N) = n + (n-1) + ...+ 2 + 1; is the first equation written backwards, the reason for this is it becomes easier to see the pattern.
      2(S(N)) = (n+1)n occurs when you add the corresponding pieces of the first and second S(N). It literally means that "To get double the summation" = "add the number n +1, n times"
      Which is equivalent to S(N) = [(N+1)N]/2
      For example: S(3) = n-2 + n-1 + n ==> 1 + 2 + 3 ==> ((3+1)3)1/2==>6
      S(100) = n-99 + n-98 +....+n-1 + n ==> 1+2+...+99 +100 ==> ((100+1)100)1/2 ==>5050
      (12 votes)
  • aqualine ultimate style avatar for user Anoir Trabelsi
    Can you prove that 1² + 2² + 3² + ... + n² = n(n+1)(2n+1)/6 ? Please Sal
    (4 votes)
    Default Khan Academy avatar avatar for user
  • primosaur tree style avatar for user Vyom Kaushik
    If there are any videos related to this question- 1+3+5+.....+(2n-1 )= n^2
    (principal of mathematical induction)
    please give a link to the topic.
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leafers seedling style avatar for user Viswanath RS
    can anybody please help me i need to know what is an induction?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Anoir Trabelsi
    What about S(n²) including n² ?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user penmetsa150
    I was actually curious about this same question a few years ago and tried to see if i could come up with this formula. I did but i did it geometrically. So I imagined a square with some length n.and cut it up into n rows and n columns. if you represented each square as a number, you could represent the sum that sal is talking about by coloring in one square in the first column 2 squares in the second column 3 squares in the third column n squares in the nth column etc. then,since the diagonal of the square would be n squares, you could see that the sum is N^2/2 +n/2=N^2+n/2. its a lot easier to see it visually.
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user karthik k
    @ how 1+2+3+.........+(n-1)+n changed into n+(n-1)+(n-2)+........2+1
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

In the last video, we proved that the sum of all of the positive integers up to and including n can be expressed as n times n plus 1 over 2. And we proved that by induction. What I want to do in this video is show you that there's actually a simpler proof for that. But it's not by induction, so it wouldn't be included in that video. But I'll show you that it exists, just so you know that induction isn't the only way to prove it. So we define that function S of n as the sum of all of the positive integers up to and including n. So this is equal to, by definition, 1 plus 2 plus 3 plus, all the way to plus n minus 1 plus n. So it's the sum of all of the integers up to and including n. This is how we're defining it. Well, we can rewrite it again. We can say that the sum, S of n-- we could just rewrite this same thing, but we could rewrite it in a different order. We could say that this is the same thing as n plus n minus 1 plus n minus 2 plus, all the way down to plus 2 plus 1. Now, what does this do for us? Well, we can actually add these two rows. If we add S of n plus S of n, we're going to get 2 times this sum, so we're just adding on the left. And then we can also add on the right. So we're just adding this sum twice, but what's interesting is how we're going to add it. We're going to add this term to this term, this term to this term, because we're really just trying to add these two things. And we can pick any way we want to add them. So 1 plus n is going to be n plus 1. And then we're going to add-- let me do it in pink-- 2 plus n minus 1. So what's 2 plus n minus 1? Let me write it over here. 2 plus n minus 1. It's the same thing as 2 plus n minus 1, which is the same thing as n plus 1. 2 minus 1 is just 1. So this is also going to be n plus 1. And then this term over here, 3 plus n minus 2, or n minus 2 plus 3. Once again, that's going to be n plus 1. And you're going to do that for every term all the way until you get over here, n minus 1 plus 2. That's also going to be n plus 1. And then finally, you have n plus 1 right over here. Plus n plus 1. So what's this whole sum going to be? Well, how many of these n plus 1's do we have? Well, we have n of them, for every term in each of these sums. So this is 1, 2, 3, count all the way to n. You have n of these terms. So you have n n plus 1's. So if you add something to itself n times, or if you have something n times right over here, this is exactly equivalent to n times n plus 1. So 2 times that sum of all the positive integers up to and including n is going to be equal to n times n plus 1. So if you divide both sides by 2, we get an expression for the sum. So the sum of all the positive integers up to and including n is going to be equal to n times n plus 1 over 2. So here was a proof where we didn't have to use induction. It's really kind of a pure algebraic proof.