Expand and group like terms $(a_1 +a_2 + .... +a_m)^2$

45 Views Asked by At

My attempt: $(a_1 +a_2 + .... +a_m)^2 = \\(a_1^2+a_1a_2 + ... + a_1a_m) + (a_2a_1+a_2^2 + ... +a_2a_m) + ... + (a_{m-1}a_1+a_{m-1}a_2+...+a_{m-1}a_m) + (a_{m}a_1+a_{m}a_2+...+a_m^2) = \\(a_1^2+a_2^2+...+a_m^2)+(2a_1a_2 + 2a_1a_3+...+2a_1a_m)+(2a_2a_3+2a_2a_4+...+2a_2a_m)+...+(2a_{m-1}a_1+2a_{m-1}a_2+...+2a_{m-1}a_m)$

Is this correct and, if so, can it be simplified any further?

2

There are 2 best solutions below

1
On BEST ANSWER

In the end, you have the right form for the first terms, $2(a_1a_2 + a_1a_3 + \cdots + a_1a_m)$ and $2(a_2a_3 + a_2a_4 + \cdots + a_2a_m)$, so I think you understood the pattern. But the last term $2(a_{m-1}a_1 + a_{m-1}a_2 + \cdots + a_{m-1}a_m)$ should simply be $2a_{m-1}a_m$. Otherwise, you are counting the term $a_{m-1}a_1$ too many times (it already appears in $(a_1a_2 + a_1a_3 + \cdots + a_1a_{m-1} + a_1a_m)$).

If you know the $\sum$ symbol for sums, it might be easier and more compact to write it using it. You get

$$\left(\sum_{i=1}^m a_i\right)^2 = \sum_{i=1}^m a_i^2 \ + \ 2\sum_{1 \leq i < j \leq m} a_i a_j.$$

The indexation $1 \leq i < j \leq m$ accounts for the fact that $a_ia_j = a_ja_i$ and thus if $i \neq j$, the term $a_i a_j$ should only appear one time in the summation if a factor $2$ is put before. Two alternative forms are

$$\left(\sum_{i=1}^m a_i\right)^2 = \sum_{1 \leq i, j \leq m}^m a_ia_j = \sum_{i=1}^m a_i^2 \ + \ \sum_{1 \leq i, j \leq m, i \neq j} a_i a_j,$$

which also have their usefulness.

1
On

Edit: I missed that the last group of terms was written incorrectly.

Your result is a bit clumsy to write. Instead, we typically write such expansions using sigma notation:

$$a_1 + a_2 + \cdots + a_m = \sum_{i=1}^m a_i$$ hence $$\begin{align} (a_1 + a_2 + \cdots + a_m)^2 &= \left(\sum_{i=1}^m a_i\right)^2 \\ &= \sum_{i=1}^m a_i \sum_{j=1}^m a_j \\ &= \sum_{i=1}^m \sum_{j=1}^m a_i a_j \\ &= \sum_{i=1}^m a_i^2 + \sum_{i \ne j} a_i a_j \\ &= \sum_{i=1}^m a_i^2 + 2 \sum_{1 \le i < j \le m} a_i a_j. \end{align}$$ So your expansion could also be written $$\left(\sum_{i=1}^m a_i\right)^2 = \sum_{i=1}^m a_i^2 + 2 \sum_{1 \le i < j \le m} a_i a_j,$$ or if the expression $1 \le i < j \le m$ is not to your taste, equivalently,

$$\left(\sum_{i=1}^m a_i\right)^2 = \sum_{i=1}^m a_i^2 + 2 \sum_{i = 1}^{m-1} \sum_{j=i+1}^m a_i a_j.$$