Deriving the Closed Form of a Symmetric Triangle Sum
We want a closed form for the upper triangle including the diagonal.
Use the full square sum, then separate it into upper triangle, lower triangle, and diagonal.
\( S_{\triangleright} = \frac{1}{2}\left(\left(\sum_{k=1}^n a_k\right)^2 + \sum_{k=1}^n a_k^2\right) \)
We seek a simple closed-form formula for the summation
which is the sum over the upper-right triangle of the \(n \times n\) product array, including the diagonal.
Start with the Full Product Space
Before restricting to the region \(j \le k\), consider the unrestricted double sum over all index pairs:
This creates the full square array of terms \(a_j a_k\). Our target \(S_{\triangleright}\) is only one part of that square.
Decompose the Square into Three Regions
The full array splits naturally into three pieces:
| Region | Definition | Description |
|---|---|---|
| Upper triangle | \( S_{\triangleright} = \sum_{1 \le j \le k \le n} a_j a_k \) | All terms on or above the diagonal |
| Lower triangle | \( S_{\triangleleft} = \sum_{1 \le k \le j \le n} a_k a_j \) | All terms on or below the diagonal |
| Diagonal | \( S_{=}= \sum_{k=1}^{n} a_k^2 \) | The terms where \(j=k\) |
Because multiplication is commutative, swapping \(j\) and \(k\) does not change the term:
That is exactly why the upper and lower triangular sums are equal:
Use the Indicator Identity
The two triangular regions overlap on the diagonal, so their indicators satisfy:
Translating that identity into sums gives:
Since \(S_{\triangleright} = S_{\triangleleft}\), we get:
Substitute the Square Sum and Simplify
The unrestricted double sum factors immediately:
Substituting this into the earlier identity gives:
Why the Formula Looks Like This
The square \[ \left(\sum_{k=1}^{n} a_k\right)^2 \] contains both triangles and the diagonal once in total.
But when you add the upper and lower triangle together, the diagonal gets counted twice. That is why the extra diagonal sum appears before dividing by 2.
So the structure is not arbitrary. It is exactly what the overlap forces.
Frequently Asked Questions
These are the practical questions students usually have when first deriving this kind of symmetric multi-index summation.
Why not just expand the whole square and pick out the terms manually?
You can for small \(n\), but the symmetry method gives a formula that works immediately for general \(n\).
Why are the upper and lower triangles equal?
Because the summand is symmetric: swapping \(j\) and \(k\) does not change \(a_j a_k\).
Why does the diagonal appear separately?
Because the upper and lower triangular regions overlap exactly on the diagonal, so it must be accounted for explicitly.
Why does the final answer have a factor of \( \frac{1}{2} \)?
Because once the upper and lower triangles are added together, you solve for just one of them by dividing by 2.
What is the role of the full square sum?
It gives a compact expression for all pairwise products at once, which is much easier to manipulate than the triangular sum by itself.
What is the simplest thing to remember from this derivation?
Full square plus diagonal equals upper triangle plus lower triangle, and symmetry makes the two triangles equal.
Conclusion
The derivation becomes simple once the sum is viewed geometrically as part of a symmetric square array.
Instead of attacking the triangular region directly, it is easier to relate it to the full square, add back the diagonal correctly, and use symmetry to isolate the desired part.
The resulting closed form is:
Comments
Post a Comment