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.

Course: Algebra (all content)>Unit 18

Lesson 11: Sum of n squares

Sum of n squares (part 2)

What is the sum of the first n squares, 1 + 4 + 9 + 16 + ... + n²? In this video we find one possible formula for this sum. Created by Sal Khan.

Want to join the conversation?

• How do you know that if the difference of the differences is constant, that you have a 3rd order polynomial?
• I think that it has something to do with the derivative of a function and how f(x) changes when x is increased by 1.
For example when f(x) = m*x + b its first derivative is a constant and when you increase x by 1, f(x) increases by a constant (m).
An equation in the form f(x) = a*x^2 + b*x + c its second derivative (or the derivative of its derivative) is a constant.
So, if you have an equation where its third derivative is a constant or as x increases by 1 f(x) increases by a square then f(x) should be in the form a*x^3 + b*x^2 + c*x + d
• , Shouldn't it be the first n+1 squares since we're starting at 0 or do most people start at 1 so it's the first n squares? If the latter, why is Sal starting at 0?
• I think he started at 0 to eliminate the D term (in the previous video). Our Sigma in this starts at 0, also, so he had to start at 0 to evaluate the formula.
• Why can we assume that the formula is a cubic? Shouldn't it be verified by induction?
• A constant set of differences on the third degree is characteristic of a cubic polynomial. Sal showed that taking the differences between terms through three levels ultimately led to constant differences, proving that the general formula is a polynomial of third degree.
• this maybe a silly question but why sum goes from 0 to n, and not from 1 to n?
• That's not a silly question at all. It turns out that that the sum can be from 0 to n or from 1 to n, it really depends on the question or your preference. Sometimes it's just easier to start from 0, because that would usually be the first term in a series, with no exponents. I hope that clarified a little bit.
• Hey, when solving this system of equations, is it ok to use a matrix of 3 by 3 with all the coefficients of each equation and solving it in RREF form/ identity matrix of 3 by 3?

If so, which method would be an advantage of the other?
• I think you mean what I'd call an augmented matrix:
1 1 1 1
8 4 2 5
27 9 3 14
Yes?
(sorry they aren't aligned nice and neat, haven't researched how to make it do ht in the comments)
You can do it that way. Sal appears to be covering it in a way for people who don't know/remember much Linear Algebra.

At two colleges I've attended sequences and series don't get covered until second semester of Calc. Linear Algebra required Calc I, but Calc II did not require Linear Algebra. It is possible they wouldn't recall from the dark days of High School algebra how to use a matrix to solve.

Personally I find the augmented matrix better since it solves for all three values at the same time. Both work, so which is better is somewhat subjective.
• Trying to come up with an equations where all possible permutations/combinations of numbers 1 through 10 that add up to 10 without repeating the combination? Have not been able to solve this.
(1 vote)
• I am assuming you mean integers, because if you include decimals there are infinitely many ways to do this. I am also assuming you mean to use each number only once. If you are allowed to use a digit more than once, then there will be far more possibilities than mentioned here.

Rather than trying to do this in one single step, with one formula, it is better to break it into more manageable pieces.
Do it in sets of how many numbers you are adding. The most you'll have is 4 because the only way to sum to 10 with those integers is 1+2+3+4.
So, with 1 addend, there is only one way: 10 = 10
With 2 addends, you have 1+9, 2+8. etc.
With 3 addends, you have a bit more difficulty, start with 1 and then find sets of two numbers that add to 9. Then use 2 and find two digits that add to 8, then 3 plus two digits that add to 7, and finally 4 plus two numbers that sum to 6. You won't need to do 5 through 10 because either you will have already used that set of numbers (in the cases of 5 through 7) or there won't be any (in the cases of 8 through 10).

You'll need to sort the list because you may have some repeats.

Again, if you are allowed to reuse an integer, then there will be far more than these.
• What happens in the polynomial if n is a non-integer value, such as 0.5? Is the domain of n restricted in this, and how would one represent that restriction?

Thanks!
• This question involves "sequences" and the sums of sequences that we call "series". Sequences are defined discretely. These are NOT continuous functions and thus are not defined at non integer values of n. So yes, you can think of this as a domain restriction of the x^2 function to just the natural numbers n=1,2,3,...
(1 vote)
• I thought the formula was (n*(n+1)*(2n+1))/6.
Does it have to do with the fact that Sal started at 0 but (n*(n+1)*(2n+1))/6 starts at 1?
• Does i always have to be 0 in order for this formula to work?
(1 vote)
• In order for this formula to work "i" doesn't always have to start at 0, but it typically will. If it doesn't start at 0, then you will need to have 4 equations instead of 3 to solve for all 4 variables.