3

I have a question on the notation for two products.

For Pi:

Is this statement true?

$$\prod_{k=1}^{l}a_k\prod_{m=1}^{n}b_m = \prod_{k=1}^{l}\prod_{m=1}^{n}a_kb_m \neq a_1a_2\dots a_lb_1b_2\dots b_n = \left(\prod_{k=1}^{l}a_k\right)\left(\prod_{m=1}^{n}b_m\right)$$

For Sigma and Pi:

When dealing with double (or nested/multiple) operators, do we by convention always deal with the "rightmost" (or the innermost) operator first (this applies to any operator in general)?

$$\sum_{r=1}^{w}\prod_{u=1}^{w}g\left(r, u\right) = \sum_{r=1}^{w}g\left(r,1\right)g\left(r,2\right)\dots g\left(r,w\right) = \prod_{u=1}^{w}g\left(1, u\right) + \prod_{u=1}^{w}g\left(2, u\right) + \dots + \prod_{u=1}^{w}g\left(w, u\right)$$

$$\prod_{u=1}^{w}\sum_{r=1}^{w}g\left(r, u\right) = \prod_{u=1}^{w}\left[g\left(1,u\right) + g\left(2,u\right) + \dots + g\left(w,u\right)\right]$$

Or can we evaluate the outermost ("leftmost") first? Does the equivalence of operating from innermost and operating from the outermost depend on the types of operators (pi, sigma, integral, etc.)? Is operating from the innermost operator always the way to go?

RobPratt
  • 45,619
Superman
  • 255

1 Answers1

1

First part:

The left-most equal sign in the first line is not correct.

We have per definition \begin{align*} \prod_{k=1}^la_k\prod_{m=1}^nb_m=\left(\prod_{k=1}^la_k\right)\left(\prod_{m=1}^nb_m\right) =\left(a_1\cdots a_l\right)\left(b_1\cdots b_m\right)\tag{1} \end{align*} On the other hand we have per definition \begin{align*} \prod_{k=1}^l\prod_{m=1}^na_kb_m &=\prod_{k=1}^l\left(\prod_{m=1}^na_k\right)b_m\tag{2}\\ &=\left(\prod_{k=1}^l\left (a_1\cdots a_l\right)\right)b_m\tag{3}\\ &=\left (a_1\cdots a_l\right)^lb_m\tag{4} \end{align*}

Comment:

  • In (1) we note the product symbol $\prod$ and the multiplication operator $\cdot$ have the same precedence level. This means that without parentheses the $\prod$ symbol takes just one variable to the right of it and not more. This is the scope defined for the product symbol. This is indicated by the parentheses which enclose the product symbols.

  • In (2) we apply precisely the same rules with a somewhat unexpected result. The scope of the inner product encloses $a_k$ but not $b_m$. If we want to have $b_m$ enclosed, we have to put it in parentheses resulting in \begin{align*} \prod_{m=1}^n\left(a_kb_m\right)=(a_kb_1)(a_kb_2)\cdots(a_kb_n)=a_k^nb_1\cdots b_n \end{align*}

  • In (3) we have again a situation where $b_m$ is not within the scope of the product symbol, resulting in the representation (4). Note that $b_m$ is a variable with index $m$ which is not bound to a product symbol. See the concept of bound and free variables.

Second part:

When dealing with expressions like $\sum_{r=1}^{w}\prod_{u=1}^{w}g\left(r, u\right)$ we are thanks to the arithmetic rules and the precedence levels of multiplication and addition free to either start with the inner product or with the outer sum.

We obtain \begin{align*} &\sum_{r=1}^w\prod_{u=1}^wg(r,u)\\ &\qquad=\sum_{r=1}^wg(r,1)\cdots g(r,w)\\ &\qquad=g(1,1)\cdot\ldots\cdot g(1,w)+g(2,1)\cdot\ldots\cdot g(2,w)\\ &\qquad\qquad +\cdots+g(w,1)\cdot\ldots\cdot g(w,w)\tag{5} \end{align*} and \begin{align*} &\sum_{r=1}^w\prod_{u=1}^wg(r,u)\\ &\qquad=\prod_{u=1}^wg(1,u)+\prod_{u=1}^wg(2,u)+\cdots+\prod_{u=1}^wg(w,u)\\ &\qquad=g(1,1)\cdot\ldots\cdot g(1,w)+g(2,1)\cdot\ldots\cdot g(2,w)\\ &\qquad\qquad+\cdots+g(w,1)\cdot\ldots\cdot g(w,w)\tag{6} \end{align*} We observe (5) and (6) coincide.

The same holds for the other expression: $\prod_{u=1}^w\sum_{r=1}^wg(r,u)$.

Markus Scheuer
  • 108,315
  • 2
    Actually, I don't think these are universal conventions... – paul garrett May 16 '21 at 18:43
  • @paulgarrett: I think I see your point. But we should distinguish between syntactical rules and conventions which sometimes ignore these rules. – Markus Scheuer May 16 '21 at 18:53
  • Markus, for (1), someone may interpret the right part of the LHS as being enclosed in the outer product (as one usually does, evaluate the inner part before the outer). For (2), how come $b_m$ is not enclosed in the LHS even though $m$ is in both the subscript and the inner product index? If those two Pi’s were replaced by Sigmas, then $b_m$ is enclosed. See this and this. – Superman May 16 '21 at 21:19
  • Moreover, for the second part, multiplication has higher precedence than addition, so the former should be done first, as shown by (5). If that’s the case, then wouldn’t (6) be “legally” wrong, since we are doing the addition before multiplication? – Superman May 16 '21 at 21:20
  • @Superman: Many aspects which need some effort to clarify. Ad (1) evaluation inner before outer need to follow the rules of scope. These are different issues. (2) Think about $i+\sum_{i=1}^n a = i + na$. The left-most variable $i$ has nothing to do with the index $i$. It's all a matter of scope. – Markus Scheuer May 16 '21 at 21:39
  • @Superman: If you replace the product symbols by sigma symbols then we have completely different arithmetic rules, cause then we have to apply the rule of distributivity $a(b+c)=ab+ac$. etc. – Markus Scheuer May 16 '21 at 21:43
  • @MarkusScheuer “Ad (1) evaluation inner...” what do you mean by “ad”? Also, for (2), would $\sum_{i=1}^n a + i = na + i$ as well, since the variable $i$ is not in the summation’s scope (i.e., parenthesized)? By the way, for (1), is it analogous to having two sigmas with a plus in between the two summations? – Superman May 17 '21 at 01:51
  • 1
    @Superman: "Ad (1)" is just a latin phrase for "Let's consider (1)". Your next point (2) addresses a core point: Your assumption regarding the scope is correct and also the assumption regarding the last point is correct. The scope rules do also hold for the sigma symbols and the $+$ operator as well. You might want to look at this answer which could help to clarify the situation. You might also find the reference there useful. Regards, – Markus Scheuer May 17 '21 at 11:08