When should \cdot be used to indicate multiplication?
This is only useful to avoid ambiguity. Two circumstances come to mind:
Multiplying actual numbers, as you say:
2 \cdot 2
versus22
is obviously the way to go. More subtly, writing, say,2 \cdot 3^4
is an improvement over2 3^4
for the same reason. You might say "of course!" except that sometimes, if you have a pedantic input style (like me) you fool yourself:2 {13}^2
looks like213^2
.Function notation. This is the only time in abstract algebra that juxtaposition of symbols means something other than multiplication; it means the "product" of a function acting on its argument instead. So, for example, if you have a function
f(x)
and you try to multiply it byx + 1
, you could write eitherf(x + 1)
(obviously wrong) orf(x) (x + 1)
(too many similar braces). Here, writingf \cdot (x + 1)
orf(x) \cdot (x + 1)
is probably best.
This is a totally anecdotal answer.
In "higher" mathematics, no symbol is generally used to denote multiplication, except for avoiding ambiguities.
Well written algebraic expressions very rarely need an explicit symbol for the multiplication, but in this case it's almost always a centered dot (\cdot
). I've seen \times
used to mark a multiplication when a formula needs to be split, but it's better to split at a "plus" or a "minus" sign (or to use \cdot
).
Take into account that \times
has acquired a precise technical meaning for denoting set product. However some national typographic traditions might prefer \times
(or even a dot at the baseline).
Of course a symbol is necessary when writing the multiplication of two explicit numbers as 2\cdot 3
, but usually not in 2(4-1)
, which is not ambiguous.
Precedence rules usually help in deciding possible ambiguities: a function symbol ties more than operation ones, so
sin(x + 1)(a + b)
should mean "the sine of x+1 multiplied by a+b", but it would be better to write the expression as
(a + b) sin(x + 1)
Note that a dot would still not add to the clarity. Multiplication by explicit numbers has still higher precedence, so
sin 2x
is "the sine of 2x" and not "(the sine of 2) multiplied by x". Here, again, a dot would not add to clarity. In case of doubt, add parentheses:
sin(2x)
For numbers in floating point format, the usage oscillates between \cdot
and \times
0.42 · 105 or 0.42 × 105
Using a high level LaTeX package such as siunitx
allows to be consistent:
\num{0.42e5}
will print the number according to a standard convention or our personal preference (look at the documentation).
Since multiplication is a binary operation, using $2\mathbin{<whatever>}2$
would provide the correct horizontal spacing. In both instances, \cdot
and \times
are typeset as a binary relation in terms of spacing:
\documentclass{article}
\begin{document}
\begin{tabular}{cc}
\LaTeX & Output \\ \hline
\verb|$2 \cdot 2$| & $2 \cdot 2$ \\
\verb|$2\mathbin{\cdot}2$| & $2\mathbin{\cdot}2$ \\
\verb|$2 \times 2$| & $2 \times 2$ \\
\verb|$2\mathbin{\times}2$| & $2\mathbin{\times}2$
\end{tabular}
\end{document}
It would depend on whether or not a compact or less compact visualization is required and may therefore result in a personal preference; \cdot
for the former or \times
for the latter.
Of course, using multiples of variables, you could drop this altogether and just use (say) 2c
instead of 2 \cdot c
, since it is generally understood that they are the same.