# What is the reason behind the current Order of Operations? (PEMDAS)

After reading through a few other questions I was just asking myself: How was the Order of Operations defined, and why is it this specific order and not a different one?

Most of us know things like multiplication/division before addition/subtraction, parentheses first, etc - but what's the actual reason behind it? I'm probably biased by following those rules since childhood, so I can't really think of any other way.

2 + 2 x 2 = 6 and not 8

But if the order would be changed, let's say to "addition/subtraction before multiplication/division" would that order still work if we assume that mathematics would build up on it? Or is there some strange mathematical problem if we would be using a different order?

Of course, parentheses have a grouping function so they should always come first - I'm mainly talking about the exponents, multiplication/division, addition/subtraction (and maybe other operations left out).

• – Micah Aug 5 '15 at 15:45
• Exponents distribute over multiplication/division. Multiplication/division distributes over addition/subtraction. – Akiva Weinberger Aug 5 '15 at 21:47

As Zach Stone pointed out, the order of operations is just a convention, and if you choose to change the order, all that would happen is you would need to use parentheses in different places. Everything would work out fine as long as you made the correct adjustments. That being said, there is a reason for the convention. In some sense multiplication is just repeated addition. Furthermore exponentiation is just repeated multiplication(as long as we restrict ourselves to integers) therefore it makes sense to first turn all exponents into multiplication, then turn all multiplication into addition, and then compute the addition problem. Thus, at least as far as the integers are concerned, there is a natural ordering of the operations based on their definition. It gets more complicated when you start dealing with all real numbers, but the order is inherited from integer arithmetic.

• I am far from convinced that it is only a convention. One could use a different convention, and one can argue that some are in some objective sense better than others. – Michael Hardy Jan 17 '16 at 16:24
• @MichaelHardy when I say that it is a convention I don't mean to say that it is arbitrarily chosen, just that there are no WFF's expressible with one order that aren't expressible with another order(as long as parentheses takes precedence). There are plenty of conventions that may be better than the alternatives, such as the convention in English to write left-to-right, you could write the other way and still express anything you wanted, but since the majority of people are right-handed left-to-right makes more sense so more people aren't continually dragging their hand over their writing. – Sean English Jan 17 '16 at 17:46
• @MichaelHardy If you are knit-picking at my use of the word "just", then I would say that your idea that one convention will be objectively better is false, as the different orderings each have strengths and weaknesses. For example, PEASMD is extremely nice in a sense if you are dealing with polynomials over an algebraically closed field since you can express all polynomials in terms of their roots without parentheses. This is an advantage that PEMDAS doesn't have, so we cannot say PEMDAS>PEASMD. Therefore, since orders will not usually be comparable, it really is "just" a convention. – Sean English Jan 17 '16 at 21:52
• @MichaelHardy yes, so we need choose one. Since they aren't absolutely comparable, it is a matter of convention. – Sean English Jan 18 '16 at 1:43
• @SeanEnglish Took me a while to understand your point about PEASMD, because I didn't notice you said "in terms of their roots" rather than "in terms of their coefficients". For future readers' benefit: in PEASMD, $(x - a)(x - b)(x - c) \dots = x-a \times x-b \times x-c \dots$. If we modify the PEMDAS convention that multiplication is implicit for PEASMD to make addition implicit (since it has higher precedence than multiplication), we could even have $-ax \times -bx \times -cx \dots$. – Kyle Strand Oct 28 '16 at 19:00

Let's pretend multiplication came after addition. Try writing this without parentheses: $$(a\times b)+c$$ You'll find this very hard. With the current order of operations, we can almost always get rid of parentheses, by using the distributivity laws.

In fact, distributivity is what determines the order of operations. Exponents distribute over multiplication (i.e. $(a\times b)^c=a^c\times b^c$), so exponents come before multiplication. Multiplication distributes over addition (i.e. $(a+b)\times c=a\times c+b\times c$), so multiplication comes first. With PEMDAS, we can get rid of parentheses using distributivity. With a different order ("PEASMD"?), we can't.

In the minds of men and demons alike, multiplication is a more important operation than addition. Also, humans developed algebraic notation from their main language, which was Latin when I was born but is now English.

I still remember when Lincoln gave the Gettysburg address. "Fourscore and seven years ago..." That's $4 \times 20 + 7$ years. In German he might have said "Sieben und achtzig Jahre find verfloffen, feit unfere Väter auf diesem Continent einer neue Nation..." That's $7 + 4 \times 20$ years. Dozens, scores, hundreds, grosses, that's how you address a lot of integers, and then you adjust with little additions or subtractions.

A lot of this is just commonsense. But it was the development of computers that forced humans to codify a lot of this commonsense. Whereas a human understands what is meant by $$\prod_{n = 1}^\infty 1 - \frac{(-1)^n}{\phi^{2n}}$$ a computer needs to be given this as $$\prod_{n = 1}^\infty \left(1 - \frac{(-1)^n}{\phi^{2n}}\right).$$

Look into almost any book about a computer programming language, or even a scripting language like Javascript, and one of the very first few things you will see will invariably be a table of operator precedence. A computer, in its glorious stupidity, needs to be told in what order to do operations.

• Technically "sieben und achtzig" would be $7 + 8 \times 10$, but that would be a silly reason to downvote this answer. – Robert Soupe Aug 6 '15 at 0:13

Polynomials are important in their own right, regardless of notation. We have settled on a notation that makes them easy to write. We 'could' just use parenthesis between every operation, but that would be terrible. It's just a convention to simplify reading and writing. Changing the convention wouldn't break anything, we'd just need a lot of parenthesis to express what we want.

One place where polynomials occur organically is in field extensions. One could actually do quite a bit of Galois theory without ever explicitly writing down a polynomial. Similarly, polynomials occur organically in linear algebra (one can use tensor products to abstract abstract away things like characteristic polynomials). It would be harder, but equally powerful. But this helps to justify why we care about polynomials and why we might want to write them down.

• You can write polynomials without parentheses if you use the other order — they just wind up being written in terms of their roots instead of their coefficients. I think in order for this answer to be complete you need to present an argument for why "polynomials written in terms of their coefficients" is a more natural concept than "polynomials written in terms of their roots", not just why polynomials are a natural concept in general... – Micah Aug 5 '15 at 16:12
• I want to write my fifth degree integer coefficient polynomials explicitly, regardless of whether the roots are algebraic. – Zach Stone Aug 5 '15 at 16:16
• @zach stone. Aren't the roots of your integer coefficient polynomial always algebraic... By definition? – Sean English Aug 5 '15 at 18:07
• Yeah, I mean radicals. Your right. I want to be able to write them explicitly with radicals. – Zach Stone Aug 5 '15 at 18:09
• @zach stone, yes, this is a good reason to express polynomials in terms of their coefficients rather than their roots as not all polynomials with integer coefficients would be easily(aka able to use nothing more powerful than a radical) expressible in this form. Granted, if we expressed polynomials in terms of their roots, would we care about polynomials having integer coefficients? – Sean English Aug 5 '15 at 18:32

This is really a linguistic question, so the answer is a typical linguistic answer: the order of operations is as it is because it made communication more efficient.

We change the format of our notation to suit our needs. In the case of operator orders, it was generally found that formulae were more readable with the order of operations (likely due to the reduction in number of grouping symbols).

Consider the equation for motion with a constant acceleration $x = 1/2at^2 + vt + x_0$ If we did not have some order of operations similar to today's rules we'd have to write $x = (1/2a(t^2)) + (vt) + x_0$ Could we write it that way? Sure, but it's harder.

Over the years, mathematicians found the current order of operations to be extremely convenient, so they stick to it.

This fuzzy process is also the explanation for the famous brain teaser $6/2(3) = ?$. Some believe this should equal 9 because it's the same as $6 / 2 \cdot 3$. Others believe it should equal 1 because the multiplication by parentheses binds "tighter" than normal division: $\frac{6}{2\cdot3}$. They have some leg to stand on because most of us agree that $6/xy == \frac{6}{xy}$, so its not clear which way this should go. The real answer is that this is a linguistic ambiguity which exists because it hasn't been important enough for the greater body of mathematicians to agree upon it. If it ever actually became important, we'd decide one way or another.

PEMDAS is outdated and we should never rely on it. Always use () to remove all ambiguity if you are the person writing the equation or expression.

Even though there is a fairly good reason for the current convention, there is no longer any really any good to reason to rely on the reader to remember it and correctly interpret an equation or expression using it. The only reason to write x = y + z * w instead of x = y + (z * w) is to save 2 characters widths of space or 2 bytes of memory in a computer. When everything was on paper this was a reasonable way to save space in texts and therefore money by reducing paper and printing costs. Later, when computers had tiny memory capacity it also made some sense. I would claim that any time saved in typing or writing the extra characters would be more than offset by mistakes and the extra time spent to decipher it without the (). Currently, most things are on the web and we have plenty of computer memory so there is no longer an excuse to introduce any ambiguity by omitting ().

The fact that there are many pages on the web regarding the PEMDAS convention is evidence that many people find it confusing and it often leads to unnecessary mistakes. Mistakes that could be avoided just by typing a few () to avoid any ambiguity and confusion.

Ambiguity should always be avoided when possible, especially in mathematics and computer code.

When writing computer code it is very important to include (). The compiler/interpreter that executes the code will always get the order of operations right but the person writing the code or the next person editing it will sometimes make mistakes. Many extremely hard to find and fix bugs could be avoided by typing a few ().

Though a lot of people say (PEMDAS) is only a convention, I like to think the following: (Multiplication & Division) are succinct forms of representing (Additions & Subtractions), so doing (MD) before (AS) puts everything in the same kind of operation: i.e. (AS). Likewise exponentiation are forms of representing (Multiplication and Division) at least for integers exponents...and therefore (E) can be converted to (MD), which can by its turn be converted to (AS). Parenthesis is on the other hand a way of explicitly prioritizing an operation, so it should be well...prioritized.