# Proof of why BODMAS (or BIDMAS) works?

In my first full-time teaching post, it is very likely that I'll need to be teaching a small amount of GCSE Mathematics to students retaking it. One thing that has been bugging me is that I can't seem to find any sort of "proof" or explanation of why the BODMAS (PEMDAS, for Americans) rule for doing calculations works. I learned this rule in school, and applying it is second nature. It's obvious to me that multiplication precedes addition, and brackets proceeds powers, via elementary properties of real numbers.

What would be a good way of explaining this rule to students who hadn't seen it before, and does anyone have any understanding-focused ways of explaining why calculations are ordered this way?

• It doesn't really have a reason for working; it is just a convention to resolve ambiguities. (It does make writing polynomials a bit easier.) There are less ambiguous notations available, like Reverse Polish Notation, but they aren't in common use.
May 8, 2016 at 19:24
• As @Adam says, it's a convention so that we could write operations without so many brackets and still have other people understand what we mean. So in that sense it can't be "proved". May 8, 2016 at 20:05
• I think the distinction between conventions and mathematical laws is often blurred in school. How can a student who is taught mathematics instrumentally know that BODMAS is just a convention, while FOIL is a mathematical result that can be proved? May 8, 2016 at 23:25
• @ToddWilcox "Orders" as in "$x^4$ is a fourth-order polynomial".
– R.M.
May 9, 2016 at 15:14
• Its always easy and dandy until you have to explain operator precedence.Take for instance this maths question that went viral in Japan iflscience.com/editors-blog/… May 10, 2016 at 2:30

It's purely a matter of how we choose to define the notation. The main reason for it is that it lets us write polynomial expressions (which are extremely common) without parentheses, e.g., $x^3 + 3x^2 y - 41x + 2z$ rather than $(x^3) + (3(x^2)y) - (41x) + (2z)$.

However, what really matters is that the notation is clear and unambiguous, so expressions like $a/bc$ should be avoided (and replaced with something like $\frac{a}{b} c$ or $\frac{a}{bc}$ depending on what's intended) rather than trying to rigidly adhere to one convention or the other.

Trying to "prove" a notational convention — or treating it as anything more than an agreed-upon way to efficiently communicate meaning — would represent a fundamental misunderstanding of the way mathematical notation works.

• A student who doesn't understand basic arithmetic operations has more pressing issues than not knowing order of operations. Not much point in knowing order of operations for operations you don't understand, is there? May 9, 2016 at 16:47
• Wait, do you mean $(3(x^2))y$ or $3((x^2)y)$ in your second term? :-) May 9, 2016 at 18:36
• @MichaelJoyce Also, a couple of extra parentheses to indicate the order of addition and subtraction would be in order May 9, 2016 at 20:22
• @omegaSQU4RED I've had to face that challenge a few times. The answer is really that most people who are working with equations are working with them at a level where the order of operations proves beneficial, and that at the lower levels you just have to "trust" that it will be a useful detail later. I've found that algebra based physics is the best point to start showing the value of the order of operations, because you see SO many polynomials like 1/2at^2+vt+x that you start to appreciate the value of said groupings. Up until that point, I haven't found many good examples. May 9, 2016 at 20:27
• @omegaSQU4RED On the other hand, it may be a good introduction to students about the difference between things that are simply conventions and things that are objectively provable (given a set of axioms). This is a concept you want them to understand at some point in their education. Why not sooner rather than later? May 10, 2016 at 1:56

Perhaps it is worth pointing out that every programming language defines an operator precedence structure to avoid ambiguities. An example table for C and C++ can be found here. Ambiguities must be avoided in order for the language parser to create the correct compiled (or interpreted) machine code to implement the expression.

For example, the expression $4+3*2$ could be interpreted as either $(4+3)*2=14$ or $4+(3*2)=10$. Operator precedence in most languages follows the mathematics convention of ranking multiplication higher than addition, leading to the second interpretation.

The operator precedence structure goes well beyond arithmetic, dealing with complex expressions such as (in C):

a = b < c ? * p + b * c : 1 << d ()


Here the first * is a unary operator, whereas the second * is a binary operator. (Example from here.)

To build on other answers, you might show how other conventions exist. Use an H.P. calculator for example (postfix), the LISP family of languages (prefix), and the APL language (all right-associative), all of which do not have differing precedence of operators at all, and write expressions in different ways.

Given 4 parallel translations of the same expression, the students may better appreciate that the notation is a communications convention, different from the underlying meaning.

If you think "BODMAS" is a chore to remember, take a look at this chart!

The best way to learn it is not to use a silly nmenonic, but to grasp that the order is a convention adoped because people found it handy in their work. Other answers have pointed out that this comes from polynomials. Just knowing of polynomials you know the convention from that.

Also look how Einstein came up with his own convention which again entails leaving out explicit symbols and groupings and just writing stuff next to each other: in that kind of problem domain, that's a common thing, so the notation can be simplified to that end. Consider this the same idea as the polynomial: in $2x^3$ where are the symbols and grouping notes? And then Direc invented a notation that covers the kind of work he was doing. People will, and continue to, streamline the notation to match the kind of work being done.

I understand this is not a realistic suggestion, but can you avoid "teaching" "PEMDAS" or "BOMDAS" altogether, and teach your students just the math instead? As pretty much everybody already said, this is not actually a rule -- this is a mnemonic device that's supposed to help students remember the actual rules of the order of operations (in the traditional math sense; programming languages and software packages are a whole different story). And then the order of operations is again not as much rules as conventions, intended to simplify notation. The problem I have with "PEMDAS" is that in my experience it does more harm than good. Way too many students follow it literally and actually evaluate 8-2+1 to 5 because "A" in the "PEMDAS" "rule" is before "S".

Of course, this is merely a single example, and not even the worst one, of a much deeper problem when students learn math superficially by rote memorization of rules instead of understanding and internalizing the content.

Disclaimer: as a college math instructor, I'm on the receiving side of what comes out of school education, but I'm not involved in school education.

• I've seen elementary school teachers who actually thought 8-2+1=5 because the A is before the S. Then they would come and tell me that the book had 7 as the answer and was clearly wrong. This is a big problem. May 14, 2016 at 18:40
• +1 Agree so very much. MadMath, PEMDAS: Exterminate With Extreme Prejudice May 15, 2016 at 5:01
• But the order of operations really is just a convention to be memorized. There's nothing (or little) deeper to understand here - it's just the way we have decided to write mathematics. May 15, 2016 at 17:15
• The problem with $8-2+1$ is not understanding that $8-2=8+(-2)$. Mar 6, 2019 at 10:32

It works by avoiding the ambiguity that

2 + 3 x 6

would otherwise have. If we simply said we calculate left to right, we'd have a result of 30. With the priority, multiplication higher, we have agreement the above resolves to 20. There's no more complicated origin than this.

• Note that "if we simply said we calculate left to right", there would also be no ambiguity. We would have agreement the above resolves to 30, always. In the Smalltalk programming language, there are no operators, and thus no operator precedence, everything is simply evaluated left to right (+, *, /, etc. are just legal names for functions exactly like foo or multiply), and there is no problem with ambiguity. The point is that there has to be a rule, what the rule is, is largely irrelevant. May 9, 2016 at 8:46

It is kind of arbitrary which operation goes first, but my guess is that our current system is just a little more concise in most problems. As an example imagine two systems: a system A that is like our current system, multiplication goes before addition and the multiplication sign can be left out and a system B where addition goes first and the addition sign can be left out.

First imagine you want to multiply a bunch of numbers and then add $x$ to it.

In system A it would look like this:

$$a\times b\times c\times d+x=abcd+x$$ and in system B it would look like this: $$(a\times b\times c\times d)+x=(a\times b\times c\times d)x$$ The parentheses need to be added, because otherwise $x$ would be added to $d$ before being multiplied. Clearly system A wins in this example, but look what happens when the numbers are added first and then multiplied by $x$.

System A: $$(a+b+c+d)x$$ System B: $$abcd\times x$$ This time system B wins, so it appears it just depends on the situation. Also note that system B looks quite ugly, but only because we are so used to system A. System A still has a couple of tricks up its sleeve though, due to distributivity the second example can be expanded whereas in system B there is no such thing possible. $$(a+b+c+d)x=ax+bx+cx+dx$$ And lastly polynomials (as mentioned in other answers) just don't work as well in system B.

System A:$$f(x)=ax^2+bx+c$$ System B:$$f(x)=(a\times x^2)(b\times x)c$$

• Distributivity still works fine in both systems. You've only changed the notation, not the operators themselves, so it has to work the same — we're just not used to the alternate notation. May 10, 2016 at 17:13

You can prove certain properties of the operations, such as commutativity and associativity. From that we can identify that there are ambiguities in standard notation that need to be resolved. However, the resolution of those ambiguities could be entirely arbitrary, there is no proof for any particular resolution as it is merely a selection, a convention. It may be worth discussing the reasoning behind the convention, though.

Brackets take highest priority by virtue of enabling overriding of the convention. If they did not take first precedence they would be ineffective.

Exponentiation (ordinals) is next due to being the strongest operator.

Multiplication and division are of the same relative strength, however, multiplication is commutative whereas division is not, so we give multiplication priority.

Addition and subtraction are last in strength, but again we prioritize addition over subtraction due to its commutativity.

With these heuristics in place, we can guess at where other operators might fall in order of precedence, for example roots are the same strength as exponents, whereas a factorial we would prioritize above exponents.

• Addition is not prioritized over subtraction. For example, $1 - 2 + 3$ is interpreted as $(1 - 2) + 3$, not as $1 - (2 + 3)$. Think of this instead as $1 + (-2) + 3$, so only addition is involved and the order of evaluation doesn't matter (by associativity). Likewise for multiplication and division, though there's the subtle ambiguity (mentioned in my answer) that multiplication by juxtaposition is often (but not always) taken to have higher priority than division with a horizontally written operator (such as / or ÷). May 9, 2016 at 17:09
• How do you propose to prove associativity or commutativity of operations? May 10, 2016 at 6:06
• @JessicaB at GCSE level, by example? 2 + 4 = 4 + 2 but 2 - 4 != 4 - 2. (12 * 6) * 3 = 12 * (6 * 3) but (12 / 6) / 3 != 12 / (6 / 3). And so on. Maybe there's a nice formal proof, but they're probably keen to get on with the good stuff :) May 10, 2016 at 10:59
• For nonnegative reals, one can define addition as length of a concatenation of line segments and multiplication as area of a rectangle — this perhaps isn't fully rigorous but is enough to use as a basis for reasoning for most questions at this level — and then commutativity and associativity are easy to see. This can be extended without too much trouble to negative reals as well. May 10, 2016 at 17:10

It is convention, but is it arbitrary?

Let us consider just multiplication and addition.

Suppose we are in a shop and buy 4 tins of beans, 3 loaves of bread, and 2kg of cheese. The beans are £0.50/tin, the bread is £1/loaf, and the cheese £1.50/kg.

So that is $$4\times0.50+3\times1+2\times1.5$$

Or if addition has precedence, or we evaluate left to right, then we need brackets. $$(4\times0.50)+(3\times1)+(2\times1.5)$$

Thus on a simple calculator that evaluates left to right, and has no brackets, or memory feature (as attached to the trolleys at my local supermarket), it is impossible to calculate the sum of you shop (unless you do multiplication as repeated addition, this is ok if you only by a few of any item, and not good for imprecisely cut cheese.)

Additionally I do not believe that there is a use case, where left to right evaluation does better.