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.
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:
Illustration created by the author
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):
Math illustrated by the author
On the other hand, Wolfram Alpha and Google treat a^b^c as follows (ALT-1):
Math illustrated by the author
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:
Math illustrated by the author
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:
Math illustrated by the author
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.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-advertisement
1 year
Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent
1 year
Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Cookie
Duration
Description
_gat
1 minute
This cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duration
Description
__gads
1 year 24 days
The __gads cookie, set by Google, is stored under DoubleClick domain and tracks the number of times users see an advert, measures the success of the campaign and calculates its revenue. This cookie can only be read from the domain they are set on and will not track any data while browsing through other sites.
_ga
2 years
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_R5WSNS3HKS
2 years
This cookie is installed by Google Analytics.
_gat_gtag_UA_131795354_1
1 minute
Set by Google to distinguish users.
_gid
1 day
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
CONSENT
2 years
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duration
Description
IDE
1 year 24 days
Google DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile.
test_cookie
15 minutes
The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE
5 months 27 days
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSC
session
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devices
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-id
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Comments