6

Every kid knows $1+2\times3$ is equal to $1+(2\times3)$, not $(1+2)\times3$. But the more I think about it, the more counterintuitive it seems. You have to tell kids to memorize the rule, instead of just following the literal order.

So I think the operator precedence might be "invented" somewhere, by someone or some cultures. Is it a part of Arabic numerals? Did ancient Greek and Egyptians have it? And is/was there a culture where $1+2\times3$ equals $9$?

HDE 226868
  • 8,453
  • 4
  • 35
  • 66
Lai Yu-Hsuan
  • 163
  • 5

2 Answers2

7

The idea of operator precedence - also known as order of operations - is a relatively recent concept, in part because the common mathematical operators for the four basic arithmetical operations - $+,-,\times,\div$ - weren't all in use until a few hundred years ago. For example, as Florian Cajori writes in A History of Mathematics, one of the symbols for multiplication ($\times$) was created by William Oughtred in the 17th century. This means that older cultures didn't have the same system we use today.

That said, according to this source,

The convention that multiplication precedes addition and subtraction was in use in the earliest books employing symbolic algebra in the 16th century. The convention that exponentiation precedes multiplication was used in the earliest books in which exponents appeared.

The debate about the order of multiplication/division came later, although given that the two operations are inverses of each other, it is not as important.

HDE 226868
  • 8,453
  • 4
  • 35
  • 66
  • 1
    Is a little hard to believe that basic operations are introduced only a few hundred years ago. Before that how people wrote down an equation like 1+2x3=7? (sorry for off-topic) – Lai Yu-Hsuan Oct 19 '15 at 06:14
  • 3
    @LaiYu-Hsuan - With words. Lots and lots of words. – David Hammen Oct 19 '15 at 12:37
  • @LaiYu-Hsuan As David said, word problems were common. Some other alternate notations were used, but there weren't operators as we know them. – HDE 226868 Oct 19 '15 at 15:31
  • By @DavidHammen 's link, there actually was operator precedence in that notation! Though × was written as in, it was prior to + and - by the time, just like x nowadays. So the concept of operator precedence actually appeared before × and ÷, didn't it? – Lai Yu-Hsuan Oct 19 '15 at 20:44
  • @LaiYu-Hsuan That link is one of the "books employing symbolic algebra" I mentioned in my answer. Today's symbols were in use at the time; Viète just used different notation. – HDE 226868 Oct 19 '15 at 21:47
  • Yeah I got what you said. I'm just curious about how people wrote equations without operation precedence. I know today we can just use a lot of parenthese or use post-order, but how did people do before 15th century? Anyway it's beyond the original question and I'll accept your answer.(But I'll be grateful if someone answers this too :p) – Lai Yu-Hsuan Oct 20 '15 at 08:51
  • 1
    @LaiYu-Hsuan - please, note that David's Wiki link is to a modern "translation" of Viete's book: the original text (page 7) reads : "Proponatur $B$ in $A$ quadratur, plus $D$ plano in $A$, aequari $Z$ solido" i.e. $BA^2 + D^p = Z^s$. – Mauro ALLEGRANZA Oct 20 '15 at 20:09
  • I think that there were nor "precedence rules"; formulae were read "as written" : thus $(1+2) \times 3$ would be (I suppose) : "$1$ plus $2$ in $3$" while $1+(2 \times 3)$ would be : "$3$ in $2$ plus $1$". – Mauro ALLEGRANZA Oct 20 '15 at 20:15
  • @MauroALLEGRANZA Thanks for the link to original book. Now it's pretty clear(or obscure...) for me. – Lai Yu-Hsuan Oct 21 '15 at 07:41
6

Supplement to HDE's answer.

A problem sent from Ludovico Ferrari to Tartaglia in 1547 :

Find me two numbers such that when they are added together, they make as much as the cube of the lesser added to the product of its triple with the square of the greater; and the cube of the greater added to its triple times the square of the lesser makes $64$ more than the sum of these two numbers.

[i.e. Find $a, b$ such that

$a + b = b^3 + 3ba^2$ and

<p>$a^3 + 3ab^2 = 64 + a + b$ (from : John Fauvel &amp; Jeremy Gray (editors), <a href="https://books.google.it/books?id=kFwPAQAAMAAJ" rel="noreferrer">The History of Mathematics : A Reader</a> (1987), page 257).] </p>

These were among the "leading" algebraist of the Reanaissance; it is clear that, until the modern algebraic symbolsim were developed (some millenia after ancient Egyptians and Babylonians) the issue of the convention about "operators precedence" was quite meaningless.

Mauro ALLEGRANZA
  • 14,569
  • 1
  • 36
  • 50