Home » Thoughts and Musings » Thomas M. Tuerke on Technology »
Table of Contents [show/hide]
 

PEMDAS is Problematic; BODMAS is Bogus!

I was helping my daughter with her homework the other day. Math. She had to convert an algebraic expression into a word problem (by which she was supposed to express the order of operations correctly so the reader could follow them.) Reviewing what she wrote, I pointed out that it wasn’t quite correct and urged her to try again.

“PEMA”, I said.

“What?”

“PEMA”, I repeated: “Parentheses, Exponentiation, Multiplication, and Addition.”

“PEMDAS” she corrected me.

“Oh, really?” I remarked, somewhat incredulously.

How unfortunate.

Being a product of New MathYes, that New Math... the one that Tom Lehrer parodied so well. It’s funny, or would be, if it weren’t so painfully true., I wondered what the Board of Education had cooked up here, as it brought back memories of failed educational theory—or at least failed implementation—messing up kids for a generation. Moreover, messing with the well-established Order of Mathematical Operations seemed a recipe for trouble.

For those that don’t know, PEMDAS is just PEMA with Division and Subtraction tossed in. On the surface, that might seem reasonable, but there’s a dark underbelly to this.

PEMDAS isn’t “Broken”, just “Misunderstood”
PEMDAS apologists are quick to point out that PEMDAS isn’t “broken” or “wrong” or “a lie”, just misunderstood.

That, to me, is exactly the problem: it is so readily misunderstood, and for that reason alone, it is broken: it allows such misunderstanding to form and persist.

I can understand how primary school teachers may be outraged at this negativity over PEMDAS. Their hearts are clearly in the right place for wanting to teach mathematics to their students, and they see themselves as instilling valuable knowledge about the subject. They certainly don’t want to countenance teaching something “wrong”.

What they may not realize is that many of those students don’t remember everything they’re taught, and certainly don’t remember everything about what they’re taught. In the case of PEMDAS, they have this device—and an imperfect recollection of what it means—and get themselves into trouble using it in later years. Much of the backlash in fact comes from college instructors and university professors who are faced with doing remedial math to “unteach” the errant recollection of PEMDAS before they can begin teaching their own curriculum.

That alone should be a wake-up call. Perhaps proponents have a blind spot for PEMDAS, and they need to recognize devotion to the device is misplaced: it is the thing in need of remediation.

You see, neither PEMA nor PEMDAS are the Order of Mathematical Operations. Rather, they’re only mnemonic devices. Just like “Every Good Boy Does Fine” and “FACE” are supposed to help music students remember the notes on the musical staff, PEMA and PEMDAS are just a way of remembering the accepted order of operations in an arithmetic expression (or fact as they seem to be calling it these days.) In its entirety, the Order is:

  1. Parentheses: Everything inside matching parentheses before anything outside them, from the innermost out.
  2. Exponential operations: Raising things to a power in right-to-left order.
  3. Multiplicative operations: Multiplication and Division, in left-to-right order.
  4. Additive operations: Addition and Subtraction, in left-to-right order.

That’s it. Any time you have two operations to be evaluated (or simplified as some literature says), you pick the one closer to the top of the list. When the two operations tie, you do them in the order that row specifies. A multiplication next to a division? Which one is to the left, since that’s the one you do first. Addition next to a subtraction? Again, which is to the left?

This has been conventionTo be sure, there is no great law of mathematics that says you must do things in this order, but you may find yourself getting different answers than others. This order has come about by consensus to avoid what is jokingly referred to as “needing more bananas”: explicit parentheses to communicate the intended order. for at least a century (and by some indications, even longer) and is so institutionalized that it is what most programming languagesFortran, COBOL, C, C++, C#, Java, JavaScript, Perl, PHP, Ruby, and Swift are among these. There are, in fact, many more.

A very few programming languages have no notion of operator precedence so expressions must be written with explicit order stated.

Microsoft’s Excel and MathWorks’ Matlab (neither really programming languages per se but commonly used for calculation) implemented their expression evaluators “wrong” (in that exponents aren’t evaluated right-to-left) but that’s pretty much it.
use when there’s any ambiguity.

And you’ll notice, that’s PEMA.

“But...” I hear you exclaim, “...what about division and subtraction? Don’t they deserve equal time?” That is the rationale for the D and the S being added to PEMA.

If you’ve been taught math correctly, you are aware that division is just a kind of multiplicationThe term is “inverse operation”, and each of the operations have their inverses.
One of my “concerns” with PEMDAS is that it allows the curriculum to short-cut placing the necessary emphasis on these inverses. On the other hand, their very absence forces the issue, in order to answer the question “so what about division or subtraction?"
: dividing x by y is just multiplying x by ¹/y... and hopefully children are being taught this as well.

Similarly, subtraction is just a kind of addition. Subtracting 3 from x is the same as adding -3 to x.

Besides, if you want to be really nit-picky pedants, PEMDAS fails on the equal-opportunity front for neglecting roots: really, in such an “all-inclusive” world, it should be PERMDAS... but it’s not.

On the other hand, PEMA isn’t bothered, because taking the nᵗʰ root is just a kind of exponential operation, raising something to ¹/n. Voila... everything is covered. The square root of x is just x½, just like its square is x². This makes sense: the square root of the square of x (for positive numbers, anyway) is x½∙2.

Yeah, yeah, yeah... so why is PEMDAS so bad?

While the device is taught to represent P, E, (M and D), (A and S), this subtle detail is frequently forgotten, and there’s nothing in the acronym to force its retention. There are six letters, so it’s very easy for somebody to reach into their distant past and think there were six rules, not four. PEMDAS allows this. Don’t believe me? Just google “division before multiplication”

This is not an isolated incident, Math Forum’s Confusion over Interpretation of PEMDAS points out that “Students take PEMDAS letter by letter, tending to do all multiplication before any division, rather than working from left to right.” Students are one thing. University Math departments are another. There, the author, Harvard professor Dr. Knill, asks

What is x/3x?
It depends ... [the author submits the problem two ways to the program Mathematica, which presents results]

The computer has chosen to do the division first. This is natural if one looks as [sic] division and multiplication as operations on the same level. To play the devils advocate, note however that the famous PEMDAS (parenthesis, exponents, multiplication, division, addition and subtraction) has the M before the D so that we would have to accept the second one ...

I take a moment to correct Dr. Knill and point out that both JavaScript and Perl use the same conventional operator precedence that most other languages do. Both—like most programming languages—are neither PEMDAS nor BODMASSince these are already “damaged goods” I use them to mean specifically Multiplication before or after Division, respectively... just like Dr. Knill and many others do., but PEMA, with proper left-to-right behavior. The issue here is that the problem as stated, 2x/3y-1 is wildly ambiguous. Mathematicians would generally avoid this notation, using either explicit parentheses or—more properly—a proper fraction, 2x over 3y, with the subtraction of 1 either behind or under the line to disambiguate the order. But give the equation

 2*x/3*y-1 

to a programming language and of course it applies the only rules it has been instructed to follow. In this case, multiplication and division from left to right. So the expression is understood to be 2 times x, divided by 3, multiplied by y, with one finally subtracted from it. Not what you intended? Then you need more bananas...parentheses....

I thank those visionary math teachers—Helen Joseph and Al Bertie (both gone, but not forgotten!)—who spared me and my classmates ... by just teaching us all proper math, and the mnemonic PEMA.

In any event, Dr. Knill pontificates for a bit and concludes with a reference to ScienceBlogs which treats the matter rather more succinctly.

“So What’s the big deal?” I hear you ask.

Very simple: PEMDAS (and BODMAS) were meant be mnemonic devices to help remember the order of mathematical operations, but have instead served to confuse students. I thank those visionary math teachers—Helen Joseph and Al Bertie (both gone, but not forgotten!)—who spared me and my classmates from this by just teaching us all proper math, and the mnemonic PEMA. Now, if only all students could be set straight.

If a consumer product is defective—such as brakes on a car or the cord on an appliance—such that it is the source of repeated injury, such a product is recalled and replaced...but...but...but... PEMDAS is meant to do good!

Of course it is, but so were DePuy knee and hip replacements, Philips AEDs, and so many other items which ended up being recalled. Good intentions don’t mitigate bad outcomes. PEMDAS is being misremembered and misused. It should be removed from circulation.
. In the same vein, PEMDAS—clearly demonstrated to be defective as a tool to understand math—should likewise be removed from the curriculum. In any event, I’m taking the liberty of teaching my daughters math done right. It will just take a while to undo the damage.


Sections: 2

How Broken Is PEMDAS?
 — Thomas M. Tuerke

Well, there are those that openly claim that it is broken, (morally) wrong, and otherwise incorrect.

Googling pemdas is broken gives you a handsome selection.

At the top of the search results list (today, for meWith Google, you never know, since the results you get may depend on your prior search history...) is Maria Gillespie’s blog PEMDAS is broken (and how we can fix it). She advocates the acronym PEMA (but thinks “that’s not quite as catchy”, though I disagree, never having been handicapped by PEMDAS in the first place.) In any event, PEMDAS has baggage it really cannot shed. Interestingly, in one of the comments, Chris Seib says “That MinutePhysics video is horrifically wrong. There are teachers posting comments saying how disgraceful the video is. It should be deleted.” I disagree. It may not represent PEMDAS correctly, but it does represent how people misremember and misapply it, as is abundantly clear by so many sources. Also, I find abhorrent the notion that a video one disagrees with merits a take-down. It’s YouTube: create your own video and refute it if you object to it so much. If your points are better than those in MinutePhysics’, your argument will prevail. A take-down demand is a cowardly admission that one has no valid counterargument.

The aforementioned MinutePhysics’s YouTube video The Order of Operations is Wrong, and one of my favorite treatments on the subject. I like his suggestion: Teach math right (that is, completely sidestepping the issue of order of operation by expressing math equations unambiguously to begin with.)

I’ve already touched on Harvard University Math Professor Dr. Knill’s site; links above. I’ll just add this exchange between Presh Talwalkar and the professor... (emphasis mine)

Update of August 2, 2017: Presh Talwalkar writes

"I make math videos on YouTube on the channel “MindYourDecisions.” Some of the most popular videos are ambiguous expressions involving the order of operations. In doing research, I came across your website and the problem: What is 2x/3y - 1 if x = 9 and y = 2? I would answer 11, which was what the 5th grade teacher said. I was stunned that none of the 60 students your Harvard calculus class answered 11 (you explained 58 got the answer 2; and then 2 got the answer 18/5).

My [Professor Knill’s] answer: “yes, it is an interesting thing. None of the answers is of course “correct” as we know that both the BEDMAS and PEMDAS interpretations can be used without violating any authority. As indicated on the page, the answer 11 is what most computer languages get. You were obviously taught that. It would be interesting to know what percentage of humans say 11. My experiments say that it is very rare. Most do the multiplication before division as PEMDAS seems to be more popular and is what is usually taught in schools. BEDMAS appears to be taught much less. The only thing we know is that the claim that one of the answer [sic] is the only right answer, is wrong.”

An oft-cited Slate article, What Is the Answer to That Stupid Math Problem on Facebook by Tara Haelle is worth a read. In it, she says:

A better acronym would be PEMA, actually, to make it clear that multiplication and division are done together, and addition and subtraction are done together.) By that convention, 6 ÷ 2(1+2) = 6 ÷ 2 × (1+2) = 6 ÷ 2 × 3 = 3 × 3 = 9. If you were taking the ACT, SAT, or GRE (which would probably use parentheses to eliminate confusion), this method would yield the correct answer.

MadMath’s PEMDAS: Terminate With Extreme Prejudice. Despite an opening salvo of “adult” language from the author...who goes by the pseudonym Delta and is a self-described “college lecturer in mathematics and computer science" exemplifying his palpable frustration, he puts a fine point on things: “In my experience, none of the students who learn PEMDAS are aware of the equal-precedence (ties) between the inverse operations of multiplication/division and addition/subtraction. Therefore, they will always get computations wrong when that is at issue.” He then goes on to write “I’ve taken to repeatedly copying this onto the board almost every night because it’s so important, and the PEMDAS has caused so much prior brain damage” whereupon he enumerates the four rules... basically PEMA. Finally, he suggests “An example I use in class: Simplify 24/3*2. Correct answer: 16 (24/3*2 = 8*2 = 16, left-to-right). Frequently-seen incorrect answer: 4 (24/3*2 = 24/6 = 4, following the faulty PEMDAS implication that multiplying is always done before division)” (emphasis mine.) In short Students remember PEMDAS, but forget the ties and left-to-right operations of those ties.

Wikipedia, in the Mnemonics section of its article on Order of Operations points out “These mnemonics may be misleading when written this way. For example, using any of the above rules in the order “addition first, subtraction afterward” would incorrectly evaluate the expression”

In fairness, I tried googling "pemdas is great" which still finds a lot of “is broken” or “wrong” links, right at the top of the search, no less. Hmm...

I like this from Quora.com: A reader asks "Why do people think that PEMDAS ... is some immutable law of mathematics?" to which the answer (from Robby Goetschalckx) is:

Some teachers teach it that way. Instead of explaining that it is just a convention to reduce the number of parentheses needed and make things easier to read, they teach it as a really important rule of mathematics — as if it is a law instead of just a convention. This kind of illustrates the difference between a legal or societal law and laws of physics and mathematics. A law of mathematics is something which you cannot break, no matter how hard you try. A legal law is something you shouldn’t break. A convention to use consistent notation in mathematics is a societal law: you can easily break it, but you shouldn’t if you want to communicate clearly. A “law:” such as a²‌-b²‌=(a+b)(a−b) is something you cannot break (as long as you’re working in a commutative ring).

Some students do not remember why the rule was taught and mistake it for a law of mathematics. Many students are not always clear on the meaning of conventions, axioms, definitions and theorems. A definition might be mistaken for a theorem. Many students end up memorizing the formulas but do not remember what they mean.

Wyzant’s Brice B entry, The Order of Operations (PEMDAS/BODMAS) that you learned in elementary school... IS WRONG!!!. He, too, “misrepresents” PEMDAS (since this seems to be a transcript of the MinutePhysics video mentioned above) and evokes the ire of a commenter, Brett, who says

I find it troubling that you tutor math, and have no clue how to correctly apply PEMDAS. PEMDAS is NOT the rule. It is an acronym to help us remember the order of operations. If you do not understand the actual order of operations, then the acronym is no help at all. First of all, PEMDAS is 4 steps, NOT 6.
P- Parentheses (perform all operations INSIDE parentheses)
E- Exponents
MD- Multiply and Divide as they appear left to right.
AS- Add and Subtract as they appear left to right.

By now, it should be evident to everyone that the PEMDAS proponents are fighting the same retreating battle on every front. Because PEMDAS is so broken, so dysfunctional, so easily mis-remembered, they have to remind people “First of all, PEMDAS is 4 steps, NOT 6.”

Suggestion: then strike the D and S from the mnemonic to be four and not 6 characters long, and be done with it. Your horse has fallen coming out of the gate, stop flogging it thinking it will get up.




Other stuff
 — Thomas M. Tuerke

Unrelated to the PEMDAS matter (or at best, only tangentially related) are the following sites:

  • Ask Dr. Math’s History of the Order of Operations which goes into the evolution of the notation we now use.
  • Jeff Miller has a page on Earliest Uses of Symbols of Operation, which has a very in-depth treatment of the evolution of mathematical symbols. Remember, somebody had to invent this notation, and in many cases individual authors “invented” (and had to explain) their creations to their readers... Eventually one notation won out by popular consensus. Did you ever wonder why the closing parenthesis is used to represent division?

Some proposed alternatives to PEMDAS, touching on the recognized weaknesses. In general, these are just variations on PEMA:

  • A proposal offered by Doug Lee at Random Contact, is named GEMS... but that’s just PEMA with some awkward neologisms like “Multiplex” and “Simplex”. Not sure it solves any problems that PEMA doesn’t do as well.
  • Math For Grownups’ Laura Laing writes about The Problems with PEMDAS (and a solution), in which she introduces the Boss Triangle, a visualization of the order of operations. (Unfortunately, the name “Boss Triangle” doesn’t really describe what it is, so its strength as a label may be dubious, but the visual representation helps; it recognizes that there are different kinds of thinkers, and a one-size-fits-all approach may be exclusionary.)

Another thing of interest: many mathematicians—and instructors of the subject—dislike the obelus. You know, the “division” symbol that combines the colon and the hyphen, ÷ (the dubious “dork division” symbol). Quite frankly, I would like to see it be retired as well... but that’s a battle for another day.