The grammar of formulas: brackets, order and space
In 2019 a sum with four numbers spread across social media and provoked millions of arguments:
$$8\div2(2+2)=\;?$$Half the people answered $16$; the other half, $1$. Calculators of different brands gave different answers. Mathematics teachers were divided. And the curious thing is that both sides were right, each according to a convention.
Those who answer $16$ read from left to right: $8\div2=4$, and $4\cdot(2+2)=16$. Those who answer $1$ take the “glued” multiplication without a sign, $2(2+2)$, as a block that comes before the division: $8\div(2\cdot4)=1$. Both conventions exist and are used in serious books. The problem is not arithmetic. It is syntax: the expression was written in a way that does not make clear how the signs group together. A mathematician would never write it like that; they would write $\frac{8}{2}(2+2)$ or $\frac{8}{2(2+2)}$, and there would be no fight.
The same pieces, different assemblies
A formula is not a queue of signs. It is an assembly, and the assembly is part of the meaning. Compare
$$a+b\cdot c\qquad\text{and}\qquad(a+b)\cdot c.$$The pieces are the same: three letters, a $+$ and a $\cdot$. But by the usual convention, in the first the multiplication is done first; in the second, the brackets force you to add first. With $a=2$, $b=3$ and $c=4$:
Brackets are curious signs. They represent no quantity, no operation, no object. They only say how the other signs join together. In Morris’s classification they are purely syntactic. And yet they change the result.
The rule that multiplication comes before addition is not a law of nature. It is a convention that settled between the seventeenth and nineteenth centuries, when Descartes’s algebra began to do without brackets in polynomials: in $3x^2+2x+1$, nobody wants to write $(3\cdot(x^2))+(2\cdot x)+1$. The convention exists so that the most common expressions are short.
The hidden tree
Every expression has a tree structure, and reading a formula is, at bottom, rebuilding that tree. Look at $2(x+3)^2$:
How to build 2(x + 3)² (click to go on)
- Start with what is most “inside”: $x+3$.
- Square the result: $(x+3)^2$. The small exponent, up high, applies to the whole bracket.
- Multiply by $2$: $2\,(x+3)^2$. The $2$ glued on the left is the last to act.
Now compare with $2x+3^2$, which has almost the same pieces. Here $3^2$ is computed on its own, $2x$ is another branch, and the sum joins the two at the end. For $x=1$, the first expression gives $2\cdot16=32$ and the second gives $2+9=11$.
Two-dimensional writing helps a lot in seeing the tree. The fraction bar, for example, is a bracket in disguise: in
$$\frac{x+1}{x-1}$$we need not write $(x+1)/(x-1)$, because position, above and below, already shows what groups with what. The exponent, up high, and the radical, with its bar covering everything beneath it, do the same. On the single line of a keyboard all this structure has to go back into brackets, which is why so many people make mistakes typing formulas into spreadsheets.
Space is a sign too
Look at this expression: $ab$. There is no sign between $a$ and $b$, and yet we read “$a$ times $b$”. Juxtaposition, putting two things side by side, is an invisible multiplication sign. But careful: in $23$, the juxtaposition of $2$ and $3$ does not mean $2\cdot3$ but twenty-three; in $\sin x$, the letters $s$, $i$ and $n$ are not multiplied but form the name of a function; and in $f(x)$ the $f$ does not multiply $(x)$ but is applied to it, whereas in $a(x+1)$ the $a$ multiplies the bracket. The same “nothing” between two signs has at least four meanings, and the reader decides which by the type of the signs involved: digits, letters, function names.
That is why there are conventions of mathematical typography. Names of well-known functions, such as $\sin$, $\log$ and $\exp$, are set in upright type, while variables go in italics: so $\sin x$ is not confused with $s\cdot i\cdot n\cdot x$. The difference between upright and slanted letters looks like a printing detail, but it is syntax.
Exercise: put in brackets
In $2+3\cdot4-1$, without brackets, the result is $2+12-1=13$. Where do you put brackets to get $19$? And $15$?
- $(2+3)\cdot4-1=20-1=19$.
- $(2+3)\cdot(4-1)=5\cdot3=15$.
There is also $2+3\cdot(4-1)=11$. The same queue of signs admits four assemblies with different results: $13$, $19$, $15$ and $11$.
Exercise: remove the ambiguity
Rewrite $8\div2(2+2)$ with a fraction bar, in two ways, one for each reading:
$$\frac82\,(2+2)=4\cdot4=16\qquad\text{and}\qquad\frac{8}{2(2+2)}=\frac88=1.$$The fraction bar, being two-dimensional, leaves no doubt about what is above and what is below. It is one more reason why mathematicians almost never use $\div$.
Chapter index · ← The object and its representations: the case of fractions · When place is the algorithm: multiplication and the rule of three →