18
$\begingroup$

I understand the order of operations, but why are they ordered the way they're ordered? Is there a particular reason why multiplication should have a higher precedence than subtraction, other than to prevent ambiguity?

Edit: I'm a curious software developer that's relatively lousy at math. A simple explanation that your grandma could understand would be very welcome. :-)

  • 0
    Multiplication is just shorthand for addition - so 2 x 3 + 4 is actually 2 + 2 + 2 + 4 (alternatively can be written as 3 + 3 + 4). This leaves no ambiguity as to which operation is to be performed first.2016-03-21

10 Answers 10

21

The precedence rules allow efficient representation of polynomial expressions in a concise normal expanded form. If you reversed the precedence of multiplication then the notation would be more efficient for factored polynomial expressions. But, generally, polynomial operations are much less efficient in factored form (compare, e.g. equality testing and addition).

The reason that polynomial rings are ubiquitous is their universality (they are free $\rm\:R$-algebras). So, for example, any polynomial identity that you prove true in $\rm\:\mathbb Z[x]\:$ will hold true over any ring, e.g. the binomial theorem.

  • 0
    Point well taken Hans. p(x)=+a_0+*a_1x+...*a_n ^xn, a_0a_1x*+ a_2 x2^*+... a_n xn^*+2011-05-29
7

I don't think there is any mathematical reason. The order of operations is only a matter of notation to save some brackets.

Careful: a typical calculator does not have a different order of operations but none at all instead. So

5 - 4*3 on a calculator is actually (5-4)*3 while with our convention for algebra it is 5-(4*3).

Both assumptions are valid, the latter one is just the more common form.

  • 2
    It depends on the calculator whether you get 3 or -7. Microsoft's *calc.exe* will give different answers depending on whether you are using the standard or scientific view.2011-05-25
6

I would say depending on which one is distributive with respect to which other one.

Without parenthesis, you just assume that the expression is expanded as much as possible.

5

I am sorry that I am over a year late in reading these posts. It is a great pitty that so few people understand that order of operations is derived from the basic rules of mathematics. Let us look at a simple example: $2 + 3 \times 4$. Because multiplication is by definition repeated addition, $3 \times 4$ is the same as $4 + 4 + 4$. So I could rewrite $2 + 3 \times 4$ as $2 + 4 + 4 + 4$. Then I just add left to right and get $14$. That is the same as using the natural order of operations and performing the multiplication first. $2 + 3 \times 4 = 2 + 12 = 14$. Because exponents are simply repeated multiplication, they are performed before multiplication. Parentheses are used to form groupings that are to be performed before other operations. Thus $2(3+4)$ indicates that $3+4$ must be done before multiplying by $2$. Thus the order: parentheses first, exponents second, mutiplication and division third, and save the lowest level operations of addition and subtraction for last.

  • 0
    This was the answer I believe is most relevant... Multiplication comes before additions because multiplication is a shorthand notation for a bunch of additions.2018-12-01
3

Some Background: Why have an order of operations at all?

The order of operations exists:

  1. To be able to write down the same expression in different ways.
  2. So that everyone will (still) arrive at the same answer.

The same calculation can be written in different ways: 1+2*2, or 2*2+1, but it should always give the same answer. The problem is that the answer will depend on how you interpret it, and that will influence how you solve it. If you just go left-to-right and joining two and two numbers, you will get (1+2)*2 = 3*2 = 6 in the first case and (2*2)+1 = 4+1 = 5 in the second case.

So mathematicians have agreed on a standard way of interpreting the expression (what parts belong together and not), independently of how it is written down. This standard way is called "The order of operations", which says you should solve an equation in this order:

  1. Parenthesis
  2. Exponentials
  3. Multiplication and division
  4. Addition and subtraction

But why are the operations in the order they are in?

The order of operations is ordered the way it is simply by convention (agreement). An author could have used parenthesis for every term of an expression, to specify precisely how he intended the expression to be calculated. Instead, a default order was agreed upon, so that one may remove parentheses, and still have people interpret the expressions in the same manner. The default order of operations is arbitrary. The order could have been different, and worked quite as well.[1]

History: "I would say that the rules actually fall into two categories: the natural rules (such as precedence of exponential over multiplicative over additive operations, and the meaning of parentheses), and the artificial rules (left-to-right evaluation, equal precedence for multiplication and division, and so on). The former were present from the beginning of the notation, and probably existed already, though in a somewhat different form, in the geometric and verbal modes of expression that preceded algebraic symbolism. The latter, not having any absolute reason for their acceptance, have had to be gradually agreed upon through usage, and continue to evolve." - http://mathforum.org/library/drmath/view/52582.html

The natural rules arose naturally, and people used it in the same way. Probably because it is intuitive to solve the most grouped terms of the expression first, so you get a bunch of more primitive terms which can then be added together later.

Exponentials are just grouped multiplication: 5^3 = 5*5*5

Multiplication is just grouped addition: 5*3 = 5+5+5

So, exponentials are grouped multiplication which is grouped addition. When you solve exponential terms out all the way, you are just left with a bunch of numbers which are added together.

[1] The important thing is that the author and the reader of an expression has the same interpretation. If you calculated addition before multiplication, then an expression like 5*5+1 would suddenly mean something entirely different, if the author had presupposed multiplication before addition. If the author knew that the reader would interpret and calculate addition before multiplication (if there were no parentheses to explicitly state the order), he would have to write it as (5*5)+1, to force the reader to multiply before adding. And vice versa.

2

If you punch $5-4\times3$ into a (typical) calculator, you'll get $3$, not $-7$, so evidently there are situations where subtraction takes precedence over multiplication. This suggests it's just a convention, and that it could have gone the other way.

  • 0
    @ShreevatsaR: Well, I guess that means that I've mostly dealt with scientific calculators then...2011-05-26
1

There's a clear reason for why there must be some order of operations (to avoid ambiguity), but which order of operations is agreed upon is a mere convention.

1

I think that expression syntax directly comes from the language syntax. In natural language multiplication is often represented without conjunctions as in "three dogs". I think that an explicit operator for multiplication (as the $\times$ sign) is only used for didactic reason to make it clear that an operation is involved. The operator $\times$ becomes $\cdot$ and then disappears when you progress into mathematics. On the other hand addition is represented by conjuctions as in "one apple and two bananas": $a + 2 b$. It is clear that adjectives have higher precedence than conjunction.

This is confirmed by the fact that the order of operations is much less clear when we mix addition and subtraction or multiplication and division. The language, in such cases, becomes ambiguous. So mathematicians need to agree upon a convention.

I would also point out that even mathematicians don't follow a strict rule in operators precedence, there are many cases where common sense comes before any rule. For example anyone would agree with these interpretations: $ \sin xy = \sin(xy) $ while $ \sin x \sin y = (\sin x)(\sin y). $

-1
  1. To illustrate your example with substraction and multiplication, denote them as two variable functions: $S(a,b)=a-b,\ P(a,b)=a\cdot b$. Then to calculate $a-b\cdot c$(without any brackets), we would have $S(a,P(b,c))$. In order to calculate the result, we need to find $P(b,c)$ first.

  2. There are many operations defined with the aid of the simpler ones: multiplication is defined using addition; powers are defined using multiplications. It is then natural to give priority to the elevated operations, since they depend on the simpler ones.

  3. Think practical. In a warehouse there are 2000 bottles of Coca cola, in boxes of 20 pcs. Someone takes out 30 boxes. How many bottles are left? Answer: $2000-30\times 20$. If we calculate $2000-600=1400$ we get the practical result right(we go and count the remaining bottles to see that... ) . If we calculate substraction first we get $1970\times 30>2000$, and we see that something is wrong.

I think the third aspect is the most important, since mathematics is made to help modelling different things we encounter in real life. Not all maths is abstract. If you take the operations and change their priorities, you will get results which do not correspond with reality.

  • 2
    @Matty: I think #2 has some merit, but take it with a grain of salt. Exponentiation has high precedence with respect to the base but not with respect to the exponent; that is, $a\cdot b^c$ means $a\cdot(b^c)$, but $a^{b\cdot c}$ means $a^{(b\cdot c)}$. Also, juxtaposition can stand for many things other than ordinary multiplication (for instance, composition of functions), and yet it always takes precedence over addition. In Boolean algebra, mutliplication is used to denote $\land$ and addition for $\lor$, which are symmetric to each other, yet the same precedence convention applies.2011-05-26