Why do we have order of operations in arithmetic?
March 11, 2014 11:49 AM   Subscribe

Why do we have order of operations rules in arithmetic instead of just strictly evaluating expressions from left to right (possibly with parenthesis for grouping if we really wanted to change the order)?
posted by Reverend John to Science & Nature (9 answers total) 3 users marked this as a favorite
Why use parentheses? Those of us of a certain aged learned Reverse Polish Notation.
posted by Oktober at 11:56 AM on March 11, 2014 [6 favorites]

Order of operations was developed to parallel the most "likely" grouping in the absence of parentheses. Obviously, you _can_ use parentheses to explicitly describe any grouping you like, but one of the goals of the development (if a notational convention which developed organically can be said to have "goals") is to minimize the number of parentheses which a typical arithmetic expression would need. And it turns out that, say, adding up products is much more common than multiplying by sums, so making multiplication higher-precedence than addition serves that need.
posted by jackbishop at 12:01 PM on March 11, 2014 [2 favorites]

Strictly evaluating expressions from left to right is an acceptable order of operations in many countries.

This article has a brief mathematical discussion about why the Order of Operations is sometimes very elegant and sometimes very ugly. We don't usually think about the fact that the mathematical expression 7x2 contains within it an assumption about a standard order of operation, but it does.
posted by muddgirl at 12:01 PM on March 11, 2014 [2 favorites]

We have order of operations because math notation was codified before the field of quality assurance existed.
posted by alms at 12:31 PM on March 11, 2014 [2 favorites]

Explicit is better than implicit, and any reduction in ambiguity is preferred. Also, as you work through factoring polynomials, for example, you need to move things around in the equation and it is visually helpful to be able to move things we where they make the most visual sense. For instance, -12x + 4 + 9 x^2 is more commonly written at 9 x^2 - 12 x + 4 so it can be easily factored into (3x-2)^2. I hope this makes sense. After a while, it becomes rote and it is difficult to remember the "aha" moment that locks in the understanding.
posted by bensherman at 12:39 PM on March 11, 2014 [1 favorite]

Every single field I can think of has some sort of shorthand. Many programming languages let you omit syntax or re-arrange statements to make them more compact. Organic chemists don't explicitly indicate carbon atoms because they're everywhere. Court reporters use their own special shorthand "language" to make sure they can keep up with the dialogue. Economists and politicians always seem to be talking in TLA (three letter acronyms). Ancient scribes invented ligatures because some letters always appeared in sequence (a la & = et = and). And mathematicians (and sciences that heavily use mathematics) all have their shorthand, of which order-of-operations is one.

Why? Because things like parentheses, while important to evaluating an expression, aren't important to seeing what the expression means. They are a lot of noise that can be eliminated (thanks to order-of-operations) so that the important parts, the meat of the equation, stand out.

It's a balancing act. If we had to use "()" everywhere then 50% of our equations would just be those characters. That's not useful information if we can lay down some basic implicit rules about how things are evaluated.
posted by sbutler at 2:51 PM on March 11, 2014 [4 favorites]

I think part of it is that addition and multiplication are commutative. That is, x+y = y+x and xy = yx. That's a symmetry that's intrinsic to math, and it seems dull-witted to break that symmetry by going strictly left to right. That would mean that 2+(3×4) needs parentheses but (3×4)+2 doesn't.
posted by aws17576 at 12:51 AM on March 12, 2014 [3 favorites]

Having an agreed operator priority order removes ambiguity, saves excessive use of parentheses and ensures that everyone following the rules gets the same result. It is only a convention, so that 1+2x3 could either be 7 or 9, the convention is that it is 7. But really as Oktober said, just use RPN.
posted by epo at 2:44 AM on March 12, 2014

It's worth thinking about the order of operations rule as an agreement, so that everyone doing the same arithmetic problem is guaranteed to get the same answer. Without it, some people would calculate 2 + 3 * 5 as 30 and others would get 17.
posted by wittgenstein at 8:47 AM on March 12, 2014

« Older coworker's dog bit my dog, what to say?   |   Keeping relationship with my dad, minus one of his... Newer »
This thread is closed to new comments.