10

Which is the case:

$$ \prod_{i \in I}i! = \prod_{i \in I}(i!) $$

or

$$ \prod_{i \in I}i! = \Bigg(\prod_{i \in I}i\Bigg)! $$

Eric Wofsey
  • 330,363
coderodde
  • 291
  • 13
    It's ambiguous and it's best to put the parentheses in to make it clear. I believe most people will read it as a product of factorials. But there's no authority saying they are correct. – fleablood Apr 29 '18 at 06:21
  • 4
    I second what @fleablood has said. You're asking the wrong question. Your goal is to communicate something (namely, [product over i of [i factorial]]), and it doesn't matter what is 'correct' so much as whether or not readers are going to understand. Parenthesis will make sure that your writing is unambiguous. – Quelklef Apr 30 '18 at 00:04
  • 1
    Math is not a programming language. If it's unclear, add parentheses. It would be unreasonable for a reader to assume the latter interpretation for this particular formula, so you can get away with just $\prod i!$. – anomaly Apr 30 '18 at 02:17

3 Answers3

14

This would depend on the author, but the former notation would be much more common: $$\prod_{i \in I}i! = \prod_{i \in I}(i!)$$

If the product itself was factorialized, it would most likely be written as the latter: $$\Bigg(\prod_{i \in I}i\Bigg)!$$

edit: added the bolded word much.

zahbaz
  • 10,441
13

The convention \begin{align*} \prod_{i \in I}i! = \prod_{i \in I}(i!)\tag{1} \end{align*} is also affirmed by the operator precedence rules stated in OEIS.

  • For standard arithmetic, operator precedence is as follows:

    1. Parenthesization,

    2. Factorial,

    3. Exponentiation,

    4. Multiplication and division,

    5. Addition and subtraction.

and since the product sign $\prod$ is just a short-hand for successively using the multiplication operator, the convention (1) is valid.

Markus Scheuer
  • 108,315
  • That list is exactly what I wanted to see. Thank you, Markus! – coderodde Apr 29 '18 at 10:36
  • @coderodde: You're welcome. :-) – Markus Scheuer Apr 29 '18 at 12:14
  • 9
    I feel that this answer doesn't generalize well, at least to the practices of notation I'm familiar with; it's fairly common to see things like $\prod_{x=1}^{10}x+x^2$ or $\prod_{n=0}^{10}2n+1$ where the addition should be taken before the product - and I think this is more common than the parenthesized variant that this answer would require. (This is especially true when, as in the first product, there is a bound variable at the end, or when this occurs alone or at the end of an expression) – Milo Brandt Apr 29 '18 at 17:44
  • 4
    @MiloBrandt: I disagree. We have per definition of the precedence rules for arithmetic $\prod_{x=1}^{10}x+x^2=\left(\prod_{x=1}^{10}x\right)+x^2$ with the term $x^2$ being a free variable (badly named). It is just a sloppy (admittedly often seen) bad notational style to write erroneously $\prod_{x=1}^{10}x+x^2$ if someone wants to say $\prod_{x=1}^{10}(x+x^2)$. Please see also this answer. – Markus Scheuer Apr 29 '18 at 17:52
  • 4
    @MarkusScheuer: Citing your own answer isn't very convincing. In any case, if $\prod$ were to have the same precedence as multiplication, then $\prod_{x \in X}x(1-x)$ would be treated as $(\prod_{x \in X}x)(1-x)$, which is not the standard interpretation. – user2357112 Apr 30 '18 at 01:45
  • 1
    I would like to mention that the OEIS page you linked also has some discussion of implied parentheses in product iterations. – Robert Soupe Apr 30 '18 at 02:15
  • The precedence rules order various notations for operations. Different notations need different considerations. The fact that the $\prod$ notation denotes a product is not relevant here. It's a different notation. As an example of how operator-notation can affect precedence even without changing the operator's meaning: $a/2\cdot b$ and $a/2b$ mean different things. – Rosie F Apr 30 '18 at 07:18
  • @user2357112: I agree with your standard interpretation. Nevertheless this is just an often agreed convention in the community to allow a slight misuse of notation in order to enhance readability. – Markus Scheuer Apr 30 '18 at 08:34
  • 1
    @RobertSoupe: The focus of my reference is the stated list. The following discussion at OEIS is regrettably partly misleading. The formulation In more complicated expressions, humans generally understand by common sense* where parentheses are implied* is nonsense. In order to avoid ambiguities, operator precedence rules and other arithmetic rules have been specified (based on common sense). The evaluation of arithmetic expressions is now done syntactically without any semantic overloading. – Markus Scheuer Apr 30 '18 at 08:48
  • $\prod\sum a_{i,j}$ is unlikely to be treated as $a_{0,0}+a_{0,1} * a_{1,0} + a_{1,1}$. "The evaluation of arithmetic expressions is now done syntactically without any semantic overloading" -- that simply isn't true. The only way for that to be true would be if all such evaluation was done by a dumb (non-AI) parser. Someone writing $\prod_{x=0}^{n} x^2 + x$ is almost never going to be read the way your answer implies it "should be" read, and anyone who writes it to be read the way you say it "should be" read is writing it wrong (hopefully for a joke) – Yakk Apr 30 '18 at 11:16
  • 1
    @Yakk: I think I see your point and I don't agree. :-) Of course we read $\prod_{x=0}^n x^2+x$ as $\prod_{x=0}^n\left(x^2+x\right)$ since we can most likely assume the brackets are simply erroneously missing. Nevertheless without brackets we are in the same situation as in $\prod_{x=0}^n3+4$ which is $3^{n+1}+4$ and not $7^{n+1}$. – Markus Scheuer Apr 30 '18 at 13:52
  • 1
    Except everyone who reads that equation reads it the "right" way, and next to nobody reads it the way you do. This is an example of failure of prescriptivism. The fact that your prescriptivist position gets the wrong answer is evidence of failure of your position, not proof that everyone else is wrong. People do not parse mathematics like a formal grammar in practice, and specifically don't parse it the way you state they should in corner cases. Saying "if they did it the way I demand they'd be right" doesn't make your position correct, it just asserts it. – Yakk Apr 30 '18 at 13:56
8

I would see it as $$\prod_{i \in I}i! = \prod_{i \in I}(i!)$$

Like the $\sum _i a_i^2$ which is $\sum _i (a_i^2)$ not $(\sum _i a_i)^2$

  • Good analogy. The $\prod$ notation is more like the $\sum$ notation (even though they mean different things) than it is to symbol-concatenation to denote product. – Rosie F Apr 30 '18 at 07:22