Having looked at what the order of operations convention *means*, another common question is, *why* is it what it is? We’ll look at some basic ideas here, focusing on why we need a convention at all, and why the one we have makes sense; then next time we’ll dig in a little deeper, examining some specific reasons.

## It’s a convention …

First, a basic question from 1996:

Why does PEMDAS work?

I am having trouble with a few problems that involve PEMDAS (Parentheses, Exponents, Multiplication, Divison, Addition, Subtraction). The real question I have is why does this order of operations really work?

This question is a little misleading; what does it mean to say the order of operations “works”? Doctor Ceeks replied, focusing on that issue:

When you ask "why does this order of operations really work?", you are asking something which suggests a slight misunderstanding about math. The order of operations in which one is to interpret a mathematical expression such as "2+3 X 5" is aconvention. This means that a long time ago, people just decided that the order in which operations should be performed should be such and so.It has nothing to do with magic or logic.It's just that some people decided to adopt a way, and it has stuck ever since. It just makes communication a lot easier.

This is an overstatement that I will correct below.

It's just like asking, "why is it that when I say 'cow', people tend to conjure up an image of a beast in a field, possibly with spots?" Well, it's because a long time ago, someone decided to call that beast a cow. Now, everyone who speaks English knows this and so if you want to make someone think of the big beast, you just have to say "cow" to them...how efficient! It has nothing to do with the poor little grass eating creature...it just has to do withwhat people have agreed upon to make communication with each other a little easier. So the answer to your question is that it works because you're just learning how to interpret math formulas the way people have long decided to interpret them.

Now, if you're having trouble learning the order of operations, then you have to remember that you're not having a problem with mathematics (unless you're getting wrong answers because you're adding incorrectly). What you're having trouble with is learning a convention,like learning the grammar of a foreign language. Because it's just a convention, learning it is just a matter of practice, practice, practice. Start slowly and carefully. Eventually you'll have it memorized.

It’s true that the grammar of any language just has to be learned, even when some bits can be explained. But, as we’ll be seeing, knowing some of the reasons can make the rules a little more memorable, and help us accept them.

But the bottom line here is that the reason the order of operations “works” is simply that when the people who are reading follow the same grammatical rules as the people who are writing, communication happens.

## … but it isn’t *just* a convention!

In 2015 a reader wrote (unarchived) to comment on Doctor Ceeks’ answer:

On the information you posted about PEMDAS you said it was an order agreed upon a long time ago and that there was no logic behind it. That is not correct. PEMDAS works because of logic. ...

I am not saying you have to go into that much detail but I don't think you should post blatantly incorrect information either.

I replied, after pointing out that he had found just one of many answers on the site:

It's true that this is just a convention, in the sense that any language's rules are convention, not something provably correct or incorrect. Butthat doesn't mean that there is NO reason behind it, and many other answers on the site correct that impression.

I gave links to several of the answers I’ve quoted in this series, and concluded:

So you're right thatthere IS logic behind the rules; but it is nevertheless true that the rules are not the ONLY rules that could be used, and thatlogic can't PROVE that the rules are "correct". What logic does is to give us a reason for choosing one convention over another. (And in fact, the rules we've chosen for algebra are not necessarily the best for other contexts, as demonstrated by reverse-polish calculators.)

We’ll see more of this as we continue …

## It could be otherwise

Another discussion from 1995 had elaborated on the fact that the convention we follow is not the only way it could be done. Forman asked,

Order of Operations

What is the reason for the order of operations in a math equation? Is itjust conventionto do multiplication and division before addition and subtraction or is there adeeper reasonfor this. If there is a deeper reason, and I suspect there is, please include in your answer parentheses and exponents.

Doctor Ken answered, first emphasizing that it *is* a convention, and then looking beyond that:

Well, the concept of "order of operations" is really one that'snot inherent to the structure of mathematics, but rather to mathematical notation. What I mean by that is that order of operations refers to which operations should be performed in what order, but it doesn't actually dictate anything in (nor is it dictated by) the operations themselves. So in a sense, it'sjust convention.

What if we chose a different convention? Well, there are at least three kinds of calculators that *do* use different conventions:

So if that's true, we should be able to use different "orders of operations" and come up with a perfectly consistent mathematical system. And in fact, we can. Here's an example of the same expression being expressed in three different notation systems, resulting in three different orders of operation. 5 + 7 x (3-2) 3 - 2 x 7 + 5 5 7 3 2 - x + The first expression is the standard one that most people use when writing things down. You do the 3-2 first, then multiply by 7, then add 5. The second expression is what you would key into a normal calculator (the kind you might find in a cereal box or something, not some fancy one). You do the subtraction first, then when you hit the times key it takes that answer as input to the next operation, and so on. The third expression is written in the order in which you'd key it into my Hewlett-Packard fancy calculator. First you give it all the numbers, then you tell it what to do with them. So the operations say "subtract the two preceding numbers, then take the result of that and multiply it by the number preceding it, then take the result and add it to the preceding number."

Each of these (a modern scientific calculator, a basic “four-function” calculator that doesn’t have parentheses, like the Windows Calculator app in Standard mode, and a Reverse Polish calculator) was designed for a different reason (respectively, to match what math classes teach, to keep it easy to design, and to match how the underlying math really works).

Then there are others we could try (though they may not be worth it):

Also, we could invent our own order of operations in which we adding takes a higher precedence than multiplying. So if we wanted to convert (3+4) x (7-9) x 3 + 6 to the new notation, we'd write it as (3 + 4 x 7 - 9 x 3) + 6. So the notation tells you which operations to do first, not the underlying mathematics. Of course,there are some pretty good reasons for doing it the normal way: it's much less awkward than the other methods. For instance, how would exponentiation fit into the scheme of the new notation?

We have here a hint that the standard order, though ultimately just a choice, actually has some reason behind it, as we’ll see.

## We need a standard …

The next question, from 2001, dealt with why we need any rules at all, answers to which have been hinted at above:

Why Rules?

Why is there a need to have rules for order of operations?

I replied, starting with essentials:

Why are there rules for anything? Mostly theyallow people to work and communicate together. The order of operations is like thegrammarof a language. It lets us know how numbers and operations fit together. For example, when we say "the cat ate the rat," grammar tells us that "cat" is the subject (the eater) and "rat" is the object (the eaten). Without an understanding of how word order affects the meaning of the sentence, we couldn't tell which was which.

If you haven’t learned another language, you may not know how much languages can vary; one of those ways is word order (which is more important in English than in many other languages). The point here is that any language has both *words*, which have *meaning*, and some sort of *grammar* for connecting them, which determines their *relationship*.

Similarly, given an expression like 2 + 3 * 5 (I'm using "*" for multiplication), we could take it either as "add 2 and 3, then multiply by 5," or as "multiply 3 and 5, then add 2." These would give two different answers: (2 + 3) * 5 = 6 * 5 = 30 2 + (3 * 5) = 2 + 15 = 17

So no matter what you do, you are using some sort of “grammar”, and which one you use affects the meaning of what you write or read.

We have to choose some rule. Among the many rules possible, it has been found thatthe one that works best, which people just naturally seem to have agreed upon, is the one that makes it read like "two and three fives," where we naturally group "three fives" together as one thing, which is added to "two." That is, doing multiplication first fitsour natural sense of how multiplication works, and also works well foralgebra. But even if there's no reason to prefer this rule, some rule had to be chosen.

We’ll be seeing some specific ways in which this order “works best” later. What we mean by “working best” is some combination of *clarity* for communication, *convenience* for writing what we want to write, and *naturalness* (relating both to how our minds work, and to how the math works). Some rules turn out to be arbitrary, so it doesn’t make much difference which way we choose, but it’s impossible to get a consistent and useful “language” without making *some* such choice.

That’s the idea behind the “EMDAS” part. The P is even more natural:

The rule for parentheses is also very simple. If we want to tell everyone to do the addition first, we do it by making sort of a box around that part of the expression that says, "do this first and then treat it as a single number."It would be possible to survive in math with only this rule, by using parentheses around everything; but that would cost too much in ink and in frustration. It's easier to have rules that let us say what we want quickly and concisely. All of this allows us to write an expression and be sure that whoever reads it will take it the way we intended it. And that's what the rules are for.

So we could say the rules are just to make life as simple as possible, given that we want to communicate clearly about math.

For another explanation in terms of language, see

Order of Operation in Contexts

## … and this one fits well

I’ll finish for now with this question, also from 2001, that gave an opportunity to discuss the sense in which the rules are natural:

Explaining Order of Operations How would you explain the order of operations to a 5th or 6th grader who has not yet studied the subject?

I first referred to the Ask Dr. Math FAQ on the subject and the question we just looked at. I continued, starting again with the motivation for the topic, and leading up to reasons for the main choices:

I'm not sure I've ever written up how I would introduce the concept to someone who hasn't seen it before at all, so I'll give it a try. We can start by thinking of a simple calculation we want to have someone work out for us; say, I buy3 items at $5 each, and 4 items at $6 each. How much do I spend? It's easy to describe in words what to do; multiply 3 by 5 and 4 by 6, and add the products. That gives 15 + 24, or39. But rather than do this ourselves, we want to tell someone else what to do, and we want to use symbols rather than words. How do we write this down for him? The natural thing to do is to write 3 * 5 + 4 * 6 (I'm using "*" for the multiplication sign.)

This is, in fact, how we *do* write it. But not everyone will interpret it the way we intended:

Now suppose we give this to someone and tell him to do the calculation, without telling him what it's for. What will he do? He may just type it into a calculator just as he sees it: 3 * 5 = 15; add 4 and we get 19; that times 6 is114. What happened? He didn't do what we wanted him to do, and he got a different answer! And he could do it in several other ways as well, such as 5 + 4 = 9; 3 * 9 * 6 =162. What went wrong is that we haven't saidwhat "grammar" we want our symbolic language to have. We know what all the "words" (numbers and symbols) mean, but you can put them together in different ways. We need rules for the order in which we do the operations we've written down.

The first interpretation is what a basic “four-function” calculator will do. The second is what you’d do if you considered addition more important than multiplication. We’ve seen these before.

### Grouping

Imagine you were creating a math language of your own; how would you decide on your “grammar”? That’s not a bad experiment to try (though without a lot of experience, you might make some bad choices on your first attempt):

At this point, you might want to take some time to think about how you can solve the problem yourself;kids can often devise strategiesthat are very similar to what mathematicians developed among themselves. One way to solve this is toindicate explicitly what orderto do it in, by puttingparenthesesaround parts of our expression that are to be done first: (3 * 5) + (4 * 6) This says exactly what to do, so that it can be done only one way. The parentheses "package" the operations: you have to treat (3 * 5) as a single number, so you can't do anything with it until you have turned it into 15; once you've processed both packages, you have nothing left to do but add 15 and 24.

A child might indicate this grouping by underlining, or by drawing circles around the parts to be done first; the idea is very natural.

That would be a fine solution, but we're lazy. Writing parentheses everywhere would get boring and confusing;we'd like some rules to let us avoid them when we can. Sometimes such rules come naturally; for instance, there's no need for parentheses in 1 + 2 + 3, because the addition (1 + 2) + 3 = 1 + (2 + 3) works out the same regardless of the order. So we can drop parentheses in such cases, where we do a string of additions or multiplications. But some similar cases are not so easy: (3 - 2) - 1 = 1 - 1 = 0 3 - (2 - 1) = 3 - 1 = 2 We can't just drop parentheses in a string of subtractions or divisions.

Some parentheses can be dropped because they don’t make a difference; but others can only be dropped if they can be replaced with a rule. We’d like rules that let us avoid parentheses in the most common situations.

### Sums of products

It turns out that we very often want to do something much like my original example expression, asum of products. So we've agreed on a rule: Do all multiplications before all additions. Because divisions are closely related to multiplication, and subtraction is backward addition, we can expand this rule: Do all multiplications and divisions, and then do all additions and subtractions. This lets us write our expression just the way we did at first, and it will always be interpreted the way we wanted: 3 * 5 + 4 * 6 = 15 + 24 = 39

I’ll be looking more closely at the reasons for these and other rules in the next post.

But what about that string of subtractions? We'd like a rule to let us write 3 - 2 - 1 without confusion. For that, we just agree to do everything from left to right, as if it said, Start with 3, subtract 2, then subtract 1. So now the rule is Do all multiplications and divisions (left to right, in the order they appear), and then do all additions and subtractions (left to right, in the order they appear).

This makes a very natural ordering that is easy to remember.

Of course, you can still use parentheses to change the order when you want to say something different: 3 * (5 + 4) * 6 = 3 * 9 * 6 = 162 There are other details to be added later, such as exponents; but this is the core of the concept: the multiplication family goes first, and then the addition family cleans up.

So the role of parentheses is to override the usual rules when desired. They give you control, so the rules don’t limit what you can say.

That's how I'd explain this: no "PEMDAS" or arbitrary decrees, just a development of reasonable rules, in the same way kids inventing a game together might agree on rules that satisfy them. Of course, we want to make sure we come up with the accepted rules, and not some new ones, since we have to communicate with others; but it's good to see that it all makes sense, and arises from simple principles.

Many students seem to have learned only a mnemonic like PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction), or BIDMAS (Brackets, Indices, Division, Multiplication, Addition, Subtraction) as some teach it, without understanding what it really means. I like to teach the meaning first, *then* ways to remember it.

Next time, we’ll look at some more specific arguments in favor of the way things are.