# Derive the formula for the sum of the first n terms of an AP?

### 1 Answer | Add Yours

To calculate the formula for the sum of the first n terms of an AP, we go about it this way.

We know that the nth term of any AP can be written as a1+ (n-1) d.

Now, the sum of the first n terms S = a1+ a2 +a3 … an

=> S= a1+ a1 + d +a1+ 2d …a1 + (n-1) d

Or starting with the last term it can be written as

=> S= an + an-d + an-2d +…an- (n-1) d

Now adding the two forms

=> 2S = a1+ an + a1 + d + an-d +a1+ 2d + an-2d…a1 + (n-1) d + a1

all terms with d cancel

=> 2S = n (a1 + an)

=> S= (n/2) (a1+ an)

Now an = a1 + (n-1)*d

=> S = [2*a1 + (n-1)*d]*n/2

**Therefore the sum of the first n terms is [2*a1 + (n-1)*d]*n/2 for all AP**