# Is $\sum_{k=1}^n\sum_{j=1}^nk\cdot j=\sum_{k=1}^nk\cdot\sum_{j=1}^nj$?

I have found confronting information on other websites and thus will ask my question here.

Is the following conversion legitimate?

$$\sum_{k=1}^n\sum_{j=1}^nk\cdot j=\sum_{k=1}^nk\cdot\sum_{j=1}^nj$$

I have seen someone doing something similar on Matroids Matheplanet.

Philipp

Yes.

Since $k$ is a multiplier not related to $j$, it can be "factored" out, resulting in the product of two summations.

Simple example, using $n=3$:

$$\text{LHS}=\sum_{k=1}^3\sum_{j=1}^3 k\cdot j=\sum_{k=1}^3 k+2k+3k=\sum_{k=1}^3 6k=6\sum_{k=1}^3 k=6(1+2+3)=36\\ \text{RHS}=\sum_{k=1}^3k\sum_{j=1}^3 j=(1+2+3)(1+2+3)=36$$

For the general case, \begin{align} \text{LHS}&=\sum_{k=1}^n\sum_{j=1}^n k\cdot j\\ &=\sum_{k=1}^n k+2k+3k+\cdots +nk\\ &=\sum_{k=1}^3 (1+2+3+\cdots+n)k\\ &=\sum_{k=1}^n \frac {n(n+1)}2k\\ &=\frac {n(n+1)}2\sum_{k=1}^nk\\ &=\frac {n(n+1)}2\cdot\frac {n(n+1)}2\\ &=\sum_{k=1}^n k\sum_{j=1}^n j \end{align}

Note: If $k$ is not a multiplier for the entire summand, then it cannot be "factored" out.

Example:

$$\sum_{k=1}^n\sum_{j=1}^n j+k\neq \sum_{k=1}^nk+\sum_{j=1}^nj$$

$$\sum_{k}\sum_{j}kj=\sum_{k}\left(k(1+2+3+...)\right)$$ $$=(1+2+3...+n)1+(1+2+3...+n)2+...+(1+2+3...+n)n$$ And $$\sum_{k}k\sum_{j}j=(1+2+3...+n)(1+2+3...+n)$$ Clearly, by distribution, the two are equal.

Since you have final sums, there is no problem. See $$\sum_{k=a}^n\sum_{j=b}^m c_kd_j=\sum_{k=a}^n\left(\sum_{j=b}^m c_kd_j\right)= \sum_{k=a}^n\left(c_k\sum_{j=b}^m d_j\right)=\left(\sum_{k=a}^nc_k\right)\left(\sum_{j=b}^m d_j\right)$$ You just use the distributive law. At the first equation I added the brackets to clarify the meaning. Next $c_k$ is in the sum over $j$ like a constant. So you can exchange them. Finally the sum over j is independent of $k$ and you can exchange them again.

Yes

\begin{eqnarray} \sum_{k=1}^n\sum_{j=1}^nk\cdot j &=& \sum_{k=1}^n k \cdot (1+2+...+n)\\ &=&1(1+2+...+n)+2(1+2+...+n)+...+n(1+2+...+n )\\ &=& (1+2+...+n)(1+2+...+n)\\ &=&\sum_{k=1}^nk\cdot\sum_{j=1}^nj \end{eqnarray}

Trivia: $\Large\sum, \int, \newcommand{\derivative}[3] {\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \derivative{n}{y}{x}$ are linear operations.

What does it mean?

$\Large f(x)$ is linear if and only if

$$\Large f(x+y)=f(x)+f(y)$$

$$\Large f(ax)=a\cdot f(x)$$

Let

$$\large f(x)=\sum_{j=1}^nx$$

And

$$\large a=\sum_{k=1}^nk$$

So

$$\large f(ax)= \sum_{j=1}^n\left(\sum_{k=1}^nk\right)x$$