# Category Archives: randomness

## Order of Operations and Facebook

I received this text from my brother: Pam, who created the “Order of Operations” rule? Well, that’s a curious question. Why is he asking? I’d never thought about who “created” these rules. They just kind of made sense to me. Before I did any research, I thought for myself why these rules made sense to me. Here’s my response to my brother.

Suppose I needed to calculate 4 + 3 * 5. Without the order of operations, I would just make each calculation as I come to it. In this case 4 + 3 = 7 and 7 * 5 = 35. But, 4 + 3 * 5 is equivalent to 3 * 5 + 4, right? Because of the commutative property of addition, the order that we add numbers in doesn’t matter – we get the same result either way. So if that’s true that 4 + 3 * 5 = 3 * 5 + 4, then both calculations should give us the same result. But, if we don’t have conventions around this then the second expression, 3 * 5 + 4, would result in 19. Clearly that’s not equivalent to 35.

So why would we choose to multiply first instead of adding? We can think of the expression above (4 + 3 * 5) to mean that I am adding 4 onto 3 bunches of 5. I guess I think that it’s kind of implied that I would want to know what 3 bunches of 5 are before I add 4 onto that number. That’s why we would multiply before we would add.

There is a similar argument to be made with division. Suppose I come across 3 + 1/2. Without our order of operations, we might conclude that this was equivalent to 4/2 (or 2). But isn’t 3 + 1/2 the same as 3 and a half, or 7/2 (which is clearly not the same thing as 2)?

The PEMDAS mnemonic is a little misleading, too. It suggests that multiplication takes precedence over division and that addition takes precedence over subtraction. That’s not true. Multiplication and division are at the same level as are addition and subtraction. For example, if you want to calculate 6 * 3 / 2, you can first calculate 6 / 2 and then multiply that result by 3. Or, you can calculate 6 * 3 and then divide that result by 2. Either way, you end up with a result of 9. You can reason similarly with addition and subtraction.

Personally, I think that the real question is “Who invented parentheses?” I mean, to show grouping by using symbols is just genius. That would change the outcome of the original expression, right? (4 + 3) * 5 is very different from 4 + (3 * 5). At some point, mathematicians agreed that they didn’t need to write the parentheses around 3 * 5 (maybe for the reason that I stated above, maybe not), but that they would need to explicitly group (4 + 3) if that’s what they meant.

Turns out there’s this Facebook post that asks you to calculate 6+1*0+2/2. Some people say the result is 7 and others say it is 1. Which is correct? That’s where the order of operations comes in. And that’s what was behind my brother’s question.