Skip to main content

Deriving the Closed-Form of a Multi-Index Summation

Math · Multi-Index Summation · Symmetry

Deriving the Closed Form of a Symmetric Triangle Sum

Target sum

We want a closed form for the upper triangle including the diagonal.

Main idea

Use the full square sum, then separate it into upper triangle, lower triangle, and diagonal.

Final formula

\( S_{\triangleright} = \frac{1}{2}\left(\left(\sum_{k=1}^n a_k\right)^2 + \sum_{k=1}^n a_k^2\right) \)

Problem statement

We seek a simple closed-form formula for the summation

\[ S_{\triangleright} = \sum_{1 \le j \le k \le n} a_j a_k, \]

which is the sum over the upper-right triangle of the \(n \times n\) product array, including the diagonal.

What makes this work The summand \(a_j a_k\) is symmetric in \(j\) and \(k\), so the upper and lower triangles carry the same total weight.
Step 1

Start with the Full Product Space

Before restricting to the region \(j \le k\), consider the unrestricted double sum over all index pairs:

\[ \left(\sum_{i=1}^{n} a_i\right)^2 = \sum_{j=1}^{n}\sum_{k=1}^{n} a_j a_k. \]

This creates the full square array of terms \(a_j a_k\). Our target \(S_{\triangleright}\) is only one part of that square.

Step 2

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:

\[ a_j a_k = a_k a_j. \]

That is exactly why the upper and lower triangular sums are equal:

\[ S_{\triangleright} = S_{\triangleleft}. \]
Step 3

Use the Indicator Identity

The two triangular regions overlap on the diagonal, so their indicators satisfy:

\[ [1 \le j \le k \le n] + [1 \le k \le j \le n] = [1 \le j,k \le n] + [1 \le j=k \le n]. \]

Translating that identity into sums gives:

\[ S_{\triangleright} + S_{\triangleleft} = \sum_{1 \le j,k \le n} a_j a_k + \sum_{1 \le j=k \le n} a_j a_k. \]

Since \(S_{\triangleright} = S_{\triangleleft}\), we get:

\[ 2S_{\triangleright} = \sum_{1 \le j,k \le n} a_j a_k + \sum_{k=1}^{n} a_k^2. \]
Step 4

Substitute the Square Sum and Simplify

The unrestricted double sum factors immediately:

\[ \sum_{1 \le j,k \le n} a_j a_k = \left(\sum_{k=1}^{n} a_k\right)^2. \]

Substituting this into the earlier identity gives:

$$ \begin{aligned} 2S_{\triangleright} &= \left(\sum_{k=1}^{n} a_k\right)^2 + \sum_{k=1}^{n} a_k^2, \\[4pt] S_{\triangleright} &= \frac{1}{2} \left( \left(\sum_{k=1}^{n} a_k\right)^2 + \sum_{k=1}^{n} a_k^2 \right). \end{aligned} $$
Closed form \[ S_{\triangleright} = \frac{1}{2} \left( \left(\sum_{k=1}^{n} a_k\right)^2 + \sum_{k=1}^{n} a_k^2 \right). \]
Interpretation

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.

FAQ

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

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:

\[ \sum_{1 \le j \le k \le n} a_j a_k = \frac{1}{2} \left( \left(\sum_{k=1}^{n} a_k\right)^2 + \sum_{k=1}^{n} a_k^2 \right). \]

Raell Dottin

Comments