8

In a textbook I recently saw the notation $$x_1\cdot x_2\cdots x_n$$ which was intended to mean $\prod\limits_{i=1}^nx_i$. This is unappealing to me because for example one wouldn't write $$x_1+x_2\cdots x_n,$$ but rather $$x_1+x_2+\dots+x_n.$$

On the other hand, there does not seem to be a good alternative since neither of the following look right - $$x_1\cdot x_2\cdot\dots\cdot x_n$$ $$x_1\cdot x_2\cdot\ldots\cdot x_n$$

This leads to the question:

Is $x_1\cdot x_2\cdots x_n$ the proper notation despite being inconsistent, or is there some other accepted way of using dots in conjunction with \cdot?

  • 4
    And why not just remove the first dot? That's how I'd solve the problem. – syusim Apr 29 '15 at 18:17
  • @SamuelYusim The textbook was introducing $x_1x_2\dots x_n$ as notation for the multiplication. – Peter Woolfitt Apr 29 '15 at 18:18
  • 2
    I would do as Samuel. Otherwise if one insist writing the product in between i would write $x_1 \times x_2 \times \cdots \times x_n$ – John Apr 29 '15 at 18:24
  • I agree there are ways in this case to just avoid the notation, but I'm interested in knowing if there is a proper way to do it anyway. – Peter Woolfitt Apr 29 '15 at 18:26
  • I like @SamuelYusim's fix, that's what I would do. I'm generally very careful about where I put "\cdot" if there's an ellipsis in the equation. Individual \cdot's might also get confused with the dot product, so I make sure others know what it stands for. In the above notation I would have read it as product as it's not overly troublesome (and you seem to know exactly what they meant as well), but you could also write it as $x_1x_2\cdots x_n=\prod_{k=1}^nx_k$, which looks better, but in certain contexts I have seen the former might actually be better. So I think it all depends on where it is. – bjd2385 Apr 29 '15 at 18:26
  • @MagicMan Sweet! – Peter Woolfitt Apr 29 '15 at 18:34
  • 1
    Why not use ldots: $x_1 \cdot x_2 \cdot \ldots \cdot x_n$? – Reinstate Monica Apr 29 '15 at 18:43
  • @Solomonoff'sSecret It could be that that is correct, but I don't know (I'm looking forward to seeing what Knuth has to say about it). – Peter Woolfitt Apr 29 '15 at 19:00
  • 2
    @Peter: I couldn’t care less what Knuth thinks: if one is going to write it with the explicit centre dots for multiplication, the only reasonable solution is $x_1\cdot x_2\cdot\ldots\cdot x_n$. – Brian M. Scott Apr 29 '15 at 19:41

2 Answers2

7

From the $\mathrm{\TeX book}$ (Chapter 18: Fine Points of Mathematics Typing, pg. 172):

In general, it is best to use \cdots between $+$ and $-$ and $\times$ signs, and also between $=$ signs or $\leq$ signs or $\subset$ signs or other similar relations. Low dots are used between commas, and when things are juxtaposed with no signs between them at all.

For example:

  • $x_1+\cdots+x_n$$\qquad x_1+\cdots+x_n$
  • $x_1=\cdots=x_n=0$$\qquad x_1=\cdots=x_n=0$
  • $A_1\times\cdots\times A_n$$\qquad A_1\times\cdots\times A_n$
  • $f(x_1,\ldots,x_n)$$\qquad f(x_1,\ldots,x_n)$
  • $x_1x_2\ldots x_n$$\qquad x_1x_2\ldots x_n$
  • $(1-x)(1-x^2)\ldots(1-x^n)$$\qquad (1-x)(1-x^2)\ldots(1-x^n)$
  • $n(n-1)\ldots(1)$$\qquad n(n-1)\ldots(1)$

More typography: This is getting dangerously close to being more appropriate for TeX.SE, but here you have it: There's an important special case in which \ldots and \cdots don't give the correct spacing, namely when they appear at the very end of a formula, or when they appear just before a closing delimiter like `)'. In such situations an extra thin space is needed. For example, consider sentences like these:

  • Prove that $(1-x)^{-1}=1+x+x^2+\cdots\,$.
  • Clearly $a_i<b_i$ for $i=1$,$~2$, $\ldots\,$,$~n$.
  • The coefficients $c_0$,$~c_1$, $\ldots$,$~c_n$ are positive.

To get the first sentence (I personally had to modify a couple of things above because they did not render as needed, but what follows is what Knuth describes in his book), the author typed

Prove that $(1-x)^{-1}=1+x+x^2+\cdots\,$.

Without the \, the period would have come too close to the \cdots. Similarly, the second sentence was typed thus:

Clearly $a_i<b_i$ for $i=1$,~2, $\ldots\,$,~$n$.

Notice the use of ties, which prevent bad line breaks. Here is an exercise from Knuth:

Exercise: B. C. Dull tried to take a shortcut by typing the second example this way:

Clearly $a_i<b_i$ for~$i=1, 2, \ldots, n$.

What's so bad about that?

Knuth's answer:

Explanation: The commas belong to the sentence, not to the formula; his decision to put them into math mode meant that ${\rm\TeX}$ didn't put large enough spaces after them. Also, his formula `$i=1,2,\ldots,n$' allows no breaks between lines, except after the $=$, so he's risking overfull box problems. But suppose the sentence had been more terse: $$\text{Clearly $a_i<b_i\quad(i=1,2,\ldots,n)$.}$$ Then his idea would be basically correct:

Clearly $a_i<b_i$ \ ($i=1,2,\ldots,n$).

My own thoughts: I have noticed Knuth's great consistency in notational conventions. For example, in TAOCP, the seventh exercise in 1.2.11.2 reads as follows:

What is the approximate value of $1^12^23^3\ldots n^n$?

It's very obvious Knuth means $\prod_{i=1}^n i^i$ here, just as your textbook has $\prod_{i=1}^nx_i$ to mean $x_1x_2\dots x_n$ as the notation they were introducing to represent multiplication.

I think everyone can agree that $x_1\cdot x_2\cdots x_n$ is absolutely hideous and should be avoided. Regardless, to a degree, I disagree with Brian M. Scott's comment about $x_1\cdot x_2\cdot\ldots\cdot x_n$ being the only "reasonable solution." For example, in David Gunderson's book Handbook of Mathematical Induction, one comes across the following exercise (screenshot to preserve authenticity):

enter image description here

Of course, that's not pretty at all. Having five center dots is a bit of overkill, and it looks rather horrible. In that case, I think the best solution is to do what Brian mentioned and have $1\cdot3\cdot5\cdot\ldots\cdot(2n-1)$ because you obviously can't have $135\ldots(2n-1)$, but Brian's predilection for using \ldots has been stated before, where he often uses \ldots even between $+$ signs to get $+\ldots+$ (I don't think anything is wrong about this; there is bias in that comment though).

What is truly important? That people understand what you are communicating. Of course, it is nice to typeset things very well and make correct use of notation, but I don't think it's something to get too huffy and puffy about (although I do agree $x_1\cdot x_2\cdots x_n$ is a bit disappointing). As the amazing egreg points out (and egreg, if you are reading this, please correct me if I went amiss anywhere), the notation $f : A\to B$ is not even correct--it should be $f\colon A\to B$, but the former is much more common for whatever reason.

1

You can write $$x_1 x_2 \cdots x_n = \prod_{i=1}^n x_i.$$

This does not work well for products whose first few terms are literal numbers, however; in $$1 \cdot 3 \cdot 5 \cdot 7 = \prod_{i=1}^4 (2i-1),$$ setting the numbers without any symbol for multiplication would be simply incorrect in my opinion.

Among other alternatives already mentioned, I think I have sometimes seen extra space inserted between the dot representing multiplication and the dots representing ellipsis:

$$x_1 \cdot x_2 \cdot \;\cdots\; \cdot x_n = \prod_{i=1}^n x_i.$$

This way you do not have something that just looks like five dots in a row.

In that vein, $$1 \cdot 3 \cdot 5 \cdot \;\cdots\; \cdot (2n-1) = \prod_{i=1}^n (2i-1).$$

David K
  • 98,388