On this page
Here is a standard question from arithmetic progressions: the sum of the first p terms of an AP equals the sum of the first q terms, with p ≠ q. Show that the sum of the first p + q terms is zero. The proof is six short lines, and it tests algebra with letters instead of numbers.
Which formula do you need for the sum of an AP?
The sum of the first n terms of an AP is S(n) = (n/2)[2a + (n − 1)d], where a is the first term and d the common difference, as derived in NCERT Class 10 Mathematics, Chapter 5, Section 5.4. NCERT derives it by writing the sum forwards and backwards and adding.
For a refresher, see our Class 10 guide to nth term and sum problems.
How do you prove S(p + q) = 0 when S(p) = S(q)?
Write the given condition using the formula: (p/2)[2a + (p − 1)d] = (q/2)[2a + (q − 1)d].
Multiply both sides by 2 and expand: 2ap + p(p − 1)d = 2aq + q(q − 1)d.
Collect terms on one side: 2a(p − q) + d[p² − p − q² + q] = 0.
Factor the bracket: p² − q² − (p − q) = (p − q)(p + q − 1). So (p − q)[2a + (p + q − 1)d] = 0.
Since p ≠ q, the factor p − q is not zero, so divide by it: 2a + (p + q − 1)d = 0.
Now write the sum you want: S(p + q) = ((p + q)/2)[2a + (p + q − 1)d]. The bracket is the expression from step 5, which is zero. So S(p + q) = 0.
The condition p ≠ q is used once, in step 5. Write that reason in words; dividing by p − q without it can cost a mark.
Does it work on a real AP?
Take p = 4 and q = 7. Step 5 says we need 2a + 10d = 0, so a = −5d. Choose d = 3, which gives a = −15 and the AP
−15, −12, −9, −6, −3, 0, 3, 6, 9, 12, 15, ...
Check each sum by adding terms, then by the formula:
S(4) = −15 − 12 − 9 − 6 = −42. Formula: (4/2)[−30 + 3 × 3] = 2 × (−21) = −42.
S(7) = −42 + (−3) + 0 + 3 = −42. Formula: (7/2)[−30 + 6 × 3] = 3.5 × (−12) = −42.
S(11) = 0, because the terms pair off (−15 with 15, −12 with 12...) around the middle term 0. Formula: (11/2)[−30 + 10 × 3] = 5.5 × 0 = 0.
The direct addition shows why S(4) = S(7): terms 5, 6 and 7 are −3, 0 and 3, which add to zero. To build your own check, pick p, q and d, then set a = −(p + q − 1)d/2.
Why does the sum have to come back to zero?
Expand the formula: S(n) = (d/2)n² + (a − d/2)n. When d ≠ 0, this is a quadratic in n with no constant term, so its graph is a parabola that passes through n = 0.
A parabola takes the same value at two different points only when they sit symmetrically about its axis. So S(p) = S(q) puts the axis at n = (p + q)/2. The mirror image of 0 in that axis is p + q, so S(p + q) = S(0) = 0. In our example the axis is at n = 5.5, and the sums return to zero at n = 11, as the diagram at the top shows.
If d = 0, then S(n) = na, so S(p) = S(q) forces a = 0 and the result still holds.
What mistakes cost marks on this question?
Cancelling the 1/2 on one side only. Multiply both sides by 2 first.
Writing p(p − 1) as p² − 1.
Dividing by p − q without writing "since p ≠ q".
Stopping at 2a + (p + q − 1)d = 0. The question asks for the sum, so write out S(p + q).
Trying to find a and d separately. One equation links them, and that is all you need.
The same pattern (turn the condition into one equation, then spot it inside what you want) appears in the companion problem where the pth term is q and the qth term is p; see why d = −1 in that AP. To go the other way, from a formula for the sum back to the terms, read recovering aₙ from a formula for Sₙ.
If you get stuck at steps like the factoring, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. To revisit why the sum formula works, the Fermi Concept Library gives each concept in mathematics its own lesson.



