Notation of sum of product of matrix $\sum_{i,j}\sum_{k}W_{ik}H_{kj}$, why does $\sum_{i,j}$ come first?

112 Views Asked by At

For the matrices, $W (i*k)$ and $H (k*j)$. When writing notation of sum of product $$\sum_{i,j}\sum_{k}W_{ik}H_{kj}$$

, why is $\sum_{i,j}$ written before $\sum_{k}$? Does it imply something like sum over $k$ first? If yes, how does it sum over $k$ first?

Another thing is, is writing separately different from writing $\sum_{i,j,k}$?

1

There are 1 best solutions below

0
On BEST ANSWER

Assuming that you're dealing with finite dimensional matrices, so there's no issue with convergence, the order of summation does not matter. There is no special reason, apart from personal preference, for writing $\sum_{i,j}$ before $\sum_k$. In other words, \begin{equation*} \sum_{i,j} \sum_k W_{ik}H_{kj} = \sum_k \sum_{ij} W_{ik}H_{kj}. \end{equation*} Strictly speaking, writing $\sum_{i,j}\sum_k$ means you sum over $k$ first. Here's an example of what it would look like when you write out the terms: \begin{equation*} \sum_{i,j=1}^n \sum_{k=1}^n W_{ik}H_{kj} = W_{11}H_{11} + W_{12}H_{21} + W_{13}H_{31} + \cdots. \end{equation*} Note that in the terms I wrote out, I am keeping $i$ and $j$ equal to $1$ and increasing $k$. After I finished writing out the $k$ terms for $i=1$ and $j=1$, I'd keep $i=1$, change to $j=2$, and write out the $k$ terms again, and so on. Writing the sums separately is no different mathematically than writing $\sum_{i,j,k}$. As I wrote above, mathematically the order in which you sum over the indices in the example you gave does not matter. I hope this helps.