Binary operators

“I do not like × as a symbol for multiplication, as it is easily confounded with x.” Leibniz wrote that to Johann Bernoulli in 1698. Every time you hesitate in LaTeX between \times and \cdot — two of the binary operators this page covers — you are taking a side in an argument more than three centuries old. The real subject here, though, is not the glyph. TeX sorts every symbol in a formula into a class, and that class alone fixes the space around it, which is why the + in $+1$ and the + in $a+1$ are set at different widths despite being the same character. This page surveys the operators — \times, \div, \cdot, \pm, \oplus, \cup, \setminus and the rest — says which ones need amssymb, and shows how to overrule TeX with \mathbin when it guesses wrong.

\cdot vs \times: which multiplication sign to use

The default is \cdot (⋅). Use the centred dot when you multiply numbers or quantities inside a formula, and keep \times (×) for cross products, Cartesian products, dimensions (3 \times 3 matrices) and powers of ten (6.02 \times 10^{23}). This division of labour grew directly out of Leibniz's complaint. William Oughtred put × into print in Clavis Mathematicae, published in London in 1631; but x was also algebra's commonest name for an unknown. So in his letter of 29 July 1698 Leibniz rejected the cross and recommended an interposed dot instead. He won. That is why the multiplication × has all but vanished from modern mathematical writing.

The division sign \div (÷) has a parallel history. The symbol is called an obelus, and Johann Rahn was the first to use it for division, in Teutsche Algebra of 1659. ISO 80000-2, the standard for mathematical notation in science and technology, nevertheless prescribes the solidus / or a fraction bar for division and a colon : for ratios, and states plainly that ÷ should not be used. The practical conclusion is simple: in a paper or a technical document, write \frac{a}{b} rather than \div. Reach for \div only when the subject is primary-school teaching or a pocket calculator. One more trap: typing a period instead of \cdot, as in a.b, does not work. TeX does not treat a period as an operator, so no space is added — measured in a 10 pt document, $a.b$ comes out at 12.36pt against 16.80pt for $a \cdot b$ — and the result reads as a decimal point rather than a product. Typing * directly, on the other hand, is perfectly fine: in math mode * is exactly the same binary operator as \ast and sets identically.

latex
% \cdot for ordinary products; \times for cross products, dimensions, powers of ten
\[ 2 \cdot 3 = 6, \qquad \mathbf{u} \times \mathbf{v}, \qquad 6.02 \times 10^{23} \]
% a period is not a multiplication dot: it gets no operator spacing
\[ a.b \qquad a \cdot b \]
% in scientific writing prefer a fraction to the obelus
\[ \frac{a}{b} \qquad a \div b \]
CommandGlyphMeaning / when to use
\pm±plus-or-minus; x = a \pm b
\mpminus-or-plus; the opposite sign to \pm
\times×cross product, Cartesian product, dimensions, powers of ten
\div÷the obelus; scientific writing prefers \frac
\cdotthe default multiplication dot; scalar and dot products
\astconvolution and the like; identical to * in math mode
\starfive-pointed star; often an ad-hoc product
\circcomposition of functions; g \circ f
\bulletfilled dot; a heavier counterpart to \circ
\diamonddiamond operator

Why the + in $+1$ is set tight

A binary operator is a symbol that joins the things on either side of it, so if there is nothing to join on one side, TeX concludes it is not a binary operator at all. A + at the head of a formula is demoted to a sign — a unary one — and receives no space whatsoever. The numbers make this obvious. In a 10 pt document $+1$ measures 12.78pt; put an empty group in front, writing ${}+1$, and the + suddenly has a left-hand operand, becomes a genuine binary operator again, and the width grows to 17.22pt. The 4.44pt difference is 2.22pt on each side. That 2.22pt is the parameter \medmuskip (default 4mu plus 2mu minus 4mu), which is narrower than the \thickmuskip (5mu plus 5mu, or 2.78pt per side) used for relations — which is why $a=b$ sits more loosely than $a+b$. No amount of whitespace in your source changes any of this. The class alone decides the spacing.

The mechanism can also turn against you, because braces destroy a symbol's class. $a\times b$ measures 21.80pt, but write $a{\times}b$ and it shrinks to 17.36pt: whatever sits inside a group is treated as a single ordinary symbol (class Ord) and forgets it was ever a binary operator. When a macro of your own produces a symbol that is mysteriously short of space, this is almost always the reason. The cure is \mathbin{...}: $a\mathbin{\times}b$ measures 21.80pt again, matching plain $a\times b$ exactly. Going the other way, \mathord{...} removes the space and \mathrel{...} sets the symbol as a relation — $a\mathrel{\times}b$ comes out at 22.91pt, precisely the width of $a=b$.

latex
% a leading + has nothing to bind: TeX makes it a sign and sets it tight
% an empty group gives it a left operand and the medium space comes back
\[ +1 \qquad {}+1 \]
% braces strip the class; \mathbin puts it back, \mathrel makes it a relation
\[ a \times b \qquad a {\times} b \qquad a \mathbin{\times} b \qquad a \mathrel{\times} b \]
% always declare the class when you define an operator of your own
\newcommand{\op}{\mathbin{\triangle}}
\[ x \op y \]
CommandClass it forcesSpace added on each side (10 pt text)
\mathbinbinary operator2.22pt (\medmuskip = 4mu)
\mathrelrelation2.78pt (\thickmuskip = 5mu)
\mathordordinary symbol (Ord)none; the same result as wrapping in braces

Circled and boxed operators: which ones need amssymb

Every circled operator is standard LaTeX; every boxed one needs amssymb. That single line settles most of the question. Direct sum \oplus (⊕), tensor product \otimes (⊗), \odot (⊙) for the Hadamard product and its kin, together with \ominus, \oslash and \bigcirc, all work with no package loaded at all. The boxed family — \boxplus (⊞), \boxminus (⊟), \boxtimes (⊠), \boxdot (⊡) — plus the AMS additions to the circled family, \circledast (⊛) and \circledcirc (⊚), presuppose \usepackage{amssymb} in the preamble. Forget it and the run stops at ! Undefined control sequence. As for choosing among them, the guide is convention: ⊕ for an additive operation, ⊗ for a multiplicative one. Category theory and representation theory follow that reading almost without exception.

CommandGlyphPackageMeaning / use
\oplusdirect sum; additive operations
\ominuscircled minus
\otimestensor product; multiplicative operations
\oslashcircled slash; element-wise division
\odotHadamard or element-wise product
\bigcirclarge circle
\circledastamssymbcircled asterisk
\circledcircamssymbcircled ring
\boxplusamssymbboxed plus
\boxminusamssymbboxed minus
\boxtimesamssymbboxed times
\boxdotamssymbboxed dot
latex
% circled operators are standard; boxed ones come from amssymb
\usepackage{amssymb}
% ...
\[ V \oplus W, \qquad u \otimes v, \qquad A \boxplus B \]

The big versions of the same shapes — \bigoplus (⨁), \bigotimes, \bigodot, \biguplus — are not binary operators. They belong with \sum in the class of big operators, which means they take limits above and below and change size between inline and display style. Do not try to enlarge \oplus with \Large or the like; the limits will land in the wrong place. Use \bigoplus. The separate page on sums, integrals and big operators goes into detail.

Set and lattice operators: \cup, \cap, \wedge, \vee, \setminus

Everything in this section is standard LaTeX; no package required. Intersection \cap (∩), union \cup (∪), multiset sum \uplus (⊎), set difference \setminus (∖). In lattices and ordered sets you also meet the square \sqcap (⊓) and \sqcup (⊔); in logic, \wedge (∧) and \vee (∨), which carry the aliases \land and \lor. The glyphs are identical — the only difference is that the logical names read better in a logical context. The commonest accident here is writing a set difference as \backslash. That command is an ordinary symbol (class Ord), so it gets no binary-operator spacing: measured at 10 pt, $A \backslash B$ is 20.59pt against 25.03pt for $A \setminus B$ — 2.22pt short on each side. Always use \setminus for a set difference. With amssymb loaded you can also pick the slimmer \smallsetminus (∖).

CommandGlyphPackageMeaning / use
\capintersection
\cupunion
\uplusmultiset sum; disjoint union
\sqcaplattice meet
\sqcuplattice join
\wedgelogical and, or meet; alias \land
\veelogical or, or join; alias \lor
\setminusset difference; \backslash is not a substitute
\wrwreath product
\smallsetminusamssymbslimmer set difference
\Capamssymbdouble intersection
\Cupamssymbdouble union
latex
% a set difference needs \setminus, not \backslash
\[ A \setminus B \qquad A \cup (B \cap C) \]
% \land and \lor are aliases of \wedge and \vee
\[ p \wedge q \iff p \land q \]

The remaining operators, and the \lhd not provided in base LaTeX2e error

What remains is a miscellany, but each item earns its place. The coproduct or disjoint union \amalg (⨿); the dagger \dagger (†) and double dagger \ddagger (‡) for adjoints and duals; and the triangles \triangleleft (◁) and \triangleright (▷) for normal subgroups and actions — all standard LaTeX. To these the amssymb regulars are added: the semidirect products \ltimes (⋉) and \rtimes (⋊) of group theory, \intercal (⊺) for a transpose, the dotted \dotplus (∔), and \divideontimes (⋇). Any algebra document will need a semidirect product sooner or later, so putting \usepackage{amssymb} in the preamble from the start is the shorter road.

CommandGlyphPackageMeaning / use
\amalg⨿coproduct; disjoint union
\daggerdagger; adjoint or conjugate transpose
\ddaggerdouble dagger
\triangleleftleft triangle; normal subgroups and the like
\trianglerightright triangle; group actions and the like
\dotplusamssymbdotted plus
\intercalamssymbtranspose marker in a superscript
\ltimesamssymbleft semidirect product
\rtimesamssymbright semidirect product
\divideontimesamssymbdivision-times sign
\lhdlatexsym / amssymbheavier left triangle; unavailable in plain LaTeX
\rhdlatexsym / amssymbheavier right triangle

The last two rows come with a trap. Type \lhd for a heavier normal-subgroup sign and plain LaTeX stops with ! LaTeX Error: Command \lhd not provided in base LaTeX2e. The names \lhd, \rhd, \unlhd and \unrhd are merely reserved in the kernel; the symbols themselves live in another package. Loading either \usepackage{latexsym} or \usepackage{amssymb} makes all four work, and if you already load amssymb there is nothing to add. Conversely, if the standard \triangleleft (◁) is heavy enough for you, you never meet this error at all.

When you define an operator of your own, remember the class story from the top of this page. Declare the class explicitly, as in \newcommand{\op}{\mathbin{\triangle}}, and from then on writing x \op y is enough: TeX looks after the space on both sides. A macro that forgets its class is treated as an ordinary symbol (Ord), and you end up sprinkling \, by hand at every use. Decide the class before you add the symbol — nearly every spacing accident around binary operators is prevented by that one step.