Order of operations or operator precedence is a fundamental mathematical concept that school kids typically learn in lower grade school. During my school years, I was taught this concept using the acronym: BODMAS, which stands for Brackets, Order (of operations), Division, Multiplication, Addition, and Subtraction.
Under the BODMAS rule that I was taught, you solve math problems by executing math operators in decreasing order of precedence from left to right.
So, in any arbitrary expression, the contents of brackets/parentheses would need to be resolved before all other operators, explicit multiplication operations get precedence over explicit addition operations, etc. Here is an example of this rule in action:
(5 * 2) + 2 = (10) + 2 = 12
I solved many such practice problems and mastered the BODMAS rule in school. However, when I eventually started applying the rule to solve real-life problems, I quickly realized that what I was taught was wrong. So, here we are. This essay aims to clarify some of the most common misconceptions about order of operations.
We will start by covering a few of the most prominent acronym/mnemonic rules that exist (BODMAS just happens to be one of them). Then, we will cover why such rules are necessary in the first place. Following this, we will clarify the actual rules that these acronyms/mnemonics are trying to compress. Finally, we will also cover some of the special cases and edge cases when it comes to applying order of operations. Let us begin.
This essay is supported by Generatebg
Acronym/Mnemonic Rules for Order of Operations
We have vaguely covered how BODMAS works. BODMAS is a system that used to be prominent in the United Kingdom, South-East Asia, Australia, and a few other English-speaking countries. However, over the years, it seems to have gone out of fashion (as far as I was able to investigate).
In the United States and France, the acronym PEMDAS happens to be in vogue. It stands for Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction. This rule is often remembered by children using the following mnemonic:
“Please Excuse My Dear Aunt Sally.”
In Canada and New Zealand, BEDMAS is all the rage. You get no prizes for guessing what it stands for: Brackets, Exponents, Division, Multiplication, Addition, and Subtraction.
If you were perceptive, you would have noticed that between BODMAS/BEDMAS and PEMDAS, multiplication and division have switched places. We will eventually cover this later. But for now, let us try and understand why we need such rules for executing mathematical operations.
Why Do We Need Order of Operations?
As I was a child, I never really understood why we need such “rules”. I found rules boring and unnecessary in general. So, it was natural for me to question the validity of such rules. Are we making our lives more complicated with such rules instead of just doing math as we please?
Is Mathematics a Language?
To answer this question, it helps if you imagine that mathematics is a language (strictly only in this specific context). When it comes to languages, ALL of them feature some sort of structure: grammar, spelling, phonetics, etc. So, why do languages need such structure?
That’s simple: we need structure in language so that when we communicate something to someone, that someone understands exactly what we intended for them to understand. In other words, structure in language tries to avoid misunderstanding (well, it “tries”).
“Hang on a second! That makes sense for human languages. But how on Earth am I supposed to imagine mathematics as a language? Is it a language for robots?”
If your mind is rumbling with thoughts along these lines, let me help you out. Do you remember those complex word problems from early school math classes (I hated them too)? Here is an illustration as a reminder:
Jack has 25670 mangoes.
Judy has 50% more mangoes than Jack.
If Judy gives 25% of her mangoes to Jack, what is orbital velocity of Jupiter around the sun?
Just kidding; how many mangoes do Jack and Judy have left respectively?
You see, mathematicians don’t really care about Jack or Judy or mangoes (be honest; do you?). They prefer to handle problems in a more abstract sense. Actually, almost no one wants to read twisted word problems.
This is the reason why mathematical symbolic notion exists (+, -, *, /, ^, etc.). And any information that is expressed symbolically COMPRISES a language.
Why the Rules?
If I write a bunch of symbols down, I would like for the reader to understand the meaning that I intended for them to understand. Structure helps this cause. In other words, ‘order of operations’ is analogous to the grammatical rules of a language.
With my deep interest in languages and mathematics, I could keep going on. But this time, I’ll leave some room for my buddy Avi Kotzer to dive into this topic with his passion for exploring languages. In the meantime, let’s get back to the perceiving order of operations as grammatical rules.
The rules themselves might be arbitrary, but as long as ALL of us agree on the same thing, we will be communicating and understanding on the same terms without any misunderstanding (ideally).
If that makes sense to you, then you also understand why rules like PEMDAS exist. But if such rules already exist, what is the issue here? What is the purpose of this essay? Let us try and answer those questions next.
Common Misconceptions about Order of Operations
There is actually no issue with the rules concerning order of operations. The issue stems from mistakes in how these rules are taught and/or how they are understood. In my case, I was just taught the BODMAS rule wrong back at school.
To illustrate the mistake, consider the following example:
Solve: 10 — 5 + 2
If I applied BODMAS the way I was originally taught, addition comes before subtraction. So, the solution would be:
10 — 7 = 3
But if you typed the expression into a (sophisticated) calculator, you would get the following result:
10 — 5 + 2 = 7
Needless to say, the calculator’s answer is actually what we all agree is correct! This error occurs because of a common misunderstanding that each operator in acronym-rules of order such as BODMAS/PEMDAS etc., occurs from left to right in decreasing order of precedence. This is simply not the case. The actual order of operations that these acronyms/mnemonics try to convey are as follows:
1. Parentheses / Brackets
2. Exponents (including roots)
3. Multiplication and Division (same order)
4. Addition and Subtraction (same order)
If this true, the above example (10–5 + 2) involves two operations of the same order. How do we know which operation to execute first? Well, when it comes to operations of the same order, the mathematical world (and the computer/calculator world) has agreed that we execute them from LEFT to RIGHT.
The result from the calculator now makes sense. If you wish to test this, feel free to play around with your (sophisticated!) calculator. A scientific calculator would be ideal for this purpose. Furthermore, it becomes clear that switching the order of ‘M-Multiplication’ and ‘D-Division’ between BODMAS and PEMDAS does not alter the rules either.
However, I have to say that even with the order of operations, we still have special cases and edge cases that cause divided approaches even in the computer/calculator world! Let us go ahead and cover a few of these.
Edge Cases and Complications with Order of Operations
One prominent edge case with order of operations occurs with exponentiation.
Order of Operations for Serial Exponentiation
Consider a situation where you raise the exponent of a base to another exponent (serial exponentiation). Such an expression features just one operator (exponentiation) — so there is only one order of precedence involved. It can be interpreted in two ways as illustrated below:
In such a case, the convention says that the left-hand side option (ALT-1) is the way to go. This is partly due to the fact that ALT-2 resolves to a form that doesn’t require parentheses anyway.
Just when you think that things are straightforward, there is a plot-twist waiting for you. When we use a caret (^) or upward arrow (↑) to denote an exponent (usually done in programming), the computer world goes back to the dark ages of chaos and confusion.
Microsoft Excel and MATLAB treat a^b^c as follows (ALT-2):
On the other hand, Wolfram Alpha and Google treat a^b^c as follows (ALT-1):
As you can see, these two approaches lead to completely different results. So, pick your pill. And don’t shoot the messenger!
Since you have not shot the messenger yet, I have more NEWS to share!
Order of Operations for the Unary Minus
The unary minus is nothing but the negative sign that indicates that a number is a negative number. To get a grasp of how this operator differs from the subtraction operation’s minus sign (and insights into other fundamental operators in math), check out my essay on how why negative times negative is really positive.
Coming back to our edge case, consider the following expression:
-5² = ??
In mathematical literature, this expression is often interpreted as follows:
-5² = -(5²) = -25
However, many calculators (Microsoft Excel, for example) solve this expression as follows:
-5² = (-5)² = 25
Again, in such cases, be wary of which approach you intend to use and which approach is being implemented/understood. Here’s one last edge case:
Order of Operations for Implied Multiplication
We now arrive at the question from the title image:
In academic literature, it is sometimes the case that multiplication expressed as a juxtaposition (without the explicit multiplication sign) is given higher precedence as compared to division. For example:
3 ÷ 5a = 3 ÷ (5a), and not (3 ÷ 5)a
This approach leads to ambiguity when compared to the PEMDAS/BODMAS rules that assert equality of precedence between division and multiplication. This ambiguity becomes clear when we use the two approaches to solve the problem from the title image:
In this case, my personal preference is to stick with PEMDAS (ALT-2). Your typical scientific calculator would agree as well. But as you can imagine, there is a clear division on what is correct in this edge case.
Why Does Ambiguity Occur with Implied Multiplication?
Going back to the analogy of treating mathematics as a language, this edge case is akin to writing a logically ambiguous sentence such as the following:
“I caught the dog with the rope.”
When you ponder upon the meaning of this sentence, did I actually catch the dog with the help of the rope or did I catch the dog in possession of the rope? It is unclear; it needs clarification. Similarly, the problem from the title image is a badly written problem that leads to ambiguous division of interpretation.
As a result, such problems often go viral on the internet. But when it comes to real-world applications, just be responsible and use appropriate parentheses/brackets wherever necessary. There is no real incentive for you to test your intended recipient’s PEMDAS-skills.
Final Remarks
Ifthe BODMAS/PEMDAS rules are clear, why was I taught a wrong approach back in school. One’s natural inclination is to blame the skill level of grade school math/computer science teachers. But I think there is an even more subtle issue going on here.
The abstract rules for order of operations are complex and involve numerous steps. Acronyms such as BODMAS are compression algorithms that help the human brain retain more complex information (such as the rules of order) more easily. It is easier to remember BODMAS or the mnemonic “Please Excuse My Dear Aunt Sally” than the individual operations involved or their order of precedence.
While these compression algorithms are effective, they come at the cost of potential compression losses. Potentially crucial information could get lost when compressing information. I believe this is (at least) partly to blame for the common misconceptions concerning the rules for order of operations.
When it comes to the edge cases, firstly, it helps a great deal to be aware of them. Secondly, don’t be THAT person who thinks he/she is so clever that parentheses/brackets are redundant in his/her expressions.
Use ample parentheses/brackets wherever possible. Even if they do indeed convey redundant information, remember that redundancy in language helps avoid misunderstanding!
If you’d like to get notified when interesting content gets published here, consider subscribing.
Further reading that might interest you: How To Really Understand The Mathematics of Language?, Why Exactly Is Zero Factorial Equal To One? and What Really Happens When You Divide Zero By Zero?
If you would like to support me as an author, consider contributing on Patreon.
Comments