Abstract: even in mathematics, ambiguities can be hard to spot. The phenomenon seen here in arithmetic goes beyond the usual PEMDAS rule and illustrates an ambiguity which can lead to heated arguments and discussions. This document is organized chronological. See especially:
Slides [PDF] from a science talk given on April, 2018.
Ambiguous Pemdas (a short 2 page paper with source texts appendix) on the occasion of a Math E-320 lecture 2021. Update from 2025: a 1 minute short extracted from a Video from 2022 about elementary algebra.
What is 2x/3y-1 if x=9 and y=2 ?
Try to answer this question before continuing to read. Did you get 11 or 2? If you got 11, then you are in the BEMDAS camp, if you got 2, you are in the BEDMAS camp. In either case you can relax because you have passed the test. If you got something different you are in trouble although! There are arguments for both sides. But first a story.
A lovely story
I got today following lovely story from the director of curriculum of some some school district:
"The problem 2x/3y-1 with x=9 and y=2 was actually posed for a 5th grade homework question and it is interesting how much debate has occurred between our parents. The students who had help from parents had the answer of 2. The teacher explained that the correct answer was 11."
Who is right? I wrote back: "It depends on how the brackets are understood. There are two interpretations: x=9; y=2; (2x/3)y-1 gives 11 2x/(3y)-1 gives 2 It is not clear what the textbook had intended with the 3y. As written, it can be interpreted both ways. Yes, one could argue that without brackets the given order matters. One can however also argue that "3y" is a unit which belongs together. So, everybody is right and that the textbook problem has just been unclear." This is actually a really fun topic. Lets expand a bit on it and explain why we can argue both ways. I bet most humans get the answer 2. [Update April 16, 2014: I made an experiment with my calculus class, in which 60 students submitted answers on paper: all except two got the answer 2. Interestingly, the two other answers were 18/5. This is what you get if read it as 2x/(3y-1). Nobody got 11]. The interesting thing is that if you want to use technology then the answer is 11: javascript gives 11, or wolfram alpha gives 11 or mathics (based on python) gives 11 too.
What is x/3x?
It depends again on whether one has 3x bundled together or not. Both answers x2/3 or 1/3 should be counted correct because the parenthesis had been missing. One should write either x/(3x) or (x/3)x in order to make the problem clear. Here is what the computer algebra system Mathematica does: x/3x 2 x Out[1]= -- 3 x/(3x) 1 Out[2]= - 3 The computer has in this case chosen to do the division first. This is natural if one looks as division and multiplication as operations on the same level and the division is on the left. 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 ... It is funny that in Excel, there is a rule BEDMAS (Brackets, Exponents, Division, Multiplication, Addition, Subtraction), which reverses Multiplication and division. One could therefore call the original question the BEMDAS-MEDMAS conflict. Different programming languages might do things differently. Your browser computes in Javascript with the BEDMAS rule: gives both 10/3. Try it out. Funny by the way (and totally unrelated to the topic discussed here) that the results are different 3.333333333333333 3.3333333333333335 illustrating that computers do not honor basic laws of arithmetic. The mathematics of rounding error arithmetic is subtle. My PhD advisor Oscar Lanford knew much about this. By the way, also Mathematica adhers to BEDMAS and does division before multiplication. It is in line with Excel and javascript as probably most programming languages like Perl.
What is the source of the problem?
We know that addition and subtraction orders can be interchanged: 3+4-3 = (3+4)-3 = 3+(4-3) This is called associativity. But already this is trickier if one tries to modify this because 3-4+3 = (3-4)+3 = 3-(4+3) How come, associativity does not hold here? You find out. Since the logarithm gives an isomorphism between the group (R,+) and (R -{0}, *), where * is multiplication, we also have ambiguities in the multiplicative case evenso the multiplicative group (R-{0},*) is by definition associative. But it is the role of the division which must be made clear: 12/(3*2) = 2 (12/3)*2 = 8 gives different answers. This can not be discovered well in algebra situations like 12/3x which is ambiguous. Both of the following expressions are clear, but give different results: 12/(3*x) = 4/x (12/3)*x = 4x This is also often a source of error in addition, as the minus sign has to be carried through: 3-4+3 (3-4)+3 = 2 3-(4+3) = -4 It is this case which makes the argument that the bracket should be placed to the left. The additive case is also a reason which seduces not to write the brackets in the multiplicative case. It always leads to trouble.
An other example
What is x/x/x ? We again have two interpretations (x/x)/x = 1/x x/(x/x) = x But since now, we have only divisions and no multiplication, it is even less clear what comes first. When dealing with fractions, we often make this clear by the size of the division lines x ----- x = x - x It has become clear that we first do the division with the smaller division line and x - x = 1/x ---- x What does Mathematica do? Lets look and enter 2/100/2 2/(100/2) = 1/25 (2/100)/2 = 1/100 Mathematica choses the second choice (as does javascript). It makes the first division first.
An ambiguous example with exponents
So, Mathematica does things from the left. Lets look now at exponents. What is 3^3^3 ? Again we have an ambiguity with two cases: (3^3)^3 = 19683 3^(3^3) = 7625597484987 Leaving out the brackets invites trouble. Yes, one could argue that the first example is more natural, but then, a printed version of a textbook might have the third 3 smaller so that the reader is seduced to first compute 3^3 and put that into the exponent, producing a much larger number. In the following example, this is even less clear what the writer intends because expressions like 102 are often treated together as we write 106 for a million. The 106 has become a unit: so, if we write 2^10^2 which of the two answers (2^10)^2 = 1048576 2^(10^2) = 1267650600228229401496703205376 is correct? Maybe we should ask our professional computer algebra system again. Mathematica 9.0 gives the second choice, if 2^10^2 is entered! Now we see that even professionals have difficulty to decide.
For (a/b/c) the algebra system starts evaluating from the left, while for (a^b^c) it starts evaluating from the right.
How come, Mathematica does that? The reason is that a^x is a short hand for Exp[x Log[a]]. Now, if you write expressions like Exp[Exp[Exp[x]]], then by nature, we start evaluating from the right. If we write f(g(x)), we first compute g(x) and then f(g(x)) even so f is written first. Lets go back to division. If we write f(x)=1/x then f(f(x))=x but (1/1)/x) = 1/x and 1/(1/x) = x. We see that the argument of starting to evaluate the division from the right when writing 1/1/x has some merit too because it even gives in the division case the result we would get if we wrote the expressions as operators. This is why the parents and the teacher have disagreed. And both were right. Because both way to write things make sense in some way.
There is only one solution: write the parenthesis.
P.S. When talking about opinions, this reminds me: when I was in school, there had been a war about whether to use Reverse Polish Notation (RPN) or not for calculators. There was the "HP camp" using calculators from Hewlett-Packard which used RPN and there was the "TI camp" using calculators from Texas Instruments which did not. I had been in the TI camp (even hardware hacking them) and as a student found the RPN strange. Of course, after having studied mathematics and working with computer algebra systems for a long time, RPN has become natural too. In Mathematica, one often makes computations by adding commands from the right like in 256 // Sqrt // Exp // Floor // PrimeQ which takes the square root of 256, then exponentiates it, take the integer part and then answers the question whether this is prime. It is equivalent to PrimeQ[Floor[Exp[Sqrt[256]]]] but avoids the brackets. I use the first way often when computing interactively, while the second one when writing code like the following which looks for the statistics of primes in a subexponential sequence of integers: F[n_]:=Floor[Exp[Sqrt[n]]]; s=Table[If[PrimeQ[F[n]],1,0],{n,1000}]; G[n_]:=Sum[s[[k]],{k,n}]*Log[n]/n; ListPlot[Table[G[n],{n,Length[s]}],PlotRange->{0,1}] If you are curious: here is the Plot. P.S. An other interesting (a bit unrelated) story is the ambiguity introduced by decimal marks and dividing numbers into groups. Especially in journalism, one writes things like 121.123 or 121,123 meaning 121123 and not 121 + 123/1000. Even so it is now well established that "the symbol for the decimal marker shall be either the point on the line or the comma on the line" the comma or decimal point is still used frequently to divide numbers into groups, despite the fact that it clearly violates the ISO 31-0 standard. But habits are hard to change. Document history:
4/9/2014
4/13/2014 change title, found BEDMAS Excel page and put question first
4/14/2014: add picture, motivated from here using background drop from here.
4/14/2014: references
A hpmuseum forum example
A physics forum example: 48/2(9+3)
advocates Divide and multiply rank equally and go left to right. and has other memnonics like "Please Eat Mom's Delicious Apple Strudels".
This Science blog mentions the article by Tara Haelle which pretty well tells already what is going on (if I had seen this article written on March 12, 2013 before, I would not have bothered to write this down, because that article makes very clear that the initial assessment that there is no agreement on the order of multiplication or division is correct). Still, the topic had prompted me to say something new about the order of operations of the same type, like the D or E in PEMDAS which goes beyond the BEDMAS controversy. Here is an interesting quote from that article "Internet rumors claim the American Mathematical Society has written "multiplication indicated by juxtaposition is carried out before division," but no original AMS source exists online anymore (if it ever did). Still, some early math textbooks also taught students to do all multiplications and then all divisions, but most, such as this 1907 high-school algebra textbook, this 1910 textbook, and this 1912 textbook, recommended performing all multiplications and divisions in the order they appear first, followed by additions and subtractions. (This convention makes sense as well with the Canadian and British versions of PEMDAS, such as BEDMAS, BIDMAS, and BODMAS, which all list division before multiplication in the acronym.) The most sensible advice, in a 1917 edition of Mathematical Gazette, recommended using parentheses to avoid ambiguity. (Duh!) But even noted math historian Florian Cajori wrote in A History of Mathematical Notations in 1928-29, "If an arithmetical or algebraical term contains / and x, there is at present no agreement as to which sign shall be used first." The article has links to sources of textbooks. Here is entry 242 in Florian Cajoris book "A history of mathematical notation" (page 274), which is mentioned in that quote I don't see any indications of an advise given in the cited High school textbooks like here, here, but the mentioned entry this book of Webster Wells is clear about it on page 18:
Update of May 18, 2017: As of recently, riddles like below have appeared which overlook that the number of fries has changed or that one cherry is used) have surfaced
These puzzles have managed to become viral not because of the PEMDAS thing but because people don't look at the variations (3 instead of 4 bananas, 2 o clock rather than 3 o clock). Almost everybody gets it wrong at first. But there is also the PEMDAS challenge. Some get 88. But for getting 88, one would have to write parenthesis (2+3+3)*11. (thanks to Abitha Sukumaran for sharing this). 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 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 more taught in schools. BEDMAS of PE(MD)AS appears to be taught much less. The only thing we know is that the claim that one of the answer is the only right answer, is wrong." Update of August 5, 2017: Jacob Poscholann Koefoed Christensen sends an other example and a remark on the obelus. "The problem is a picture of a mobile phone gets 9 from the equation : 6÷2(2+1) which according to them says it would be 1. In your argue you define obelus and division slash to have to whole different meanings. Well yes they actually do have two different meanings and that's why you normally never use obelus. Only American may still use it, but this sign has been removed in use of equations of scientific papers due to its historical problematic. First of obelus in Northern Europe means subtraction. Second of all, obelus is recommended removed in the use of science due to that we already have a sign for either of these (division slash ("/") and subtraction ("-")). Even though according to your argue that obelus and division slash should imply two different meanings you often only have one option on a calculator to make a division-sign." My Answer: "Thanks for the example 6÷2(2+1). It illustrates the ambiguity too. Yes, depending on whether one is in the PEMDAS or PEDMAS team, one gets 1 or 9. It's also a beautiful example, where one can see heated debates. As pointed out and also previously pointed out by others in the literature list, there is no right answer. It depends on which rule is applied. Both 1 and 9 are correct. I always see the obelus as a synonym for / but it can be even more confusing and so, yes, should be avoided. " Update of November 2017:
In our Second midterm PDF of November 2017, we had in Problem 9 the expression x^3/3+y. There is no ambiguity here as PEMDAS very clearly makes the expression defined. Still, I should have been more clear when writing the exam as there were many students who asked during the exam whether it could be x^3/(3+y). I was surprised and had to put a clarification on the blackboard:
The exam still went well. And you can see on this photo taken just before the exam that everybody was happy to go: The lesson is very clear: as a teacher, even if you know better you have to be extra clear, even redundant. Even if there is no ambiguity, it is better to be on the safe side. By the way, the Wikipedia article mentions the example 1+2x3 = 9 Microsoft calculator in standard view 1+2x3 = 7 Microsoft calculator in programmers view It shows that the same vendor, in a framework where no ambiguity exists (nobody has ever questioned that multiplication should go before addition), an ambiguity in the same product. An other example from that article mentions Texas Instruments calculators 1/2x = 1/(2x) in TI-82 calculator 1/2x = (1/2)x in TI-83 calculator Self-proclaimed rules like this are hardly helpful. Update of January 19, 2018: Timothy Musgrove kindly drew my attention to a silly debate on youtube in which the question of 6÷2(1+2) again comes up (see above). Also this story shows how almost theological the debate can become but already the fact that the fraction of viewers liking the video and not liking the video is about equal shows that answer to that problem must be ambiguous. Above, I have given, (following partly Tara Haelle, who had written that Slate article), historical pointers showing how ambiguous things are. Here are the camps:
PEMDAS (The multiplication comes before division)
PEDMAS (The division comes before multiplication)
PE(MD)AS (Division and Multiplication have the same weight, it depends what is left)
Ambiguous (There is no established rule)
Computers mostly follow the second or third. Most people and especially students (by experiment) tend to follow the PEMDAS rule. The literature points to Ambiguity.
PEMDAS
BEDMAS
PE(MD)AS
6/2*(1+2)
1
9
9
(1+2)*6/2
9
9
9
There is a reason why the "PE(MD)AS" camp feels so much superior. We have in both cases the same answer. Also computers often follow "PE(MD)AS" and taking the "left" to "right" point of view. Even worse is probably the debate when asking what 8÷2/2 is (some high school teacher confirmed me that the divisions (obelus and backslash signs) are treated differently in some textbooks, see the "obelus" remark above by Jacob Poscholann Koefoed Christensen. Some would tell that the answer is 8 because / goes before ÷. When going from left to right, we get 2. Update of September 4th, 2018: I got the following nice email
How on earth can you say it is ambiguous when it is AXIOMATIC that multiplication and division are inverse operations? How can you say it is ambiguous when ANY division can be expressed as multiplication by the reciprocal? Shame on you for perpetuating bullshit.
The only thing which is a bit troubling as the writer actually seems to be a teacher. Independent of the argument, the writer should probably change to a profession, where as little human interaction as possible is required. I wrote back
Dear ..., you probably refer to http://www.math.harvard.edu/~knill/pedagogy/ambiguity/ It is not about whether the division is the inverse of multiplication. That is the definition. This is not where the ambiguity is. It is that the notation is ambiguous (and experience shows that that it is a source for errors and misunderstandings). For example, if we write x/3x, then many humans understand the result as x/(3x) which is 1/3. If you give it to a machine, then it gives the result x/3x =x^2/3. Now, the question is whether there is a definite rule which tells, what is right. The PEMDAS rule, clearly puts multiplication before division so that x/3x = x/(3x) = 1/3. Most humans follow the PEMDAS rule. Because they have been taught so. There is also the BEDMAS rule in which the division comes before multiplication. In that case the result would be x^2/3. Now, if you look at the literature and history, then it turns out that there is no definite answer what is right. And if this is the case, we call it ambiguous. There is a camp which advocates PE(MD)AS where MD are on equal footing and where the order matters if multiplication is used together. But this makes things only more complicated as we have now three different interpretations. So if one writes such an expression like x/3x, one has to be careful and put the brackets. Everything else can produce misunderstandings. You are not the only one who feels very strong and become emotional about it.
Update of October 2, 2018: I was sent the link to the following Youtube Video. It is so far one of the best contributions on youtube about it. It makes a good point that in the real world, the expressions are used in a different way: for example, in published articles mn/rs is usually in publications interpreted as (mn)/(rs) or the Feynman lectures, one sees that 1/2N1/2 is interpreted as 1/(2 N1/2). In Engineering, one can read W = PVMg/RT. An other excellent point done in that video is that one would write x/2 if 1/2x would be interpreted as (1/2) x. Nobody would write 1/2x, if they mean x/2. So, in practice, one interprets the expression as 1/(2x), which is PEMDAS, but different from BEDMAS or the interpretation that multiplication and division are put on the same footing. It also mentions that in the AMS guide, one has PEMDAS (multiplication comes before division). Also the guide from the American Physical Society follows PEMDAS. The video illustrates again that the only way avoid the ambiguity is to use brackets. October 24, 2018: I originally had planned to post a youtube version of some slides from April 28, 2018 at the Harvard Extension STEM Club, but there was no time to do that. Thanks to Ana Carolina Smith for the opportunity to speak. Here are the part of the slides: SLIDES PDF (76 pages) October 26, 2018: An other nice example from somebody: Here the email: I was told that when you multiply and divide (since the order of operation does not matter) you never need to use parentheses, is this right? Because 2 * 3 / 4 * 6 on my calculator give me 9, and I was expecting 0.25! To me this should be the equivalent to 2*3/(4*6) because, since we don't need parentheses, it's the only way to type it without them. If I want to calculate 2*3/4*6, like my calculator does, I should type 2 * 3 * 6 / 4 is this correct? My answer: The order of operations matter. You need to put parenthesis. I like the example you give. It already illustrates it well. Most humans would get 6/24=1/4 as you did. Most programming languages (computers) give 9. The computer follows PEDMAS (division before multiplication) 2 (3/4) 6 = 9 or do with the rule (MD) which means ``whatever comes first" ((2*3)/4)*6 = 9 Humans (and most recommendations, like professional societies like AMS follow PEMDAS, which means you first do multiplication and then division (2*3)/(4*6) = 1/4 But it does not make sense to follow a recommendation if different interpretations exist and computers do it different. There are lots of different opinions about it on the web. There is only one way out: just write the parenthesis, also when using a computer. Here is an other nice example which only uses division: ((2/2)/2)/2 = 1/4 (2/(2/2))/2 = 1 (2/2)/(2/2) = 1 2/(2/(2/2)) = 1 2/((2/2)/2) = 4 The computer follows here the rule (left to right) and gives 1/4. But in this example: (3^3)^3 = 19683 (3^(3^3)) = 7625597484987 the computer goes from right to left. Also here, brackets are required. November 4, 2018: S. A. added an interesting angle to the story: It is the recommendation to simplify first then remove parentheses. I read your blog on programming issues as to MD or DM. The problem is they all conflict with the first law of Algebra. Simplify then REMOVE Parentheses. These conventions all violate that by saying only simplify brackets INSIDE. So at first I like you said AMBIGUOUS to 6/2(1+2) 1 or 9 However, I took a nap, astral surfed over to old Euclid and he laughed. Proof 1 and 9. 6/x=1 or 6/x=9 When x=2(1+2) 2(1+2)=2(3)=6 6/6=1 So not teaching students to remove parentheses in new math is conflicting with first law of algebra. All these acronym conventions need to be corrected to reconcile with 1st law of algebra. So do you agree the new math conventions need to agree with Euclids first rule of Algebra? I think it does. Here was my answer: It is an interesting angle. But note that the recommendation to ``simplify" is where the problem of the ambiguity is located: Yes, one can simplify 6/2(1+2) by introducing x=2(1+2) = 6, then get 6/6=1 But one can also simplify by defining x=6/2, then get x(1+2) = 9. Actually, this is also historically interesting. You mention Euclid. Euclid did not use any algebra as we know it. Symbolic algebra came only with Viete in the 16th century. As far as we know, one only has realized in the 20th century that there is really an ambiguity. It is clearly stated in Cajori's book on mathematical notation, which is the authority on the matter. It has also become a pedagogical issue: students today get mostly taught the PEMDAS rule which formally puts multiplication before division and would recommend the result 6/2(1+2) =1. If you give the expression to a computer algebra system they all give 6/2(1+2) = 9. It was examples like that which produced all these discussions. The first rule of algebra is still a nice rule. It is good advise. Unfortunately it does not resolve the ambiguity. But I agree that it helps a writer to avoid the ambiguity. But you know, the issue came up mostly in educational settings. If a teacher asks a student what is 6/2(1+2) , the teacher does not want to simplify that, as it would already solve the problem. If today, a teacher asks students what is 6/2(1+2), then this is just asking for trouble. The right thing to do is to clarify and either write either (6/2)(1+2) or 6/(2(1+2)). It was clear already to Cajori that avoiding the parenthesis does not produce well defined mathematical expressions. Oliver December 3, 2018: Atmos added an other interesting angle A potential solution for this controversy could be that when you have coefficients and variables written together without operators between them, e.g. 5ab, we should be able to treat this as a nested operation. In other words, the lack of an operator symbol implies that the relationship between them takes precedence over any operations outside, i.e. 5ab represents (5 * a * b). So if you had a / bc, there is only one operator written (the division symbol), and the "bc" part would be implied to be nested because of the omission of the operator within. So it would still be "a over bc," exactly what it looks like and how many of us were taught. And then if we need to signify that the operation between a and b actually takes precedence over the relationship between b and c, then we would just write a / b * c instead. No fuss, no muss. Isn't that a much more efficient way of communicating with the mathematical language here? And isn't that the point of a mathematical language, to communicate concepts effectively? Otherwise this kind of confusion will never go away, and we will have to write a lot more parentheses in our equations (and nobody wants to do that). Some people like the "new math" of the super strict PEMDAS interpretation specifically because it is an easy way to trick people and make the math more convoluted than it needs to be. Yet that seems to defeat the entire point of why we do this stuff in the first place. I get both ways of doing it, but the strict PEMDAS method seems counterproductive because it causes so many problems, and it does things like making an ostensibly simple fraction like 2x / 3y into actually meaning 2xy / 3 instead, which seems completely insane. But if instead we just use PEMDAS when the operators are actually written, then all of these kinds of problems would literally vanish overnight. The "old math" and the "new math" would finally agree, and we could accomplish it all with one very simple rule. What do you think about that? I wrote back Hi Atmos, leaving away the multiplication signs is already routinely done. Actually most of the time. There can be an additional problem however when using numbers rather than variables like 3/45 is not the same than 3/4 5 But you contribute an interesting point because there is now even more ambiguity: 3/45 = 3 over 45 = 1/15 3/(4*5) = 3 over 20 = 3/20 (3/4) 5 = 3/4 times 5 = 15/4 The PEMDAS problem is not a ``problem to be solved". It is a matter of fact that there are different interpretations and that a human for example reads x/yz with x=3,y=4 and z=5 as 3/20 while a machine (practically all programming languages) give a different result. There are authorities which have assigned rules (most pupils are taught PEMDAS) which is one reason why many humans asked about 3/4*5 give 3/20 which most machines asked give 15/4: I type this in Mathematica x=3; y=4; z=5; x/y z and get 15/4 It is a linguistic problem, not a mathematical problem. In case of a linguistic problem, one can not solve it by imposing a new rule. The only way to solve the problem is to avoid it. One can avoid it to put brackets. Oliver Update of December 14, 2018: In the newest Cartoon guide of the Larry Gonnik series (which are fantastic), there is also something about order of operations. But it does not go very far. "If no parentheses are present, multiply and divide before adding and subtracting." This is a very rough rule but it has the advantage that it does not get into the PEMDAS wars.
Update of January 18, 2019: A math teacher sent me the following example. Not only is here the PEMDAS ambiguity involved. Also, the question "96 divided by 6 of 4" appears which can both mean "96/6 times 4" or then "96/(6*4)". It is a specially interesting case because of that:
Question: I am a Maths teacher and recently came across a particular question on PEMDAS (kindly check the attachment) where the students got two different answers (6 and 66). The reason for the getting two different answers was the way the students solved the last part of the question: 96 ÷ 6 of 4 Method 1: Few students solved it as follows : 96 ÷ 24 Method 2: And the rest solved it as : 16 x 4 I need your help to ascertain which is the correct method, or are both the methods acceptable.
My answer: There are two ambiguities in this problem and yes, all answers given by students should be graded as correct. 1) The first expression: It appears that the students did interpret 57 ÷ 19*2 expression as 6 even so it could be 3/2 if PEMDAS is used (and official recommendations of AMS or physical society and used by most scientific papers, especially if the expressions are variables). What happens is that if the question would have been ask as 57/19*2, then many would have interpreted it as 57/38. 2) The third expression is a new thing as the "of" as a "multiplication" is unusual. Also here, there are no definite rules. Both answers 6 and 66 are correct in the total. I would even count 3/2 as correct as this is what one gets if one uses the PEMDAS rule and not the PEDMAS nor the PE(MD)AS rule. So, here are the four possible answers. On the left we have now always unambiguous expressions: 57/(19*2) -64*2/32 + 96/(6*4) = 3/2 (57/19)*2 -64*2/32 + 96/(6*4) = 6 (57/19)*2 -64*2/32 + (96/6)*4 = 66 57/(19*2) -64*2/32 + (96/6)*4 = 123/2 The example again shows that one always needs to put brackets. But it also illustrates what can happen if "colloquial language" is used to describe arithmetic operations as this can can lead to other ambiguities. "What is two third of 9" should be clear as (2/3)*9, while 2 ÷ 3 of 9 could be interpreted as 2/(3*9) too. The example indicates again that humans might interpret the obelus sign ÷ differently than the division sign /.
Update of May 2, 2019:
In the Swiss newspaper 20 Min, the problem 6/2(1+2) = ??? is mentioned too. The article already has 1384 comments. Similarly as for years on social media, the fight goes on there. The most interesting thing is how certain most are that they are right, on all sides. Which points again to ambiguity. The title of the article is "Millions fail at this math equation!" As ``proof", there is a youtube video which gives the answer 9. The author of that video, Presh Talwalker, gives in his blog the reference Lennes, N. J. "Discussions: Relating to the Order of Operations in Algebra." The American Mathematical Monthly 24.2 (1917): 93-95. . One should better read that article. This article from 1917 indeed claims that ``most text books" use the left to right rule if division and multiplication appear mixed. But it also states the "established rule"
"All multiplications are to be performed first and the divisions next".
So, we have it: it is simply nonsense that the 12 million people who do it differently were not ``unable to do the problem". We definitely deal with a situation which must be considered ambiguous. The 1917 article is a nice reference. It confirms that already. But since 1917, the PEMDAS rule has been taught to millions of people. It remains astounding only how many claim to know the right answer. Maybe that is just human nature.
Read at the end of the article of Lennes who wrote in 1917 already:
"When a mode of expression has become wide-spread, one may not change it at will. It is the business of the lexicographer and grammarian to record, not what he may think an expression should mean but what it is actually understood to mean by those who use it. The language of algebra contains certain idioms and in formulating the grammar of the language we must note them. For example that 9a2 ÷ 3a is understood to mean 3a and not 3a3 is such an idiom. The matter is not logical but historical.
One can not say it better! So, not the 12 million people are the idiots. Those who claim so, are. Update of August 5, 2019: Steven Strogatz gives in a New York Times article a new twist and blames a discrepancy between grade and high school: the example taken is 8 ÷ 2(2+2), where every computer gives 16, while humans usually give the answer 1. The article again makes very clear that the question is ambiguous. There is no right or wrong if there are different conflicting rules. The only ones who claim that there is one rule are the ones which are wrong! That Vexing Math Equation? Here's an Addition The confusion (likely intentional) boiled down to a discrepancy between the math rules used in grade school and in high school. 8 ÷ 2(2+2) = ? The issue was that it generated two different answers, 16 or 1, depending on the order in which the mathematical operations were carried out. As youngsters, math students are drilled in a particular convention for the "order of operations," which dictates the order thus: parentheses, exponents, multiplication and division (to be treated on equal footing, with ties broken by working from left to right), and addition and subtraction (likewise of equal priority, with ties similarly broken). Strict adherence to this elementary PEMDAS convention, I argued, leads to only one answer: 16. Nonetheless, many readers (including my editor), equally adherent to what they regarded as the standard order of operations, strenuously insisted the right answer was 1. What was going on? After reading through the many comments on the article, I realized most of these respondents were using a different (and more sophisticated) convention than the elementary PEMDAS convention I had described in the article. In this more sophisticated convention, which is often used in algebra, implicit multiplication is given higher priority than explicit multiplication or explicit division, in which those operations are written explicitly with symbols like x * / or ÷. Under this more sophisticated convention, the implicit multiplication in 2(2 + 2) is given higher priority than the explicit division in 8÷2(2 + 2). In other words, 2(2+2) should be evaluated first. Doing so yields 8÷2(2 + 2) = 8÷8 = 1. By the same rule, many commenters argued that the expression 8 ÷ 2(4) was not synonymous with 8÷2x4, because the parentheses demanded immediate resolution, thus giving 8÷8 = 1 again. This convention is very reasonable, and I agree that the answer is 1 if we adhere to it. But it is not universally adopted. The calculators built into Google and WolframAlpha use the more elementary convention; they make no distinction between implicit and explicit multiplication when instructed to evaluate simple arithmetic expressions. Sign up for Science Times We'll bring you stories that capture the wonders of the human body, nature and the cosmos. Moreover, after Google and WolframAlpha evaluate whatever is inside a set of parentheses, they effectively delete the parentheses and no longer prioritize the contents. In particular, they interpret 8 ÷ 2(2 + 2) as 8 ÷ 2x(2 + 2) = 8 ÷ 2x(4), and treat this synonymously with 8 ÷ 2x4. Then, according to elementary PEMDAS, the division and multiplication have equal priority, so we work from left to right and obtain 8 ÷ 2x4 = 4x4 and arrive at an answer of 16. For my article, I chose to focus on this simpler convention. Other commenters objected to the original question itself. Look at how poorly posed it was, they noted. It could have been made so much clearer if only another set of parentheses had been inserted in the right place, by writing it as (8 ÷ 2)(2+2) or 8 ÷ (2(2+2)). True, but this misses the point: The question was not meant to ask anything clearly. Quite the contrary, its obscurity seems almost intentional. It is certainly artfully perverse, as if constructed to cause mischief. The expression 8 ÷ 2(2+2) uses parentheses - typically a tool for reducing confusion - in a jujitsu manner to exacerbate the murkiness. It does this by juxtaposing the numeral 2 and the expression (2+2), signifying implicitly that they are meant to be multiplied, but without placing an explicit multiplication sign between them. The viewer is left wondering whether to use the sophisticated convention for implicit multiplication from algebra class or to fall back on the elementary PEMDAS convention from middle school. Picks: "So the problem, as posed, mixes elementary school notation with high school notation in a way that doesn't make sense. People who remember their elementary school math well say the answer is 16. People who remember their algebra are more likely to answer 1." Much as we might prefer a clear-cut answer to this question, there isn't one. You say tomato, I say tomahto. Some spreadsheets and software systems flatly refuse to answer the question - they balk at its garbled structure. That's my instinct, too, and that of most mathematicians I've spoken with. If you want a clearer answer, ask a clearer question. August 5, 2019. An other treasure trove by Jenni Gorham just appeared on Youtube: August 8, 2019. Greg McCann kindly pointed out this link to an archived copy of the AMS guidelines. Local copy. To cite from there for example: Formulas. You can help us to reduce printing costs by avoiding excessive or unnecessary quotation of complicated formulas. We linearize simple formulas, using the rule that multiplication indicated by juxtaposition is carried out before division. Thus, instead of the (coded) display:
August 17, 2019 An other question: I am curious what you think the answers is to this equation. 8 ÷ 2(4). To me, the simplest order of operation next is to multiply 2 * 4 first because I still have the parentheses to deal with. I'm just a believer that we have to do some kind of math to get rid of the parentheses. Some people are just dropping them without doing any math. I mean, why have them at all if one can just drop them at any time without doing any math to clear them out. S. ----------------------------------------------------------------------------------- My Answer: Yes, this is one of the latest PEMDAS riddles passed around. A similar one has been discussed also by Strogatz in the NYT. What you mention is that the 2+2 is already evaluated but it does not change the situation to to 8 ÷ 2(2+2) which is now passed around. But it is the same story. The reason to put a bracket around 4 is so that it is not read as 24. But it does not clarify the ambiguity. Yes, one is tempted to do first 2*4 and get the result 1. Most computer programs evaluate it to 16. Example: Mathematica 12.0.0 Kernel for Linux x86 (64-bit) Copyright 1988-2019 Wolfram Research, Inc. In[1]:= 8/2(4) Out[1]= 16 Almost all humans would evaluate it to 1. Opinions do not matter here as it is now well documented that there is just no consensus (neither by any authority, nor by historical growth, it is a linguistic phenomenon that one has realized on so late the need to define this precisely). Things can be interpreted differently and that will remain so. On has to place brackets to make things clear. September 17, 2019. An answer to some fact checking questions from the NYT. I wrote back: Summary: -------------------------------------------------------------------------------------------- The question 8/2(2+2) has different answers depending on the rule which is used. One can interpret it as (8/(2(2+2))) = 1 or (8/2) (2+2) = 16 depending on the rule. There is no universally accepted rule as there are several: PEMDAS, BEDMAS, PE(MD)AS. It is not possible to say what is correct and what is incorrect. There are different rules, leading to different results. The expression is not well defined. It appears that most humans naturally give the answer 1 and most computers and programming languages return the answer 16. In order to make the expression unambiguous, one has to put brackets. It was realized only relatively late (about 100 years ago) that there is an ambiguity. No consensus has been reached ever since, so that there is no alternative to clarify the expression. Literature to that is Florian Cajori, "A history of mathematical notation", London, 1928. N.J. Lennes, Relating to the order of operations in algebra, Amer. Math. Monthly, 24 1917 ------------------------------------------------------------------------------------------------ Here are answers to your questions: - Accurate to say that according to PEMDAS, "2+2" should unilaterally be the first operation performed? Yes! But this is not PEMDAS. The 2+2 operation is performed first because brackets have been placed around it. - According to lower-level math, the solution to this equation should be 16? No. There is a rule called PEMDAS which is wide spread (kids learn "Please Excuse My Dear Aunt Sally") which when followed asks to do multiplication before division. This gives 8/(2(2+2)) = 1. As today, most kids in lower-level math also have access to calculators or online tools, they might give the answer 16. The reason for the claim that it is a lower-level math part is probably that most teachers now use a calculator to test things and the computer tells them that the answer is 16. As students and their parents get different results (if they do not use a computer) there is a controversy. - Fair to say that in algebra or higher math, the 2(4) operation takes precedence? No. Also here it depends on the rule used. If one uses PEMDAS as intended, then the answer is 1 which is to compute 2(2+2) first as the M comes before the D. It is not a question which level or subject one uses. The answer depends on which rule is used. - According to higher-math standards, is the solution to this equation 1? No. Also this depends on the rule used. When doing the test with students, most give the answer 1. Actually, most humans give the answer 1 if they do not use a computer. Most people read such expressions as 1. Computers however, who treat multiplication and division often on the same level and almost universally give the answer 16. I had asked in 2014 incoming freshmen (not yet higher-math students) in an intro calculus course and all except one used the PEMDAS rule. Most humans answer 1. - The piece asserts that the way this mathematical expression is written is misleading. Would you agree with this assertion? No. It is not misleading, it is ambiguous. It would be misleading if there would be a correct answer and the expression would lead to a wrong answer. This is not the case. There is no correct or wrong answer. The expression is ambiguous and depends on the rule which is used. - Fair to say that as one moves into higher math (post elementary school level), division is generally denoted as a fraction? No. One uses all kind of expression in higher math. Dividing into lower level math and higher level math is less important (in my experience) than whether one computes how one reads math naturally (and most textbooks do) or if one computes the expression with a computer. It might be psychological, it might be linguistic, it might be by being taught so, it might be reading texts, but most humans do multiplication before division in situations like the one discussed. - How would one write this equation in fraction-form? Non-ambiguous expressions either use brackets like 8/(2(2+2)) An other possibility is to use the expression 8 ---------------- 2 (2+2) This gives 1. In that it is important that there is a clear long fraction division line making sure that the 2 (2+2) is done before the division. The other version would be (8/2) (2+2) which gives the answer 16, as most computers do. November 2, 2019: This website features an online calculator mentioning BODMAS BODMAS is also an acronym which is short for Bracket, Order/Of, Division, Multiplication, Addition and Subtraction. The website and calculator completely misses the point however of identifying expressions which can be understood differently. Especially, because the website is called PEMDAS calculator, it implies to use the PEMDAS rule which has multiplication before addition. So, the calculator evaluates 2*9/3*2-1 as 11, as most calculators or programming languages do, but which is different from what PEMDAS actually suggests (2*9)/(3*2) - 1 = 2 and which most humans evaluate it to when asked. So, the calculator, rather than helping to clarify the ambiguity which is present, is just a calculator as many. There are modern calculators which warn a student that an expression is ambiguous and enters parenthesis so that the user can, if these parenthesis are not what was meant can change them. April 6, 2020 An other question: Hope it is okay I email you. I came across your page while having a debate over the Facebook problem. I have been furloughed so I have a lot of time on my hands. This version was 6/2(1+2). To me the answer to the above is 1 and only 1. But, I didn't want to debate that. I wanted to add something I didn't see represented on your site that I think the debate over PEMDAS misses. Math is often called the universal language. It allows people across different cultures to communicate. When you read the first example 2x/3y - 1 when x = 9 and y = 2, how do you read it? Do you read it two times x divided by three times y minus one? Do you read it two x over three y minus one? Much like the English language has rules, math also has rules. English isn't perfect and doesn't always follow the rules. Math is the same. Sometimes multiplication and groupings can be implied. My answer: yes, math is a universal language which allows communication among different cultures. But languages also have been designed by people and are not always perfect. The PEMDAS ambiguity is actually just an omission of design. There was no authority which once and for all told that it is necessary to specify this. The reason is historically clear. One only realized the problem too late. You say, for you 6/2(1+2) is 1, yes, almost all humans assume this. If you give it to a computer, it gives you 9, almost all programming languages do. Yes, like English, Math has rules. But they are far from perfect. Languages change and get refined over time. In the PEMDAS discussion it turned out to be too late to adopt rules. Some have tried and many are fanatic and think that their way is right. In the 6/2(1+2) case for example, we can see advocates (i.e. on youtube), who argue, only 9 is the right answer. But as you say, reading it as 6/2(1+2) is entrenched and changing that would upset many. The last few slides in this presentation [PDF] show a bit what linguists say. It is not really a math problem, it is a linguistic problem. What is good about the discussion is that all teachers and students now know about the ambiguity and write down clarified expressions. April 9, 2020 From an other email: I am not a mathematician. STEM has always been my strong area, but I prefer application to theory, thus I am an equipment technician in the semiconductor industry (I fix the robots that make computer chips). I mention this to say I may not be an expert, but also am not a lay person. My first experience with this question came when trying to program the quadratic formula in to my TI-83+ calculator almost 20 years ago. To make the equation work correctly additional parenthesis are required. This is because standard algebra is notated in an implicit way and computers never pick up on implied meanings, or only began to recently. This is kind of covered in the NYT article you cite, but it is stated in a way I think is erroneous. It states in "simple or elementary" math 8/2(4) is the same as 8/2*4, and only in algebra does 8/2(4) become 8/(2*4). Calculators are fallible, as you pointed out MS calculator solves 1+2*3 as 9 not 7 which is never correct. The "distributive law of multiplication and division" proves the notion of two right answers invalid. 8/2(2+2)=16 is in complete violation of the distributive law, thus is invalid. If the equation were written (8/2)*(2+2) then order of operations would dictate that the division happen first then the result would be distributed within the second brackets as is the case if it were written 8/2*(2+2). However in any equation where it is written 8/2(2+2) then it is implicit (not explicit) that the distributive law is to be applied as part of the parenthesis before the division occurs, thus written explicitly it would be 8/(2*(2+2)). The fact that computers (or calculators) do not understand what we are implying doesn't mean the implication is wrong, it means computers can only understand explicit instructions. Explicitly solving an equation with implied factors usually results in the wrong answer. There are not 2 right ways of doing the math, just some people running an implicit equation through a calculator without explicitly writing it out and getting the wrong answer. Claiming that 8/2(2=2) is ambiguously written is like saying quadratic formula is ambiguous because you programmed it explicitly in to your calculator and are getting the wrong answers. My keyboard doesn't have math symbols but in a calculator quad form is roughly x= ((-b+- root(b^2-(4ac))/(2a)). Written normally it is x= -b +- root b^2-4ac/2a or maybe x= (-b +- root b^2-4ac)/2a, but both of those give totally wrong answers from a calculator. Obviously quadratic formula is a constant and should not get differing results no matter what you were taught, this proves we must be smart enough to use our calculator correctly, not that calculators are infallible. Another example would be the equation "ab * cd". Solving that expression explicitly would have you do "a*b*c*d=x" when we know it is actually (a*b)*(c*d) because the () are implied, just as above. Your algebraic example using 2x/3y-1 is silly. In algebra there is always an implicit parenthesis around the 2x or 3y which is why (9a^2)/3a = 3a not 3a^3 as pointed out by Lennes in his 1917 article. The reason 2x/3y-1=11 on a calculator is because the calculator doesn't understand there is implicit grouping. Every parent understood the implicit grouping, that (2x)/(3y)-1 is the implied equation though not explicitly written as such. Only when you put in a calculator 2*9/3*2-1 do you get 11. But 2*9/3*2-1 would be written 2*x/3*y-1 which is very different from 2x/3y-1, but a calculator sees them as the same. This was proven when you had your calculus class do it, 2 of your students punched it in to their calculators, the other 58 did the math correctly. What this means is you need to teach those 2 students how to correctly use their calculators, not that there is some universal ambiguity. When programming quad form you must explicitly bracket all implicit grouping or it wont work, this is a limitation of software, not a flaw in mathematics. If there was any actual ambiguity the results from your calculus class would have been split closer to 50-50, statistically speaking its obvious there is strong consensus amongst calculus students as to the correct method. The math teacher who got 2x/3y-1=11 should be in a different field. My answer
thanks for your note. Yes, it is a very interesting topic, especially in connection with computers. You are right that with calculators one has to be even more careful and needs to put more brackets. One of the reasons, why HP calculators had a lot of success is because they used reverse polish notation allowing to skip many brackets. I was never in that HP camp but like you used TI calculators. The example 2x/3y -1 is not that silly. It is actually very interesting. Yes, you are right that every human reads it as (2x)/(3y) - 1 but a computer gives something different. I calculate it here with Mathematica, one of the most advanced computer algebra systems and it gives -1+ 2xy/3 not -1+ (2x)/(3y) (see attached screen shot). I also agree that the PEMDAS ambiguity is not a flaw of mathematics as it is often presented, it is just a matter of fact that some expressions need more clarity (meaning brackets) to be meaningful. What is a bit offsetting is that there are so many around who believe that there is a definite way and only their way is right. In the example 2x/3y -1 most people just naturally assume that this means (2x)/(3y) - 1 but according to some fanatics, there is only one way to see it right and that is what computers give you like -1+ 2xy/3. It is also quite amazing how long this discussion is still going on. But that makes it even more interesting. There is not only a mathematical or linguistic side, there is also a social aspect to the story. And as you mention as an engineer, it can be crucial. If one writes a program guiding a robot and overlooks something like that, it just does not work. I learned early on that programming something is the ultimate test of understanding. It is harder than to read or write or teach a subject. If a procedure does not work, it is proof that there is something, that one does not understand yet. After an other question about distributivity leading away from the main point: I tried to make the point that there is no correct or wrong in an ambiguous situation like 8/2(2+2) There are answers 1 or 16, depending on what rule you use. This is the reason why people continue to argue about it. The answer 1 is the answer most people get. The answer 16 is what most computers get. I tried to make this point from the very beginning in http://www.math.harvard.edu/~knill/pedagogy/ambiguity In my last email, I pointed out that it is not a problem with distributivity. The 2(2+2) is always 8, there is no dispute there. Again: the question is whether (8/2) is computed first and then multiplied with (2+2) to get 16 or whether 2(2+2)=8 is computed first and 8/8 =1 is obtained as a result. This is a question on whether the division or multiplication is done first. It is a matter of fact (an observation when looking what people write on the web) that there are some who believe one of the answers is right. There is no right or wrong here. The question is also not misleading. There is an ambiguity. The conclusion is that one has to write things down more clearly using brackets. And a follow up email: I think I may have made a break through. I accepted that as of current multiplication through juxtaposition has been taught as a higher order of multiplication or equal to all orders of multiplication. Thus 5/2x has been taught to mean (5/2)*x or 5/(2x) depending on your teacher. Thus the only solution is a clear rule defining multiplication through juxtaposition. How do we determine if multiplication through juxtaposition is a higher order or not? I think (though it pains me) that language and grammar may hold the key. But first, I have to ask about x*2xy? I have never seen anyone write something like that as x2xy or 2xyx or anything else, would it be correct to do so? If not, why? When I see something like this to me shows grouping implies parenthesis, not just multiplication, thought the result wouldn't be effected by them. to which I answered Some ambiguity can be avoided by juxtaposition, some can be done by ordering, but it remains still ambiguous, especially, if typed. You appear still to think that the PEMDAS ambiguity is an open problem which needs to be solved. It is not an open problem. It has been solved a 100 years ago when realizing that one just has to write more brackets in general. It had been a linguistic oversight. When writing the grammar rules for arithmetic, one has initially not realized that there were parts which require more brackets than anticipated. When using only multiplication, then the problem is not present. The reason is that there is associativity and commutativity of the product operation. Already the division is not associative nor commutative (3/3)/3 = 1/3 is not 3/(3/3) = 3 3/5 is not 5/3
July 13, 2020: A high school teacher pointed out to me the article Rethinking the order of operations in the Mathematics Teacher magazine from October 2017. She pointed out also a new acronym "GEMA" appearing in the classroom which stands for "Grouping, Exponents, Multiplication and Addition". Division by x is then seen as multiplication by (1/x). This approach has the effect that division is always done before. It does not address questions like 1/x/y or 2^a^b. One obviously wants to get away from the PEMDAS rule, but the ambiguities remain if no brackets are used. What is nice about GEMA is that it only provides rules which have never been disputed. Since mathematical notation has been invented, we always perform computations which are grouped before exponentiation and before multiplication and before addition. But it does not give a student a guideline what to do with 12/4/2 or 12^4^2 or expressions like 2x/3y-1 if x=9 and y=2. Also the above article "Rethinking the order of operations" makes things more confusing. It is an other opinion. There is no rethinking necessary if one remains clear. Pointing out that the order of multiplications, divisions or exponentiations need to be clarified in writing is the smartest more. Every student should be aware of the fact that expressions like 18/3*2 are often evaluated to 3 by humans (centuries of mathematical writing have entrenched this), while computers evaluate it as 12. The expression 12/4/2 is evaluated from the left to right while 12^4^2 is evaluated from right to left by computers. Also GEMA does not give any guide lines here. It simply remains ambiguous without additional clarification. No ``rethinking" rectifies this. Just use brackets and all the problems are solved. August 4, 2020: Just finished reading over your webpage regarding ambiguous equations. Imagine my surprise to learn that math convention does not treat multiplication and division equally. I actually majored in math for 3+ years (before coming to my senses) and tutored at the college level. I learned and taught that the mnemonic PEMDAS was actually PE(MD)(AS). Indeed, I taught my tutees to think of it as PEMA, since the nth root of x = x^(1/n), x ÷ n = x * (1/n), and x - n = x + (-n). Once they caught on, they were amazed at the pitfalls they avoided. Regardless, uncovering long held conventions, I wonder... couldn't the ambiguity be resolved such that a solution to the equation 8 ÷ 2(2+2) can be found? I should disclose that I was vehement in arguing that the answer was 16, although I ignored the ambiguity. After reading your webpage, the ambiguity is clear. However, my brother, a retired engineer with Honeywell, whose understanding of math supersedes even my own, also came up with the answer 16. Interestingly, his first, instinctual answer was 1. However, your reference to ISO 31-0 and the link to a YouTube video ("PEMDAS is wrong") sent me down the rabbit hole. Incidentally, I discovered ISO 80000-1 now supersedes ISO 31-0, fyi. Unfortunately, ISO 80000-1 isn't available for free so I had to resort to ISO 31-0 for specifics. A possible (the?) solution to this ambiguous equation requires knowing rules and conventions I suspect the majority of people are unaware. Specifically ... that the obelus (÷) violates ISO 31-0. Division is to written as "a over b" (using the fraction bar), "a/b", or "a * b^-1" (alternatively, "a * 1/b"). ( a product is to be written as "a b", "ab", "a * b", or "a x b". ) that when applying the rules of the AMS and APS, multiplication precedes division. ( that "/xy" is conventionally understood by mathematicians to mean "/(xy)"_ Solution 1: 8 ÷ 2(2+2) = 8/2(2+2) (to conform to ISO 31-0) 8/2(4) (per order of operations) 8/8 (per AMS and APS rules that multiplication precedes division) 1 Solution 2: 8/2(2+2) can be rewritten as 8/[2(2+2)] [per mathematical convention that "/xy" = "/(xy)", as well as due to juxtaposition, whereby "2(2+2)" could be seen as "2y", using substitution, and "8/2y" = "8/(2y)"] 8/[2(4)] 8/8 1 Many people state the problem is one of linguistics and/or grammar. I see it as a problem of translation and that it is the purview of the mathematician to translate the problem into common language. It is analogous to an immigrant hearing a colloquialism for the first time. Which reminds me of the Russian comedian, Yakov Smirnoff, who had a bit where he talked about odd idioms. He heard someone say they quit smoking cold turkey. He said, "what do you smoke, now, ham?" And so I now believe that a mathematician, applying international standards as well as the conventions of the AMS, can translate the equation and resolve the ambiguity. What do you think? Is my logic sound? ------------------------------------------------------------------- My Answer: Your example is a typical example, where people and machines get different things. If you feed it into a computer, it gives 16 [knill@knill11:] math Mathematica 12.1.1 Kernel for Linux x86 (64-bit) Copyright 1988-2020 Wolfram Research, Inc. In[1]:= 8/2(2+2) Out[1]= 16 I think most people get 1 due to training, PEMDAS and because in the math and physics literature, there is an implicit assumption to put the 2(2+2) together first especially with the obelus. The ambiguity can not be resolved by searching for rules, or AMS guidelines or ISO standards (especially if they are not available in the public domain) it is a matter of fact (and you confirm that), that we can get different answers. Many people on the web try to argue one or the other way. This is futile. What does it help if 99 of people argue one way and 99 of computers give answers the other way? Yes, and the obelus even confuses things a bit more as you indicate. There is no logical way to solve an ambiguity. That the definition of an ambiguity. There is no clear standard and if there would be one, it has not been adopted universally. The only way to resolve the problem is to put brackets. August 8, 2020: Here is an insightful comment from Elias Martenson from Sweden: I was reading your article on the order of operations, or as you call it "the PEMDAS rule". One thing that, if mentioned, is not immediately obvious is that when you say that the "pemdas rule has been taught to millions of students", you are specifically referring to students in the US. I was taught maths in Sweden, and there we were taught that there were three levels of precedence: Exponentiation Multiplication and division Addition and subtraction Parentheses aren't really mentioned, because there is no ambiguity there. Other than to explain that they can be used to override the default rules. I now live in Singapore, and my kids go to local school here. I just checked with them, and they have indeed learned the same way as I was taught. In all programming languages that I know of, as well as the mathematical software I have tested, I note that they follow precisely this rule. The "PEMDAS" rule seems to be a way to make something rather trivial into something complicated. In addition to this, it also ends up teaching it wrongly, since if one insists on using it, one would have to write something like: PE[M/D][A/S] to clarify the equivalence within the groups. Just reading it outright gives the student the impression that multiplication should somehow be performed before division in all cases, which is rarely true. I say "rarely" here, because I do agree with you that there are certainly cases it makes sense to do the multiplication first, such as your example 1/xy. That said, if you write it as 1/x y it's not so clear anymore which implies that spaces are significant. As a software engineer who is also studying physics in my spare time], I frequently get annoyed with the lax notation in maths. Not just the issues with horizontal writing (as is the topic of your article) but also proper typeset equations using LaTeX. Authors tend to use shorthand notation, reuse symbols, etc, which means you have to have context in mind when figuring out what is happening. This is a type of problem I would have hoped were limited to the field of linguistics rather than mathematics, the only scientific field where something can be proven with certainty. Finally, I'd like to add that the reason I have spent too much time thinking about this is because I've been working on a new interface for Maxima (a symbolic maths system) which represents the programmatic forms in mathematical notation, which means I have to make it completely non-ambiguous. If you're curious, here is a demo video. My answer: thanks for the insightful comments. For me it is similar, from Switzerland, where we were not taught the explicit PEMDAS rule. Still, I would still maintain that millions have been taught PEMDAS. I agree with everything. Especially when working also with mathematical software, the need for precision and non-ambiguity has become more and more important. The topic is not only pedagogical, one can make serious mistakes. Not only by doing wrong computations but also by using results which have been stated in an ambiguous way. It would be interesting to know, how many students in Singapore or Sweden would read say 8/2(2+2) as 16 and how many would read it as 1 especially if the division is given as an obelus. I would predict that most would give the answer 1. This is because I teach often students from all parts of the world (This summer also 2 from Singapore by the way) and that questions about PEMDAS often pop up, if one is not super clear in writing (even when writing expressions like 1/x+3, there are still students who read it as 1/(x+3) or are confused and ask. I started to even clarify such things by writing (1/x)+ 3 or using a horizontal fraction notation \frac{1}{x} to make sure that one reads it correctly. Added August 24, 2020: Good day! I hope you are doing well. Very recently, my colleagues and I had several heated debates about the problem 8 ÷ 2(2+2) or the likes. As you would expect, there are people who answer this as 16 and people who answer this as 1. As for us, we are in the ambiguous camp. The people who had a unique answer to the problem keep citing PEMDAS, or BEDMAS, or PE(MD)(AS). And we told them that the convention is not universal. So we tried looking for documents to support our side. And then we found your article. I've read everything. I am amazed that you are so patient in responding to people sending you emails, and giving them same answers, repeating your explanations over and over again. Anyway, I just emailed you to let you know (in case you haven't seen it yet) Section 7.1.3, p.23 of ISO 80000-1:2009"
"These procedures can be extended to cases where the numerator or denominator or both are themselves products or quotients. In such a combination, a solidus (/) shall not be followed by a multiplication sign or a division sign on the same line unless parentheses are inserted to avoid any ambiguity."
Also, Example 1 following the paragraph should settle all this debate. Thank you for taking time to read my email. My Answer Thanks so much for the feedback. The ISO reference is very valuable! It has been pointed out before but unfortunately, that part of ISO is not publicly available. One has to purchase the standard. I actually happened to have access to the relevant pages from Section 7.1.3 of ISO 80000-1:2009:
Added January 16, 2021: An email: Following a heated online discussion I was forwarded to your website http://people.math.harvard.edu/~knill/pedagogy/ambiguity/index.html. From what I read there, you seem to blame the confusion on the used notation. While I agree that this may confuse people, I would like to present a more universal explanation for this problem based on using (or not using) simple axioms of algebraic structures. The notation then becomes more or less irrelevant. The given equation 6:2(2+1) seem to have multiple answers, which appears illogical on first glance. But I think some people just forget to decide about the span of definitions they're working in. With simple arithmetics, multiplication and division are equally ordered and have just to be executed before addition/subtraction but after calculating brackets and exponents. That's where PEMDAS or other mnemonics come from. This just works from left to right and is correct in it's own simple context. Sequential input calculators do it this way. But when assuming the context of formal algebraic structures, in this case a field of rational numbers, additional axioms apply. Now, "distributivity" and "associativity of addition and multiplication" (among others) are defined as basic axioms in the context of this field. With that, the order of operations now is far more restricted by those properties. In this context, the equation 6:2(2+1) can be transformed as following: 6:2(2+1) = 6:(2+1)2 // Associative property of multiplication (just to prove the point by using this field axiom): ab = ba; division is non-associative = 6:(4+2) // Distributive property: ab+ac = a(b+c) = 6:6 // Order of operations (now trivial), "brackets before exponents before multiplication/division before addition/subtraction" = 1 Respecting all axioms of a field structure, the division now has to be solved by calculating first the dividend and divisor side separately, then the quotient. Any other way violates one of the basic field axioms and would be invalid in terms of this field. More sophisticated calculators are programmed to respect this. However, if not restricted to the context of those axioms, other results may be valid as well (i.e. 6:2(2+1)=9, with a sequential calculation on a basic arithmetic level). So, in my view, it's not a problem of notation, but in giving the context and thus the defining axioms. Knowing the used tools and their assumptions respective abilities/restrictions - as always - is important. By the way, students in Germany learn the mnemonic "KLAPPS" (KLAmmer, Potenz, Punkt, Strich) before higher algebra, which thankfully ignores any suggested preference of multiplication/division ("Punktrechnung" = "point calculations" from the "point" characters used in German calculation '.'=Unicode U+22C5 for multiplication and ':' for division) and addition/subtraction ("Strichrechnung"="line calculations", from the "line/crossed line" characters '+' and '-'). This lack of sequence suggestion seems to prevent the confusion in higher classes, at least a bit. Thank you very much for your time reading this. I'd appreciate to hear from you, especially if you can't agree with my conclusions. Mathematics surely isn't my strong point, but I'm just learning this stuff again with my son's homeschooling activities (thanks to COVID19 lockdown) and still seem to remember some of my former computer science math lectures long ago. Best wishes from Bavaria/Germany! Bernhard Nowotny, M.Eng. My answer: That is an interesting angle. I especially am grateful to hear about the German KLAPPS rule. I went to school in Switzerland and have not seen that. Rules also need to stick with students and KLAPPS is a good name. Interesting that it does not address the PAMDAS ambiguity. Your suggestion to solve the ambiguity might well work, but the problem is more socio-linguistic than mathematical. There are already different standards around. I don't know about introducing a new one XKCD said it best. February 22, 2021: Vic: You wrote that PEMDAS and BODMAS are ambiguous. I disagree. I have a masters in math and have been teaching math for 30 years. You gave a question using a division symbol /. I find this symbol for division confusing and never use it. I find it interesting that even though all calculators gave the answer as 11 to your initial problem you seem to think that they should what - give an error message? The answer is 11. There are no brackets and I have no idea why you think you can insert brackets willy nilly. People get it wrong because they do math by patterns instead of thinking "What are the rules here". My answer: thanks for the feedback. You can disagree of course. I have given many reasons on my page why there is an ambiguity. Many students give the answer 2 and not 11 in the initial example. If you read my text, you see that ambiguity does not mean that there is an error message. In most cases, the disagreement comes from the lack of standard. The professional references given in my page confirm that there is no standard. Putting brackets can not be placed "willy-nilly", they are placed to make things clear and remove the ambiguity. As you are teaching, why don't you make the experiment and ask students what they think when they have to evaluate 2x/3y -1 for x=9 and y=2. Most humans give the answer 2 as they bracket 3y as inseparable (quite a few teachers have confirmed that). This is also the standard many books follow (especially if they adher to earlier professional standards like the AMS or rules like PEMDAS which are often taught and put multiplication before division. Cojori, today still the most authorative figure on mathematics notation wrote already in 1928 "If an arithmetical or algebraical term contains / and x, there is at present no agreement as to which sign shall be used first." This is still true today Oliver and a follow up by Vic PEMDAS does not put multiplication before division. They go in order left to right. Just because students put 3y together as inseparable does not mean the students are correct. They make an assumption. . What books agree with the students? I have never seen any of these books. / means division. There is no other interpretation. So you are saying that PEMDAS is not a universally accepted rule? So an expression like 2/3 + 5/8 x 7 can have many different answers depending where you put the brackets? My Answer: One would read the second part as 5/56 and so get 127/168 while computers read it as 2/3+ (5/8) 7 = 121/24 (actually not all computers but most, some calculator generations gave other results). PEMDAS as understood for decades was always understood in the sense MD meaning Multiplication before Division. There was also PEDMAS. More recently, one sees things like PE(MD)AS with the footnote that MD can be interchanged but that one reads it left to right. There are quite a few fanatic prophets out there one on the web. Of course, one can establish like this a new standard but it flies into the face of hundreds of years of practice and most books use things like 3m/4s meaning (3m)/(4s) and not (3/4) m s or write Q/mc^2 for Q/(mc^2) and not (Q/m) c^2. You say you divide a cake to 2 people meaning cake/(2 people) and not (cake/2) people. It is often, especially for established formulas that we naturally take them together. A popular example is 1/2pi because 2pi often is a standard unit by itself. Most people read it as 1/(2pi) but a computer reads it as pi/2. The former 1/(2pi) agrees with writing guiding standards which have put forward by AMS or APS. Vic again: If 2x/3y means 2x/(3y) how do we write the expression 2 times x then divide by 3 and then multiply by y? My Answer: The example 2x/3y is a typical example which most people read as (2x)/(3y). A computer reads it as 2xy/3. One would write (2xy)/3 or (2/3) xy or simply 2xy/3 if one wanted it to write it as a computer reads it. This is non-ambiguous then also in general and nobody can misinterpret it. February 23 2021, James: I am thoroughly enjoying your article (I guess I would call it that). It caught my attention because I have started seeing work from students who are plugging entire expressions into their calculators that reflects the discrepancies discussed in your article. One thing that I will note is regarding the example of 18/3*2, to which you state that most humans will arrive at the solution of 3, while computers arrive at 12. Immediately after seeing the expression, I calculated the solution to be 12. My reasoning being that I read this as eighteen-thirds times two. I chalk this up to my frequently working with fourths, thirds, and halves outside of work and, whenever I see "/" I immediately think of a fraction rather than an operation. More evidence to support your argument about ambiguity in mathematics and the need for clarity in expressions. Again, thank you so much for the enjoyable read. I'm looking forward to exploring the rest of your site. My answer: thanks for the feedback. Yes, it is a very interesting story. It seems very much also to depend on how one writes it. Often, in the scientific literature (as well as some guides from the AMS or APS), it is pointed out that one should read things like a/bc as a/(bc) and not (a/b)*c. The reason is also that often, products are read by humans to belong together. If you take 18/2π then most people read it as 9/π and not as 9π (as a computer does). One only can guess, but I suspect that this was the reason to build PEMDAS (the most frequently used acronym) and not PEDMAS or PE(MD)AS (which must come with the footnote that MD are equivalent and read from the left). The later can hardly be taught. Already PEMDAS is a hard sell (many Harvard students even get the basic PEMDAS wrong, and read + before *. In pedagogical matters, one always over estimates what complexity people can learn. Setting now a new standard like PE(MD)AS (they appear now in schools already) also has a problem that many texts would be read wrongly. If an expression belongs together like RT in thermodynamics or mc2 in physics. Back to your example: 18/3*2, yes, I guess many would read it as 12, but if you write 18/ab with a=3,b=2, most would read it as 3. Funny, how human psychology, linguistic and history as well as math come together here. That makes the subject so interesting. February 28, 2021: a nice new example:
I am a middle school math teacher at a small Catholic school. I recently came across the attached problem (#12) in my 6th grade spiral review program. It is similar to the question you pose, however it uses a division sign instead of "/". I posted it on a math teacher group I'm a part of for middle and high school math and HOLY COW! It has started quite the debate/argument. There are those adamant that the answer is 6, those adamant that the answer is 24, and those that are adamant that the answer could be either. Of course, every group thinks they're right! Your article was posted multiple times on the thread. I have read the vast majority of it. I am curious if you see any difference in the ambiguity of the attached problem with the difference in use of symbols or if it remains as much of an enigma as the problem you shared. Thank you so much for your time!
My Answer: Thanks. This is very valuable to hear about because it confirms that the only way to avoid such discussions is to be super clear and add brackets. I added it to the collection. The good thing is that everybody in your teacher group are right. There are strong arguments to group 2c together because this is often used in the literature, there are strong arguments to do division first because this is what most computers do. And then there is a strong argument that both are right. But who ever wins the argument would still face the dilemma to grade this ... And then face the storm of students, parents and other teachers who are upset. I will just cover algebra in my math for teaching course and can mention this March 4, 2021: the social media discussions still seem to go on: I got the following email: I was wondering about this equation. 6/2(1+2)=? My answer is 1. It's because I believe that 2(1+2) is a whole number. Another example is 9/3(1+2)=1 also Where 9/3(3) which can also be written as 9/3^2. If so PEMDAS RULE SAYS Exponents is 2nd. So my question really is Exponents are also form of Multiplication so why is it now M is same as D on the equation where it is now changed to PE (M or D left to right) (A or S left to right)? In my math years Multiplication is third because Exponential and Multiplication is the same. Also when we simplify 6/9 simplifies as 2(3)/3(3) we can't simplify this as answer of 6 when it should be 2/3. Here is a new one on social media: 24/4(8/4) and my answer is= 3. Some says it's 12. After what I have explained above. What is your answer? Thanks in advance. My Answer: The case 6/2(1+2) is now a classic. Most people get 1. It is not because it is a whole number but because 2(1+2) is seen as a unit. Most computers get 9 because (M and D) are evaluated on the same level. I have not seen the new 24/4(8/4). You have got 3, what most people get. Millions of them because it is entrenched in PEMDAS rules (M before D) and because it is often written in books as such. Most computers get 12. There is no right or wrong answer here. The question is just posed in an ambiguous way. This has now been known for 100 years. It is interesting that the social media still hum about it. But that makes it interesting and aware. I wrote a short summary with sources in this document for a course I'm teaching right now Obviously things are not clear on a much more basic level. The following email illustrates confusion which even stellar students can have. It appears to be difficult even to get through the fundamental properties of PEMDAS like exponentiation before multiplication and division and parenthesis before which are completely undisputed. I always thought that when there's an X next to any number they are considered a whole number. Also, when 9/3^2=1; how is that different from 9/3(3) if they both are the same? Also, I ask somebody if the equation was 6/1(1+2). He answered 18. Then I ask what is 6/(1+2). He said 2. Aren't those equations the same? My answer: You bring up various different things. First of all, the discussion does not depend on whether X is a hole number or not. The rules do not depend on whether we work with integers or real numbers or any other number. If you write 9/3^2=1, then this is unambiguous because exponentiation comes before the other operations. If you write 9/3(3), then this is ambiguous because it can be read as (9/3)(3) = 3*3=9 or then 9/(3(3)) = 9/9 = 1. The case 6/1(1+2) is an ambiguous case because it can be read as (6/1) (1+2) = 18 or 6/(1(1+2)) =2. It is the situation we were talking about. No, 6/(1+2) is not ambiguous. It is clearly 6/3=2. There is no discussion about this case because parenthesis are done before. March 13, 2021: I'm a technical writer by profession, so concise, precise communication is something of a passion of mine. I also majored in mathematics as an undergraduate, so this discussion was right up my ally. Thanks for maintaining this page. It was an enjoyable journey. As mentioned by one emailer, where possible, I prefer typesetting engines, e.g. LaTeX. Why anyone wouldn't write $\frac{2x}{3y} - 1$ (or something similarly robust) if they have the option is irksome to me, but that's part of the philosophy of my profession. I take on the time and cognitive burdens of clearly explaining something to minimize the effort readers have to expend in understanding it. A separate emailer mentioned the use of the division sign or obelus: ÷ (LaTeX: $\div$), which made me realize, I don't evaluate ÷ and / the same way. I assign different mental probabilities to the different interpretations. If I were handed a document that contained a÷b(c), I'd, first, curse the author and hunt for contextual clues. If I found no clues, I'd note that they took the time to use a character outside the basic ASCII set. That tells me they were possibly-maybe probably-deliberately avoiding the notoriously, obviously ambiguous slash. So I think "What would the most common, laziest, knee-jerk interpretation of that equation be if the author had used a slash?" That's probably the interpretation they were trying to avoid. One piece of context sometimes available to me in deciding how much effort they put into avoiding the slash is what device they're using. Typing ÷ within macOS is trivial (Alt + /), but typing ÷ on an iPhone requires either copying and pasting or switching to a separate, third-party keyboard. So that's my input! It's more of a behavior-driven approach: the amount of effort it took for the author to type something might suggest their intended meaning. Yours geekily, Nik My answer: Hi Nik, nice points. For me also, it is that when I write latex formulas in the text and not displayed, I'm tempted to use a/bc rather than \frac{a}{bc} because it fits better into the page. Since I'm aware of this PEMDAS wars, I myself do no more hesitate to sacrificing beauty if it can increase clarity. This is for me as a teacher especially important in exams. The use of division sign, obelus and slash is all over the place. I also learned, especially from teachers, that for them the obelus is used differently and that it is a stronger division. I myself try to avoid the obelus. I'm only aware having seen it early in primary school and have not touched it since. Yes, clarity needs some effort, sometimes also needs the sacrifice of some elegance. But we know that from language also. There are many expressions which become clear only in context. The answer definitely is redundance. Even the language of our genome makes use of redundancy to avoid communication errors. Oliver April 5, 2021: from Jeff: Wouldn't these 3 counter examples end the debate? 1 = 6 ÷ 6 = 6 ÷ 2(3) = 6 ÷ 2 × 3 = 9 2(3) = 6 and (3)2 = 6 but 1 / 2(3) != 1 / 3(2) 1 ÷ 3! is now 2/3 ? Or 6 ÷ (2 + 4) 6 ÷ 2(1+2) 3 ÷ (1+2) So wrong Lol My Answer: yes, these are all good examples illustrating the ambiguity. The 2(3) is a new twist. Usually, one illustrates the point by defining a=2, b=3 and then write 6/ab. I like also the second part because especially factors 2 are often more closely linked by humans to what comes beside. Terms like 2pi are often read as a unit and 1/2pi which is often done and where very few readers would interpret it as pi/2 like a computer does. Mathematica: In[1]:= 1/2Pi Out[1]= Pi/2 June 17, Stephen, After yet another "MindYourDecisions" video popped up on my YouTube feed (the 6/2(1+2) one), I went searching for when PEMDAS was taught as an acronym, or more succinctly, when it became PE (MD) AS as the author of that vlog insists. That author also implies that PEMDAS with multiplication before division was last advocated in 2017 and therefore is archaic. And I fount your web page referenced in my subject line. Very interesting, and I found your views align with my own. I don't know your age, but I am old enough that I think I know where all the ambiguity comes from. In a word (or three), calculators and computers. I started school in Hong Kong and then moved to the US after third grade in 1968. I was taught in accordance with what you quote from Cajori's book, but never memorized any acronyms at all about order of operations. There were never any "trick" questions of the sort presented in viral videos. And notations for problems, once we had all learned the ground rules, were always understood uniformly by all. We also did homework and tests entirely by hand, written in pencil or pen on paper. In high school, a computer was something which was programmed with punch cards, in Fortran or COBOL. BASIC wasn't out yet. The first calculators came out while I was in high school, and the first reverse Polish notation calculators arrived my senior year. It didn't really matter because they were banned for use in school on tests, both in high school and in college. We could use slide rules though. Later, while I was in postgraduate studies, personal computers were invented and developed rapidly, and calculators that could do more than asmd and memory became widely used. It was then that issues came up with differences between what happened when you punched calculator buttons in the order an equation or expression was written versus what happened when you did the problem in your head or by hand began to be noticed. We dealt with it by learning our way around the calculator so that we got the same answer we had always gotten by hand. I have a feeling that where this "ambiguity" really came to the fore was with the advent of computer programs and calculators which allowed you to enter expressions the way they were written, and the advent of a computer telling you the answer, along with the acceptance by schools of the use of calculators and computers to do your tests for you, that this ambiguity became something everyone began arguing about. Everyone now assumes that the computer is always right. Apparently the acronym GIGO has been long ago discarded. But the computer is only computing the way it was programmed to, and as you correctly say, it makes no inferences or exceptions to its hard and fast acronyms, thus destroying the ability for everyone to understand a mathematical expression the same way--unless we all discard the convention of the last 100 years and embrace the new convention of the way computers are programmed and the acronyms promulgated by the sycophants who subscribe to that way of thinking. What we are seeing now with these "gotcha" problems and vlog experts is that young people who have grown up with mature computer technology already existing have turned their acronyms into something they were never meant to be, because, "that's how the computer does it, so it has to be right." They've never known any world except one in which tests are taken on computers and limited by the keys on a standard keyboard. But except perhaps for the newest generation of young students who don't even go to the classroom any more, but instead play games on their phones while muting their camera on the Zoom classroom, or those young collegians and graduates who were taught by a modern PE(MD)AS or BEDMAS evangelist, the vast majority of people get the original correct answer, even to ambiguous expressions, as you have found from your experience. Anyway, those are my thoughts on the subject. My answer Hi Stephen, thanks for your thoughts. Very much to the point. The difficulty indeed flared up due to the use of computers. I think I have seen this video log. It was a couple of years ago popular. It is indeed a good observation that trick questions somehow get a lot of attention and become viral. The G7 summit reminded me about the St. Ives Problem (As I was going to St. Ives, ....) which is an ancient trick or gotcha question: an uninvited intelligent reader starts to calculate but the ``correct" answer is different. The St Ives riddle is a great example because it is ambiguous. When I saw the riddle first, I imagined that everybody would walk to St Ives, also me and that I would just pass the man, wives, cats, sacks and kit. All because I would just walk faster. ``Meeting" does not mean that we have to walk in opposite direction. These days, the PEMDAS story can make for a great discussion lecture in an algebra course. I myself in an algebra workshop for teachers used it here. The subject actually produces interesting discussions. It makes aware that one should avoid such ambiguities at all cost in exams. The solution to the problem is extremely simple: ``Just be clear. Be even redundant when asking questions". Yes, the advent of computers made the problem surface. It is really a linguistic phenomenon in a society where intelligence is both human and artificial and we expect humans to be syntactically 100 percent. And as you state, the actual problem is that some prophets advocate that there is a ``correct answer" or that ``one has to fix this". The "garbage in garbage out" picture is a very good one and a nice analogy. Maybe that is the best way to think about: language is a tool to communicate clearly. Ambiguities produce garbage. If one feeds a garbage question, one can only expect a garbage output. For me, garbage is also syntactically correct stuff which by a large part of recipients is understood wrongly. The Ives riddle is a ``garbage riddle" and that it is so, is just the reason why it became so popular. One of the best way to convince somebody that things need to be ``clarified" with brackets rather than ``fixed" is the exponentiation case like 2^3^4 It is a situation where different programming languages can give different answers depending on whether one interprets it as (2^3)^4 and 2^(3^4). There can be good arguments for both and most computers start evaluating from the right which is the second version. It is interesting that for such cases, there is no viral phenomenon because it is too obvious that it is ambiguous. In the viral pemdas stories on social media, things have flared up exactly because of this ``gotcha" effect and the almost religious quest to ``fix" this. The fact that these Vlogs from 5 years ago have created so much hype is a proof that the mechanism works Oliver An additional interesting remark by Stephen: Thanks for the thoughtful analysis and response. After I wrote to you, I continued searching for the origins of acronyms for order of operations. Although the evangelists of viral fame imply that they were in use back to 1907 or so, I found this which analyzed textbooks looking for PEMDAS as an acronym. They found that it was not until the mid 1980s that the acronym was found and taught as an acronym and the associated mnemonic device in textbooks. This apparently was shortly after the acronym was found in study courses for the standardized exams, which became popular in that decade. I would submit that this lends support for the theory that PEMDAS as an acronym only began being taught after computers began to enter common use. It was most likely the programmers who introduced it because they would have to program their calculators and computers to handle entered expressions. Blindly following operations left to right and giving hard and fast rules about handling multiplication and division equally left to right, and no association inferences, would make the programming much simpler to write, and require less memory--which was in very short supply those days as you had to be able to run the whole computer on one 5.25" floppy holding 360kb of data and pretty much zero RAM. Order of Operations is a convention. Basically, it was standardized around the turn of the 20th century by the authors you have cited, and everyone pretty much operated by the same convention until computers and calculators came on the scene. Because of limited computer capacity at the time, programmers developed a much-simplified order of operations for their calculators to be able to handle variable expressions and solve them. I believe this was what essentially tried to force a change of convention on the order of operations, to make everyone change their practices to conform to the computer's compromised ability to understand variable mathematical expressions. That we still find the majority of humans using the original convention tells us the machines haven't fully taken over yet. Or we're all resisting the Matrix. A remark from Kevin (September 13 2021) I'm a C programmer, so * and / have the same precedence, as do binary + and -, with left-to-right ordering, so effectively we have ( BO) > (M or D) > (A or S) i.e. neither multiplication nor division are "done first", you do them sequentially in the order they are written. And similarly for addition and subtraction. You've covered that before. However, my contrary thought is what is meant by "2x" and "3y" in your apocryphal sum "2x/3y-1", because there is NO OPERATOR between the numeral and the variable. This conventionally means "multiply" but I would argue that this zero-length multiplication operator has HIGHER precedence than the * operator. Thus your problem can be re-written (2*x)/(3*y)-1 and then C, Java, Perl et al will give the answer 2 when x=9 and y=6. The acronym should be corrected to BOZMDMAS where ZM is the zero-length multiplier operator. The ZM operator intuitively has higher precedence than even the exponential operator, because it is obvious that 2^3x*4y = (2^(3*x)) * (4 * y) or it would be obvious if "^3x" was written as "3x" in superscript, which after all is just a typographical short hand for the ZE (zero-length exponential) operator. I hope this contribution adds to your enjoyment of this timeless conundrum. My reply: Thanks for the original addition. I like the word BOZMDMAS. Would be fun teaching it! Apropos programming languages, most don't allow things like 2x. Computer algebra systems are smarter and allow both spaces 2 x or just 2x or 2*x. This is actually quiteinteresting because 23 or 2 3 are different. While I like your modification, good luck teaching it. Many students do not even honor the basic multiplication before addition rule which is undisputed. Oliver A remark from Nathan (September 26 2021) I read through your page on Ambiguous PEMDAS, and I found something that is wholly incorrect. No, it's not in mathematics; I'll recluse myself from that, thank you very much. In the comments section, you refer to Stephen as commenting that PEMDAS wasn't around "back to 1907 or so", wherein he referenced this article, dated Friday, March 6, 2009, entitled "PEMDAS: Terminate With Extreme Prejudice". I've read that particular article, and I haven't found a reference to any analysis of "... textbooks looking for PEMDAS as an acronym." Maybe he referenced the wrong article, maybe the comment was removed, or maybe Firefox's edit and search functions are missing an occurrence of "PEMDAS". If that article claimed that their analysis' found that PEMDAS "was not until the mid 1980s that the acronym was found and taught as an acronym and the associated mnemonic device in textbooks", they need to use a larger sample of textbooks. Their date of "the mid 1980s" is contradictory to your comment that "But since 1917, the PEMDAS rule has been taught to millions of people." Alright, I'm being picky here. Let me throw in my 2-cents worth: I graduated highschool in 1975. We learned PEMDAS in school, long before we graduated. I'd love to find that article; not to be contrary, but I believe that it would be humorous to read just how they went about their sampling. Sincerely, Nathan My reply: Hi Nathan, thanks for the valuable comments. I must say that I do not know when PEMDAS first emerged. Yes, there was one comment which claimed that it is since 1907 but you are right that this article from 2009 does not back that up. It is an interesting historical question, who first came up with the acronym PEMDAS or similar acronyms. I have passed high school a few later than you but also for me (in Switzerland), no acronym was taught along for the rules of arithmetic. We just learned "multiplication and division" before "addition and subtraction" and to avoid ambiguities by placing brackets. Oliver A remark from Louis (September 29, 2021) [PDF] My Answer: Hi Louis, thanks for the contribution. I would not call things right or wrong which are ambiguous. Your initial answer of 6/2(1+2) = 1 was actually the most natural answer. It is not the answer a computer gives who uses the PEMDAS (left to right) rule as you describe it but what most people do, especially also if you were taught so. Actually one has tested it and the huge majority of humans interpret such expressions as you did. You try to rectify something which can not be rectified for any practical reasons. Even if you were a government and put a document making it the rule of the land, the majority of students would still interpret it differently. It does not matter how one wants to ``rectify this", it is a linguistic ambiguity which will be misunderstood by a large part of the users even with new rules. The solution to the problem has been given already 100 years ago by make it unambiguous by putting parenthesis. Math teachers know that even the most basic rule of putting multiplication/division before addition/subtraction is misunderstood. The right thing to do is to acknowledge that and to avoid expressions like (3/4+5) and make it clear with (3/4)+ 5 or use typesetting with horizontal division sign which can not be misinterpreted. There are lots of other things which are often understood differently. For example, 2 3/4 is often understood as 2+ 3/4 but mathematically, it means 6/4. In many school textbooks, expressions like 3 1/4 which you have on the bottom of the second last page would be interpreted as ``three and a quarter" meaning 3+1/4 = 13/4. I just added this as an other example on how mathematical notation has historically grown to be ambiguous. Where language could be misunderstood, it is important to be even redundant and over clarify. I have a few sources in my summary article https://people.math.harvard.edu/~knill/pedagogy/ambiguity/ambiguity.pdf which sites experts in the field and confirm that we deal with a problem in linguistic. Oliver November 8, 2021: Nigel sends me this screenshot from a youtube comment. I have not seen the video. Nigel: Recently I've fallen into the rabbit hole of this ambiguity case where there can be multiple answers to a specific question. Looking through youtube comments, I discovered this gentlemen who explains it in a way which is supposedly contradictory to your case study. I've attached a image of his analysis on the topic and humbly request you to explain into further detail. My Answer: Short explanation: The algebraic convention like 6/2y clash with other rules like the (6/2) y =3y (the result a computer gives) is exactly the point. It often happens that 2y is read as a unit. This is why the expression must be considered ambiguous. Let me explain things a bit more detailed as you ask for it. 1) You must first realize that the expression 6/(2y) is different from the expression (6/2)y. In the first case you get 3/y. In the second case you get 3y. Ok? 2) Once you have realized that there are different expressions, you have to find out which one is the right, if one just writes 6/2y. Right? How does one find this out? One has to search for rule books written down by humans and to see what has been decided. 3) The problem is that there are different rules and that these different rules do not give the same answer. Lets look what has been said: -------------------------------------------------------------- A) There is the famous PEMDAS which treats multiplication M before division D. This gives the first answer 6/(2y) = 3/y. PEMDAS is what has been taught for decades. B) There is the BEDMAS rule which treats division before multiplication. This gives the second answer 3y. C) There is the PE(MD)AS rule (followed by most computers) which treats multiplication and division on the same footing but looks at the order. This gives the second answer 3y. D) There are writer rules like one given out by the American mathematical society which urges not to use too many brackets and read expressions like most humans do. This gives the first answer 3/y. One has tried it out (and I have tried it out with students): most humans read 6/2y as 6/(2y)=3/y. This is again the first answer. ---------------------------------------------------------------- 4) Ok, now we have looked at the rules or conventions and seen that they disagree, we want to look what textbooks, linguists, experts in mathematical notation say. (see "Ambiguous Pemdas" [PDF]) is that the expression is AMBIGUOUS. It can be read in different ways. There is no right or wrong because there is no accepted rule. 5) Now, if you look at the discussions in social networks and youtube videos, it is quite common that somebody comes up with a new rule or new suggestion to ``solve" the ambiguity. This does not help as it just adds more options to A),B),C),D). One picture explains this well in this cartoon. It is a case for "competing standards". If there are competing standards, the solution is not to come up with a new standard. The solution is to AVOID the ambiguity. In the mathematical expression under consideration this is done BY PUTTING BRACKETS. This solves the problem once and for all. It is funny that this is the recommendation was put forward already 100 years ago like by Cajori, the one who wrote the first serious textbook on mathematical notation. I just stumbled upon a intelligent remark by George Bergman from Berkeley. By the way, Gorge Bergman has made Many photos in the Oberwohlfach collection. I agree 100 percent with the following citation: "From correspondence with people on the 48/2(9+3) problem, I have learned that in many schools today, students are taught a mnemonic "PEMDAS" for order of operations: Parentheses, Exponents, Multiplication, Division, Addition, Subtraction. If this is taken to mean, say, that addition should be done before subtraction, it will lead to the wrong answer for a-b+c. Presumably, teachers explain that it means "Parentheses - then Exponents - then Multiplication and Division - then Addition and Subtraction", with the proviso that in the "Addition and Subtraction" step, and likewise in the "Multiplication and Division" step, one calculates from left to right. This fits the standard convention for addition and subtraction, and would provide an unambiguous interpretation for a/bc, namely, (a/b)c. But so far as I know, it is a creation of some educator, who has taken conventions in real use, and extended them to cover cases where there is no accepted convention. So it misleads students; and moreover, if students are taught PEMDAS by rote without the proviso mentioned above, they will not even get the standard interpretation of a-b+c. Should there be a standard convention for the relative order of multiplication and division in expressions where division is expressed using a slant? My feeling is that rather than burdening our memories with a mass of conventions, and setting things up for misinterpretations by people who have not learned them all, we should learn how to be unambiguous, i.e., we should use parentheses except where firmly established conventions exist." From December 3rd 2021: (only the first part of the email is displayed) I will state up front, I am in the MD, or AS, being equal in priority and done left to right however. I think implicit multiplication should be a special case Implicit multiplication includes both coefficients and their follower(s) Coefficients first use is circa 1715 or so I read, a FYI. Implicit multiplication also includes an integer or variable in front of a parenthesis, ie distribution. It could also be assessed as a coefficient and a follower I believe IM logically has a higher priority than MD, but less than E Why? E=mc^2 = m(c^2) But does not equal (mc)^2 In PEMDAS, it would be placed here P E IM MD AS I think most globally accept that MD and AS are equal in priority Although you have shown there are exceptions of those who haven't I have seen on social media that some currently believe M must be done first, but it's very rare. Factorials are also not mentioned in the mnemonics but do have a place in order of operations Do you know what it is? Is it taught? Is it shorthand for implicit multiplication? Or shorthand for a different function? IOW a linked set of factors that produce a standalone product, similar to implicit multiplication but different? My reply: Hi Charles, it is an interesting new angle P E IM MD AS One of the main difficulties with that is how to recognize implicit multiplication. We use shortcuts like 1/2pi rather than writing 1/(2pi) but somebody might read it as (1/2) pi. The implicit multiplication is sometimes used and was encouraged at a time when typesetting was more expensive to do. It can be found in many places. It is an ambiguous notion unless one specifies in each case, whether one deals with implicit multiplication or not. One would have to use a new notation for implicit multiplication. About factorial: this is universally done before anything else. Again, one could be tempted to make a rule out of it and say F P E IM MD AS I can only reiterate that producing more complicated rule sets or adding an other conventions does not help, as it just produces a new standard https://xkcd.com/927/ Oliver From January 3rd 2022: I came across your page discussing expressions of the form 8/2(2+2) and questions like "what is 2x/3y-1 with x=9 and y=2?" I have read much of it and scanned the rest. Since the most recent entry is only about a month old I feel comfortable taking the liberty of sending this email. I believe that my own thinking on the topic has been much clarified by explicitly introducing the concept of grouping. That is, in PEMDAS or BODMAS or any of the variations thereof, the P or B should be generalized to G for grouping. Notations that indicate grouping include parentheses (aka brackets), the absolute value sign, the radical, and the horizontal bar that indicates fractions when mathematical expressions are properly typeset. With that in mind, the different interpretations of expressions like 2x/3y can be resolved by agreeing (or not!) that an expression like "3y" is considered to be "multiplication by juxtaposition", and that multiplication by juxtaposition is a form of notation that indicates grouping. This would make expressions like W = PVMg/RT unambiguous, because it is then understood that the whole of RT is in the denominator. It's also my impression from watching many "viral" youtube videos and reading the comments, that there actually is widespread agreement that expressions of the form 2x or RT are considered grouped (though the term "grouped" is rarely used). This could also resolve the ambiguity of 8/2(4), if there was agreement about whether or not the form 2(4) indicates grouping. But there clearly is not agreement. (I do not consider it grouped, because I believe the absence of a multiplication operator is based on a different convention than its absence from expressions like 2x. But that's just me.) To summarize:
I think there is already widespread agreement on the concept of grouping, even if it isn't always recognized as such (expressions like "more tightly bound" are sometimes used).
I think there is already widespread agreement that expressions of the form 2x or NkT (from PV=NkT) are grouped.
There is widespread dispute whether expressions of the form 2(4) should be considered grouped (hence 8/2(2+2) is ambiguous)
Evaluating 8/2(2+2) is not about order of operations. It's about interpreting the notation.
Oh, and I take it for granted that the "MD" or "DM" in the acronyms should be understood using the left to right rule; this just makes the acronyms less than ideal as teaching tools. Thanks, and I hope you don't mind receiving yet another email about this. Don My answer: Hi Don, I agree that clarifying the concept of grouping is a central part of the controversy and clarifying this would help. However, there is no consensus what is acceptable as grouping and as long as it is not clear, it will be misunderstood. Terms like 2pi are seen by most readers as grouped because 2pi is a unit. What about 8pi or (1+1) pi or 4 pi^2. There is already a very nice solution to the grouping problem: just place brackets. Oliver From March 21, 2022: Many thanks for your web page on order of operations. As an engineer I would get nowhere writing equations in an ambiguous way as seems to be the case in many schools. I have talked with teachers on Facebook and as you point out they apply rules almost religiously or dogmatically and they cannot be convinced of anything alternative. Why on earth if y=1/ab, if the person means b/a, would he not write it that way? Of course we all write using fractions anyway and using brackets, but there must be a lack of things to understand at school if they dwell so long on such problems when brackets can always be used. As you point out, when brackets are used there is no problem in the first place, so teachers seem to not understand that mathematics is a language to convey information to others, and is not a quiz. The importance of good notation is of prime importance. Tom My Answer yes, exactly my sentiments. I made this semester the test again (among them many teachers who see it like you) and almost nobody would read 1/ab as b/a. Yes, it has become a ``gotcha" issue overriding the basic principle that language is a social construct. It probably has emerged from the fact that 1/ab is interpreted by b/a by computers, and then one tries to pop a rule onto students, many of which (also very smart ones) would read 1/a+b as 1/(a+b). A little bit of clarity and redundancy does never hurt. Even our genetic information is stored in a highly redundant way so that a small mistake does not immediately lead to a failure. Glad to hear the voice of an engineer. Oliver From June 15, 2022: Hello, I just ran across this article https://people.math.harvard.edu/~knill/pedagogy/ambiguity/index.html, and was glad to read it, as I have seen this confusion many times. One great example I don't think you have, and just wanted to throw in is computer language design. In computing, we have a large amount of additional operators compared to layperson arithmetic, such as increment operators, assignment operators, etc. The standard solution is to essentially define a more elaborate PEMDAS rule and include it in the documentation, for example python's can be found here: https://docs.python.org/3/reference/expressions.html#operator-precedence, which has 18 bands! As you can see, much like the PE(MD)(AS) rule, it is quite common in programming to group left to right within a band, treating them as equal (with special rules for exponentiation, similar to how you identify it is treated specially in the article). This is also a clean extension of what I was taught in the 90s in Canada with BE(DM)(AS). As you might imagine, having an even longer version of the rule doesn't fix the ambiguity. The best approach is once again, to just add brackets to clarify the order, or to break into multiple explicit equation steps e.g. " top = 2 * x", "bottom = 3 * y", "result = top / bottom - 1". Quite often it is considered best practice to have maintainable code to remove the ambiguity, especially since adding a few more characters in the source file of a program is, essentially, free with the storage spaces now available. If for some reason, there is still ambiguity after this, languages may provide a full "grammar", often in BNF notation. Most programmers never have to go into that level, but it is good to know it is there if a reader ever ends up with one of these problems. Apologies if you did have this already, it is a very long article at this point. Thanks for the article! Glen Hi Glen, thanks for the insightful note. Indeed, a good programming language should give guidance about the order of operations. Most of the time, this is not done or then hidden away. Yes, there are layers and in the case of operations like e^x, the behavior is often not seen in the language specifications. I agree that additional clarity is even good if the specifications are clearly given. Not everybody knows or looks at the exact specifications when casually programming. This is a situation where one could even in a program make a note that the parenthesis were put for redundancy reasons. A future maintainer of the program might remove some brackets to ``make things more elegant". It happened to me several times that I was trying to optimize a code and making it shorter, not noticing that some additional bracket actually was needed in that language. By the way, here is a joke about what happens if one includes also the equal sign into the mix: x = 12; x += 3 gives 15 x = 12; x =+ 3 gives 3 Plus and Equal can be combined in both ways but do not commute. Oliver From September 9, 2022: Fascinating page. The thing I find interesting is how militant people are in their beliefs over the right answer. It is almost religious. - Marcus Hi Marcus yes, this is maybe the most interesting part of the story. An allegory for many other things non-mathematical. The surprise is that this happens in such a relatively well defined narrow part of a very exact science. Oliver From October 9, 2022: a funny contribution (goes with the picture)
I came across the 6/2(2+1) thing a couple weeks ago, and in trying to search for the rule I was taught about treating things like 2(2+1) as a unit I came across your chain. I was taught that it was important to treat it as a whole because of formulas I would eventually learn and have to use (and when I started taking higher level math, I saw what my teacher meant). I've been stewing over this for a couple of days, trying to figure out what exactly it was about this particular equation that was bothering me, and I believe I've figured it out. ... This bothered me so much because there were so many people stuck on 9 as the answer saying that this was how they learned it, and this is why kids don't like math. If you dumb down the basics incorrectly, without explaining the simplification (or worse, that the simplification even exists), when it gets more complex later it won't make any sense and they won't be able to understand why. My brother's kindergarten teacher tried to tell his class the earth moves very slowly, and that's how we all managed to stay on. Imagine how confusing the rest of his life would be if our mom hadn't corrected that nonsense! But, as the teacher explained, it was easier for the kids to understand. Regardless, there IS a correct answer to 6÷2(2+1), and that answer IS 1, because it is a circle. Don't disturb my circles. Maggie
Hi Maggie, thanks. I like that proof using the circle ...But yes, you hit the point exactly. What humans do is that they tend to group things like 2(2+1) as a unit. It become more prevalent in expressions like 6/2pi which most people read as 3/pi and not as 3pi as some fanatics or computers want to teach us. And yes, 2pi is a round thing. Oliver From October 26, 2022: a nice video of Clemens Winklmaier (MOV file) about CASIO calculators. One can not illustrate the ambiguity better. As we can see, even some calculators have become ``human" (Humans evaluate 8÷2(3+1) usually as 1 because they see 2(3+1) as a unit together.
Today was one of those days I stumbled upon one of the "ambiguous" maths problems while scrolling down on Facebook ... yet again. Searching for an older answer from some professor I sadly can't remember, I did come across your page "Ambiguous PEMDAS" which I shall bookmark right away. Reading most of you examples and comments I was thinking you might be interested in this little video I recorded. The calculators used are all the Casio 991, which is used in most German high schools today. Interestingly each iteration of the model handles the 8 \div 2 (3+1) different. Feel free to add it to your collection. Kind regards Clemens Winklmaier Dear Clemens, wow! That is fantastic. I will add it to the conversation. Das Video ist ein Hammer. Oliver
From November 5, 2022: Joerg sent me a link to a youtube video which suggests GEMS instead of PEMDAS. The name GEMS stands for Grouping, Exponents, Multiplicative structures and Subtracting. My Answer: Hi Joerg, thanks. I did not know that one. I like the name, it is easier to remember. A bit a hack, that addition is replaced by subtraction to make the word GEMA sound better. It of course, like any other approach, will not solve the major problem that we often group things not from left to right. It does not replace the 100 year old advise to write extra clearly if a misunderstanding is possible, like with in an expression 1/2r which by most is read as 1/(2r), while one can understand it also as (1/2) r. I have seen so many times also even professional Mathematicians write things like 1/a+b and understand it as 1/(a+b) or very smart kids read 1/a+b as 1/(a+b). All teaching or smart acronyms does not change the fact that some assumptions are wired in and in a time when things had to be typeset with a typewriter, authors tried to avoid brackets as much as possible and the AMS even gave this as a rule like for 1/2pi which is often written without a bracket and everybody reads it as 1/(2pi) while a computer reads it as (1/2) pi. The youtube video asks "Better than PEMDAS"? The standard answer to such questions is https://imgs.xkcd.com/comics/standards.png It again just provides a false sense of security pretending we have a rule which solves the problem. The problem is that even by knowing the problem, the majority of people read things differently than intended in general. Independent of education level. A teacher writing a text following this rule and having all students (experiments with real people show that almost none really follow such rules) read things differently will have a big problem and get torn apart, especially by the parents. (such a story has initially brought me to this fascinating area). Oliver Joerg again: Thx for swift reply. Yeah, you`re right: rules are not everything. I just find it strange that in the English speaking countries 4 precedence levels are taught with 6 letters. This is the reason why I like GEMS so much = four letters. I was raised in a German speaking country and we don`t know nor use PEMDAS or BODMAS or variations thereof. We were taught "Punkt vor Strich" = first points (# :) then lines (- +) 2 precedence levels, 2 words. This is actually a nice point. Simple rules are better to remember and easier to follow. I remember now that this was also what my teachers have told me "Punkt bevor Strich". Maybe also something to consider "Point before Line" ! From November 8th, 2022: Alex Staub has some excellent points which I have never seen addressed. They illustrate very strongly why it does not work without clarification. I have recently been embroiled in one of those "ambiguous" math problems using the obelus, and ran across your article. Some of what I say here was touched upon by other people who have been in communication with you, but I wanted to add my input that implicit multiplication should take priority, and here is why: A monomial represents one term. So 2x is not quite the same thing as 2*x. 2x is the single value which is the product of 2 and x. So the parentheses around 2x are actually implied. Further, what of x÷x? The variables have a coefficient of 1, yet few people would argue that this expression equals x^2, as strict PEMDAS would seem to indicate...indeed, even algebra calculators which equate 2x÷2x to x^2, evaluate x÷x=1. One may argue that "well, the equation doesn't have the 1 written, so it can be ignored" but this is one of the keys to why implicit multiplication must have a higher priority. WHY is the coefficient of 1 virtually always omitted? Because it is done automatically. The multiplication is implied to have already taken place. We aren't dividing by just x, but the product of x and 1. Other coefficients should be the same. Finally, one more example: How are strict PEMDAS proponents to perform: x÷x^2? Exponents first, so x÷xx, division and multiplication left to right, so 1*x=x However, if x=3, then the result is quite clearly 1/3 or 1/x. Because we are dividing by a monomial. The product of x multiplied against itself. We are not dividing by its factors. It just seems like such an easy fix to prioritize implicit multiplication. Thanks Alex Here was my answer: Hi Alex, fantastic points. 1. I believe it would matter in 1/2x or 1/2*x when doing experiments. Most people probably would think in the first case as 1/(2x) and in the second case argue (1/2)*x. Some might still think of 1/(2*x). 2. I love x ÷ x = x ÷ 1*x = (x ÷1)*x = x2. Indeed, nobody would understand it as such. I agree. Everybody would understand x ÷ x as being 1. 3. I also like your example x ÷ x^2 = x ÷ x*x. By PE(MD)(AS), with exponentiation before multiplication and division, everybody would think 1/x. In the second case, we could argue the answer to be x if division and multiplication are done on the same level and done left to right. All these three examples perfectly well illustrate that there is no alternative than just to clarify the expressions. I have never seen these examples mentioned in discussions. Very nice. Oliver From November 28, 2022: Lucas writes: Hello, I have read your write up on the ambiguity of the order of operations. I was a little disappointed because it seemed you preferred anecdotal evidence to make your point. I have primarily two questions with some preface attached. The ambiguity as I understand it mainly comes into play when reading or writing math problems on one line. The classic example is 8/2(2+2) which could be read as either (8/2)(2+2) or 8/(2(2+2)). I see people reference your write up to support that this problem specifically is ambiguous. You go on to offer a few more examples such as 2^2^2 as ambiguous. My concern is that you seem to be intentionally avoiding an international standard which clears up that ambiguity. Namely ISO 80000-1 section 7.1.3 covers much of it. Your suggestion of improving clarity through the use of parentheses is as much a learned skill as is the actual standard. Would you agree that the real problem is a failure to teach the standard rather than the standard being flawed? Personally I don't see how you could improve the standard any further as it reads to me as essentially "work left to right unless it violates the fundamentals of math". It seems that any ambiguity is intentionally resolved by this. The standard gives no priority to coefficient multiplication or multiplication by juxtaposition unless I am misinterpreting. I have heard the argument that standards should follow intuition but it seems to me that the standard is as intuitive as could be reasonably expected. There is an inherent ambiguity when writing expressions on a single line but the standard exists to resolve that. What would the purpose be to ignore that standard and claim that the problems are ambiguous in the face of it? Thank you in advance for your time. My answer Hi Lucas, 1. Used language is mostly about anecdotal evidence. Look at the Wolfram Citation in my article. It does not make sense to have rules which nobody observes. 2. I have mentioned the ISO standard and have a copy on my website. The There are various problems with that standard. 7.1.3 does not clear up all the controversy which has been discussed! Please read that standard and read the examples which were under dispute in the last 10 years. 3. I agree that what I say here is not very original. Clarity should always have priority. Clarity means also to be redundant if there is a chance of having it read wrong. Even if it would conform to a standard. Everybody agrees that 1/3+4 is clear enough. Every standard agrees. Still, lots of people read it as 1/7. It does not hurt here even to be more clear. In cases like 4/2c (not addressed at all in the ISO standard), there are standards which claim (4/2)*c is the right answer. But as a matter of fact, most humans read it as 4/(2c). 4. Intuition is great. But all the discussion is actually about cases where intuition for humans is different than intuition for computers. Changing the standards to address intuition would still also be wrong. It would disappoint all computer languages which use an other standard. 5. It is not about ignoring the standard. It is to anticipate where misunderstanding could occur. For us this is actually a very reasonable rule. Whenever you talk and the danger is that you are misunderstood, then it is better to clarify what you say. It is a meta rule for all communication. 6. The interesting thing about all this PEMDAS thing is that there are a few folks who want to push some sort of standard against all common use. This produces conflict. One can say this does not matter. But it matters say for a teacher who writes an exam in which such an ambiguity occurs. It drives everybody mad. Thanks for your email Oliver Thank you for your response and I will look into the standard further especially regarding disputed cases. I appreciate your take on clarity but I was worried that teaching these problems as ambiguous will ensure that they remain ambiguous. Whereas teaching the standard will eventually put everyone on the same page. At risk of sounding pedantic the standard does actually cover 1/2c or in the language of the standard a/bc.This is towards the bottom of page 23 in example 1 and it continues to clarify on the next page explicitly stating that a / bc is a/(bc) and not a/bc. Hi Lucas, Thanks! Note however that this is written on the top of page 24 as a --- bc Which is non-disputed. This is how we write it. The dispute comes when writing a/bc. If you feed that in a computer (or one of the fanatics on the web) you read a/bc as (a/b)*c which is ac/b. No normal human does that. I'm glad you mentioned the ISO. This is interesting. Oliver Oliver From February 2, 2023: Brent writes Good morning, The internet seems to be littered with Ambiguous PEMDAS and while looking to understand more, I stumbled across this page of yours: https://people.math.harvard.edu/~knill/pedagogy/ambiguity/index.html Over my career (IT, Software, and Business), I've come across countless examples of improper gathering and combining of numbers. As the story goes... a client doesn't understand why they are losing money. Soon after we discover fuzzy math in their golden quoting formulas. Such experiences have left me as a potential over-user of brackets. It's ok, I am no math wizard and brackets help me sleep at night. Aside from sending a thank you note... I do have a question about one part. Under the section " What is the source of the problem?" and toward the end of the section. 3-(4+3) = -5 3-(7) = -4 ??? Maybe a typo, maybe I am totally overlooking something. Time to get back to work. At least until I follow up on the ÷ vs / stuff. Thank you for reading. Have a great week! Brent Hi Brent, thanks. Yes, that had been a typo. 3-(4+3)=-4. Glad you point that out. It is corrected in the above. I can imagine that notation problems can be a source of problems in many spreadsheets and errors in business computations. In general, it is the lack of brackets but of course, it can also be the wrong use of brackets or simple computation errors or typos. One of the good things of the attention this matter has obtained is that one is maybe a bit more sensitive to these issues now. Especially quality control or auditing of finances can improve when being aware that ambiguity in formulas can be a problem. Oliver April 4, 2023:
Just found on twitter: a teacher asked a small class about 8/2(2+2) and got 3 answers 1 and 3 answers 16. One wrote that it is intentionally ambiguous and that the notation sucks. It seems that historically the problem occurred not "intentionally". It just happened to occur and then one was surprised how ambiguous it is. What surprises me is that we are still debating it, it is now almost 10 years into "heavy exposure" to the phenomenon in social media (I learned about it in 2014 but it had been discussed much before on facebook for example). The sample size is very small (7 answers) but in my experiments in 2014 with a 60 student calculus class, where almost all except a handful of students would pick 1.
From April 16, 2023 Stuart writes: Hi Oliver I've been following the PEMDAS ambiguity for some time now, including the insightful discussion on your page. My background is in engineering and physics, where implicit multiplication taking precedence is fairly standard, particularly where the precedence is clear from context - for instance 1/jω and E/kT are very common terms that are often used without parentheses. It's not just a case of "why would you write it like that?" if you meant ω/j and ET/k, but the expressions often end up being meaningless from a dimensional analysis perspective (-E/kT is a common exponent, but ET/k is not dimensionless). But it is all fundamentally a semantic argument, from a prescriptivist perspective it's somewhat unfortunate that there isn't much in the way of freely-available authoritative answers - even the (non-free) ISO standard says "shall not be followed by a multiplication sign" and does not mention implicit multiplication, even though it is apparent that implicit multiplication only worsens the ambiguity. The AMS style guide (https://www.ams.org/publications/authors/AMS-StyleGuide-online.pdf) seems to be even worse - in section 13.10 it states: "In slashed fractions, stet parentheses or lack of parentheses-1/2a + b or 1/2(a + b)-unless the same construction is inconsistent within the paper, in which case query the author." So they give 1/2(a+b) as an example to stet (i.e. accept) but don't actually explain what it should be interpreted as, because it is seemingly so obvious! From a descriptivist perspective, though, it's clearly ambiguous and the fact that it's so easily misunderstood should be reason enough not to write something like this. But I think I'm preaching to the choir here... Regards, Stuart My answer: Hi Stuart, I agree with everything. Having to "query the author" is indeed not a good option. Yes, if somebody writes E/kT, then one knows in the context what it means. I like the example 1/j&omega. One reason why authors like such notation is because it is more elegant. E/(kT) looks more ugly and a horizontal division sign needs more time to write. Fortunately, modern writing techniques allow us easily to express things today, like \frac{E}{kT} in LaTeX. I recently looked through a "Formula collection (1990)" of Urs Kneubuehl in physics which I had used extensively throughout college and saw that he has almost fanatically avoided any terms a/b and everywhere already used the horizontal division sign even in non-ambiguous examples like G m r/r^3 , even in cases like m v^2/2. He must have felt that especially in a formula collection which is used widely, any smallest ambiguity would be devastating and be a source of errors, not only in schools but in research papers. AMS should probably in a style guide simplify the message too and simply advice for example to avoid A/BC and use \frac{A}{BC} or A/(BC) Oliver From May First, 2023 Julian writes Dear Oliver: Perhaps you are sick of the "Ambiguous PEMDAS" debate by now, but I just wanted to ask a question whether there is an ISO 80000 standard or any mathematical rule regarding coefficients with variables. QUESTION: Is 2x considered one term? Is it a single term with 2 being the coefficient of the variable x, or is this merely 2 times the variable x? I think this would resolve many of the ambiguities. If a coefficient next to a variable is always a single entity, then 1/2x would always mean 1/(2x) without the need of a parenthesis. To represent 1/2 of an x, it would need to be written x/2 or (1/2)x. And (1/2)x would always mean ((1/2)x). In general, I agree with the email from Charles dated December 3rd 2021: P E IM MD AS. Therefore: 2x = (2 * x) 3(4) = (3 * 4) 2(1+2) = (2 * (1 + 2)) Anyway, I'd appreciate an answer to the question above. Thank you. Julian My Answer: Dear Julian, no, the topic of mathematical language is extremely interesting. It is also important because if mathematical communication does not work, we are in trouble. The question about coefficients with variables is an interesting topic. In most computer algebra languages for example you can write for example 2a or 2Pi and the computer understands this as 2*a or 2*Pi. However, our computer friend does not understand 1/2a, as we humans do. The computer interprets 1/2a as a/2 or 1/2Pi as Pi/2 . . There is some comments in the ISO 80000 standard like 7.2.2 or 7.1.3 or A.3. The difficulty is to see in an expression whether the author saw it as a coefficient of a variable. A silly example is when writing 23.141 . We all understand it as the number twenty three point 141. An AI entity who has learned that 2Pi is interpreted as 2*Pi might infer that the author means 23.141 = 2*3.141. Why should 3.141 be treated differently than Pi? Actually, my initial experiments with Chat GPT when it became viral last November showed that it shows basic lack of arithmetic skills. GPT 4 is better. And now bots are bonding with computer algebra systems (something which had been done long before. Siri had been consulting with Wolfram alpha for decades. We had combined chat bots with computer algebra systems 20 years ago and it had already then not been considered original see our report In any way, especially with the upcoming of AI, we might need to be more precise in writing mathematics. Computers understand things differently in general than humans (that was one of the main points in this entire topic). And also with the inclusion of AI, the general rule to communicate unambiguously and if necessary in a redundant way, stays important. Oliver From May 14th, 2023: On May 1 2023, Julian asks whether ISO 80000 says anything about whether "2x" can be considered "one term". I was able to find a copy of ISO 80000-2 online, and in it I find the following: "The symbol for multiplication is a half-high dot or a cross. Either symbol may be omitted if no confusion is possible." This is as close as it seems to come to telling us how to interpret "2x". It does not define "term", not that I can find. Julian may be thinking that if we consider "2x" to be one term, it follows that the multiplication would be done first in the expression 1/2x. My own view would be that expressions like 2x are widely (perhaps universally) considered to be grouped. This causes the multiplication to be done first in 1/2x. In this view it doesn't really matter whether we consider it to be one term. It's the grouping or not that counts. As to how computer algebra languages interpret 1/2a, or 1/2(3), we are at the mercy of how the language's designers chose to interpret it. As such, and especially for controversial expressions like 1/2(3), they represent nothing more than another opinion, one more among many. What these languages choose to do gives us no evidence one way or the other about how to interpret the likes of 1/2(3). (Unless the designers are internationally recognized experts of such stature that they should be considered authoritative, Which seems unlikely.) Ordinary computer programming languages (all the ones that I am familiar with) won't accept 1/2x as a valid expression. Omitting operators is not allowed. The programmer has to rewrite it to mean whatever it is they intend it to mean. This puts the responsibility where it should be, on the user/programmer, to give the computer explicit instructions. Thanks for your time, -Don My answer: Hi Don, thanks for the comments. As you confirm, the expressions can be ambiguous. Two comments - Yes, the notion of "term" is ambiguous. There are places, where one can find definitions like "A term is either a single number or variable, or numbers and variables multiplied together" - About computer interpretations of 1/2x, advanced computer algebra systems allow it ------------------------------------------------------ Mathematica 13.1.0 Kernel for Linux x86 (64-bit) Copyright 1988-2022 Wolfram Research, Inc. In[1]:= 1/2x x Out[1]= - 2 ----------------------------------------------------- A computer reads it as x/2, while a human would read it as 1/(2x). This example confirms that one needs to clarify. If a teacher writes 1/2 x , then some of the students will interpret it as (1/2) x while others will interpret it as 1/2x. Oliver Hi Oliver, Thanks for the response. And Wolfram Alpha has two modes, one called "Natural Language", the other called "Math Input". I typed "1/2x" (those characters in that order) in both modes and the results were different. See the attached screenshot for the "Math Input" mode result. Turns out it puts the expression in the URL, so I can show you Here and here For further exploration, try typing "1/1+2" in each mode; and watch carefully what it does immediately after each character is typed. I'd expect an advanced computer algebra system (which I have called systems that interpret symbolic math) to accept 1/2x as input. The question, of course, is what do they do with them. I'm a little surprised that Mathematica would do what you showed; I thought one of its main things was to interpret symbolic math the way people do#but my expectations can easily be incorrect. -Don Update of May 26, 2023: I'm thoroughly enjoying browsing through your Ambiguous PEMDAS page. It seems like we might be on the same page. I don't think it's an issue of PEMDAS vs. BEDMAS, though. I think other things need to be considered like applying the distributive property as part of the "parentheses" step and recognizing that coefficients (cofactors) shouldn't be separated such that one becomes a divisor. I've written a blog post on it, and if you find my comments worthy, you can reference it on your page. Thank you for considering this. I'm not a mathematician, but I did make it through Differential Equations in college before switching majors, so I'm no slouch when it comes to math. 8 ÷ 2(2 + 2) = 1: Why PEMDAS Alone Is Not Enough. My answer Hi Scott, thanks. Just one thing about using spaces. In Mathematica or wolfram alpha, x/ab keeps ab as a variable and when writing x/a b then the computer interprets it as bx/a. Good collection of examples on your blog. Oliver Update of May 27, 2023: I don't mean to bother you too much on this question, but I have a question about your October 26, 2018, e-mail exchange on your page. I appreciate that you have some material on your page that addresses the language aspect of the problem. My formal educational background is actually linguistics (biblical Greek and Hebrew), so part of my attempted solution is to address the linguistics or the "syntax" of the ambiguous expressions. It occurs to me that there is another possible process at work in the computers on the 2 * 3 / 4 * 6 expression, and you sort of hint at it, but it doesn't have anything to do with whether the computer is using PEDMAS or PEMDAS. I don't know enough about the inner workings of programming languages to understand the details of how they work, but is it possible that the computer is treating the division slash (or the obelus if used elsewhere) as a cue for the computer to multiply by the inverse of the term that follows? If so, then in the computer's "mind," that removes any ambiguity, and order at that point doesn't matter, because it's all multiplication and the associative property applies. So the computer looks at it like this, with the inverse of 4 in brackets to clarify it's taken as a single term: 2 * 3 * (1/4) * 6 = 9. But when I hear the problem spoken, there can be verbal cues that are difficult to express in the written language. If I were to see the original problem and say it out loud, I might emphasize the connection between the multiplied terms. I'm using the ~ symbol to indicate where I would have a slightly longer word-space pause for effect; the hyphen indicates I'm trying to say it as a single term: "Two-times-three ~ divided by [or "over"] ~ four-times-six." Saying it that way, at least in my mind, emphasizes the multiplication first, then the division last. My answer would be 6/24, or 1/4 However, if I were to say it as follows, I'd be emphasizing the LTR PE(MD)AS, processing each sign as it comes: "Two times ~ three-divided-by-four (or "three-over-four") ~ times six," or "Two times three-fourths times six," to make it clear I'm dealing with three terms. My intended answer then would be 9 for either of those statements. I do agree with you though, that using parentheses or brackets is the best solution. What would it take pedagogically to move toward a more robust application of PEMDAS? Maybe call it "Active PEMDAS"? Here are some suggestions: 1. Insist (maybe too strong a word, but looking for some uniformity across the board) that mathematical Properties (esp. Distributive) be considered as part of the P in the PEMDAS (or PE(MD)AS) step (i.e., P = Properties & Parentheses). When such properties are properly applied, require the use of parentheses/brackets, etc. to indicate so. 2. Similar to 1, for expressions/equations presented ambiguously, require students to indicate by the use of parentheses etc. how they went about solving the expression. In this case, the right answer depends on how the student organizes the equation. 3. Stronger encouragement of the "division is multiplication by inverse" concept so as to eliminate the ambiguity of multiplication or division first vs. left-to-right application. In other words, actively "force" the use of PEMDAS through intentional parentheses/bracketing rather than passively assume intention based on signs or symbols used. From a linguistic perspective, this aligns with using active voice to clearly indicate the subject (actor) who is doing the action of the main verb ("I washed the car."). Passive voice often hides the true actor of the verb either by omitting the actor altogether or by moving it into a prepositional phrase at the end of the sentence ("The car was washed [by me]."). Thank you for considering this. If you want to continue the conversation, I'm open to that. However, if your schedule is such that you can't devote a lot of time to this topic, I'll completely understand. Scott PS: Thank you for the tip on spaces in Wolfram. My Answer Hi Scott, thanks. I can put your comment on the collection page. Yes, it is a linguistic phenomenon. I'm not a linguist although. Language is a communication tool. As wolfram has pointed out once, it grows and depends on social cultural and other factors. But language also has to be so clear (maybe even redundant) that there can not be any misunderstanding. Especially in classrooms, where students have to take tests and exams, it is pivotal that the problems are clearly stated, even if there should be established rules, one should be so clear that everybody works with the same math problem. Oliver June 29, 2023 Greetings. Is this a valid proof 6 ÷ 2(2+1) =1, not 9? Starting with 6 ÷ (4+2) = 1 Factor 2 Get 6 ÷ 2(2+1) which still better be 1. Q.E.D Thanks, My Answer: Hi, the expression you start with is unambiguous. Everybody understands 6÷(4+2) as 1. After you factor out 2, you still assume 6÷(2(2+1)) which is also unambiguous. Leaving out the brackets however produces 6/2(2+1) and here there would be disagreement as it is ambiguous. A computer gives 9. If presented as you did, one would still get 1. You see, the statement does not need proof. Statements which can be read differently should just be avoided. Oliver September 1, 2023 Hello Sir, I think that people are trying to find an ambiguity in BODMAS or PEDMAS, but think that some logical explanation is needed. I observed that 90 percent of people think there is an order (OF) between 2(3). And that's why (OF) must have higher precedence than division. If the position of order (Of) after 2, so we must write the equation as 6÷(2(3)) so that the answer is 1. If the position of order (OF) is after (6÷2), we must write the equation (6÷2)of 3 =(6÷2)(3). Now, the answer is 9. If there is no clear instructions of order (of), we can't say order (of) after 2 or 6÷2. In the absence of brackets (), the equation is ambiguous. We must write the equation with clear instructions to clear the position order (of) like this (6÷2)of(1+2)=9, 6÷(2(1+2))=1. Humans and calculator both have the ability to reach exact answers to problems with clear instructions. In the equation 1÷2x, humans can read as 1/2x or 1/(2x) because of the absence of logical meanings of order (of). Calculator follow clear instructions to solve, and read 1÷2(x) as 1/2(x) if we put 1÷(2x) read as 1/(2x). If we put 6÷2(1+2) with no clear instructions of order (of) on calculator, we confuse the calculator, but a calculator treats 6÷2(1+2) as (6÷2)(1+2), which gives the answer 9. So, there is no ambiguity in BODMAS or PEDMAS, no ambiguity between humans and calculator calculation, every one need clear instructions to solve equation. Thank you, Best regards, Ambuj, India My answer: Hi Ambuj, your point that "we need clear instructions" is very good. Without clear instructions, we have ambiguity, meaning that there are different answers to the problem as you point out. You reformulate this using "order of". I think one can just reformulate this "use brackets" to determine the order of the operation. With brackets, we make sure that we communicate how the expression is ordered. I have put a slightly shorter version of your comment. Oliver October 13, 2023: Peter O'Donnell sent a link to this exposition. Hi Peter, I found your thoughts about Mnemnonics interesting, even so I do not quite agree. I find Mnemnonics like FOIL, SOHCAHTOA, LIATE, PEMDAS, PIZZA (pi r^2 h for the volume) helpful in math because they do what they are supposed to do: they allow them to remember things. Memory techniques allow students to succeed. I agree (and was exactly what is pointed out on this page too) that the PEMDAS Mnemnonic is insufficient because other customs are used. This is the core of an "ambiguity". If there are different established interpretations, there is a communication problem. PEMDAS is a language specification ambiguity. As you say: "Whilst we surely have a strong case for agreeing upon a single convention, there is not, and has yet never been, a single convention observed." The suggestion to use the vincula (horizontal lines of various length) is often done to clarify. While it can have its use and solves some ambiguity problems, brackets are probably more convenient. There is a bit of a risk in that the lengths of the lines need definitely to be distinguishable and the expressions need quite a bit of space to write. In handwritten texts, this could lead to different readers reading it differently. Writing down a specification on how much longer the vincula have to be in order that they qualify would also lead to debates among teachers. Oliver 11/10/2023: Philipp writes: I have been reading with keen interest the dialogue regarding the writing of Mathematical expressions and, in your words, the "ambiguity" some of them show. It is interesting that the issue of "ambiguity " would arise in a Mathematical context. If Mathematics could be said to be in any way ambiguous, all hope is lost. Nevertheless, the context of this issue has become a visceral one in your venerable venue and also online at Quora, generating volumes of titillating expressions with, yes, multiple answers. It seems like a game. I can imagine perpetrators of these questions grinning as they play "Gottcha" with "those Math guys". As for "ambiguity", were one in charge of a manned shuttle launch and something went horribly wrong, I don't think that "Well, I was only being ambiguous". Is going to cut it! To get right to the point, if there is any, and I mean ANY, possibility of getting multiple answers, the problem is not ambiguous -- it is flawed, fatally so, and not worthy of any further consideration. Period! Full Stop! No historical conventions, no "We traditionally do it this way", or PEMDAS et al, can save it. The same goes for trying to "save" a problem by suggesting "interpretations", i.e "If you meant this or this, then...". So what is the source of the problem? Typewriters, Calculators and Computers! Almost all of the confusion is caused by two things: the division symbol (with the dots) and the infamous "/", and sometimes the "-". Math is not done on lined paper -- it is done on blank paper or on the (God forbid!) blackboard -- "White Board" now, The problem has become what I call "typewriter math": the casual typing of the division symbol and the "/". Ever try to write an algebraic fraction on a typewriter? Use the "/" and you'll quickly be in trouble, whether it be on your typing paper or calculator or computer screen'. Whence arise 99% of all the ambiguity, controversy, vitriol and multiple answers. And all because we don't bother with {[( )]}! ... My answer: It would be nice if all ambiguity was gone. But it is not practical to write in a way that is always very clear. If we talk about the cube root of -1 for example, we always would just think of -1 as the answer. If I ask a computer, like with N[(-1)^(1/3)] I get the answer 0.5+0.866025 I. The computer has chosen one of the three cube roots. In order to be unambiguous, I would have had to say: "Find me the real cube root of -1". Language always depends on the context. If I am an elementary school teacher and ask for the cube root of -1, then I expect the students to find -1 and nothing else. In a college course, where differential equations are studied, one expects the students to find the complex roots. The problem "Find me a cube root of -1" is ambiguous as an absolute statement but confined to a particular local framework it is fine. The reason why legal contracts are so long is that they try to be completely unambiguous and fill any possible loophole. Legal documents are therefore hard to read. If we write a calculus text and talk about the equation f'=F(f), we implicitly assume that the reader knows that we are only interested in functions which are differentiable. In a more advanced field, one might allow more general solutions, or even objects which are no more functions, meaning weak solutions. It again depends on the context. In language, "implicit assumptions" are needed. But you make a good point with the "gotcha". Because, if one wants to misunderstand or derail somebody, one can always change the environment. If a teacher in a middle school talks about the cube root of -1 being -1, then a "smarty pants" student who has checked with quora or consulted one of the AI bots would point out that this is not correct and that there are three roots. I myself asked once one of my middle school teachers what is 0^0 (zero to the power zero). The teacher did not know. On this level it is ambiguous because one learns a^0 = 1 and 0^a = 0. It is only later in calculus that one can make the expression no more ambiguous, for example by asking what is the limit of x^x when x goes to 0. In that case the answer is 1. But again, this is ambiguous, because if one takes the limit from the left one gets problems with the definition. In this case, my middle school teacher did not know the answer (the right answer at that level is that it is ambiguous and needs concepts from high school like the concept of limit to be understood). My high school teacher could explain it. 12/2/2023: Robin writes: Dear Oliver, I came across your page by accident, and read the opening point regarding how "most" people would parse an equation, and I was intrigued to notice that you didn't seem to initially consider what I thought of as a rather obvious way of reading 2x/3y-1. I read it as 2x/(3y)-1 giving 11. Here is an other example: if x=0.5 and evaluate 3/x*2 (3/x)*2 3 / 0.5 = 6 6 * 2 = 12 In the second case 3/(x*2) 0.5 * 2 = 1 3 / 1 = 3 This example shows why, IMHO, it is dangerous to assume that division and multiplication can be considered equals. Yes, one reverses the other, but as you can see, it is very important as to which occurs first. Division is NOT commutative. There seems to be far too much simplification of the facts happening with mathematics teaching at a young age. I know this has harmed my ability to learn mathematics and apply it; I worked hard to correct it later. I understand there are entire fields that have conventions as to how to evaluate expressions, and even mathematicians seem unable to agree a common standard, but as you can see from my simple example, the situation is not straight-forward, and as always you can rig the answer by asking a specially crafted question. Simply, the only way to avoid ambiguity is to force brackets everywhere. They should not be optional based upon some vague notion of a generic "what-if" rule, but a requirement, as it is a requirement to write the mathematical operator in "1 + 1 = 2". You only need to look at English, and the rule "i before e except after c", then look at the very long list of "exceptions", that render the rule not only obsolete, but preposterous. It was interesting to follow your discussion regarding programming languages, and how they evaluate expressions. As I was taught when I studied Computer Science: brackets, brackets, brackets! "Always use brackets to force your intention". This is something mathematics could learn from computing. Yours sincerely, Robin My reply Dear Robin, I like you example 3/x*2 with x=0.5. Especially, if one writes 3/2x one gets 3 when seeing 2x as glued together. But it is also very natural to assume (3/2) x. Yes, division is not commutative: 6/2/3 can be read as (6/2)/3 or 6/(2/3) which gives in the first case 1 and in the second case 9. Good point with "Brackets, Brackets, Brackets". Indeed, the main point of this story it to better be overly clear and even redundant than ambiguous. Computer science in this respect a good guidance. By the way, in your example, when one gives the computer the instruction 3/ 2x with x=0.5, one gets 0.75 and if one gives it 3/ 2x with x=1/2, one gets 3/4. It looks the same but is not: for example 0.75^100 gives 3.2072 10^(-13) while (3/4)^100 gives 515377520732011331036461129765621272702107522001 ------------------------------------------------------------- 1606938044258990275541962092341162602522202993782792835301376 These are different results. In the first case the computer computed it as a real number. In the second as a rational number. When one tells 0.75^10000, the computer gives 0 already while (3/4)^10000 gives a long but precise result. As you point out with language, it is difficult to make rules which always work. Language is a social construct and has grown organically, sometimes a bit awkward. Oliver Added January 16th, 2024: A quiz in "Die Welt" (in German) has a problematic question. The left to right PEMDAS rule is assumed. In this case, this is also what humans often would do, especially because 376 is not divisible by 6. In a question like 360/2*3, many would get 60. In a question 360/2a with a=3, most would get 60 because 2a is often seen as a unit. I'm not sure about how much the literal PEMDAS is still taught in Germany. One know there the "Punkt-Vor-Strich Regel" but that is ambiguous as "strich" might also be interpreted as 4/5 (of course, it refers to the obulus and multiplication as "Punkt" and addition and multiplication as "Strich". Whatever the situation, the problem is unfortunate. Added January 19, 2024: In the Welt:
This is a very interesting poll from "Die Welt". From half a million users, there are actually more who go with PEMDAS and not with the PE(MD)AS. When I myself did the poll, I knew of course (this is what this page is all about), what the problem writer wanted to see with this GOTCHA. But the poll perfectly confirms that we have an ambiguous situation. 10 years ago maybe without the vast exposure of this type of problems (this page is now also 10 years old), we would have seen a vast majority of users who would give the PEMDAS solution. It is hilarious that a decade of wide propaganda, the ambiguity still is entrenched. Added February 16, 2024: BODMAS dance Short: BODMAS for Brackets, Order, Division, Multiplication Addition and Subtraction. BODMAS means for example that 1/2x is interpreted as (1/2)x. It does not say anything about 1/2/3 is. Note that BODMAS gives for 2*3/4*6 the expression 2*(3/4)*6 = 9 while PEMDAS gives 6/24 = 1/4. Also to use PE(MD)AS would give 9. Most people would probably get 1/4, especially if it is written as 2*3 ÷ 4*6. The law, to which the teacher in the movie dances gives 9.
Added February 20th, 2024: On February 19, 2024, one can read in Die Welt a news entry "This math problem makes the web crazy!" It is the oldie 8÷2(2+2) While nothing new (this example was essentially the example which started more than a decade ago), it is still interesting because it shows how still today after a dozen of years of discussion and exposure to thousands of social media entries, the public is still divided. From 593647 votes (I looked on the morning of February 20th), 46 percent chose the entry 1, 41 percent chose the entry 16, while 13 percent chose something else. [P.S. I got just an email from Andy Watson pointing out a poll entry from 2011 that still pretty much the same distribution (that physics forum poll had only 50 people)]. Also interesting still the twitter correspondence mentioned in the "Welt" article. There are still many who think they have the only right answer. It is similar as with religion or some political issues: it is a phenomenon that a large part of the society is unable to look at some issue from an other perspective. What do you do in a case of a question, where the answer is so divided? Well, there is sometimes not only "right" or "wrong" but "ambiguous". Similarly as there is no accepted authority which tells which religion is the "right one", there is also no global authority which tells what 8÷2(2+2) is. Already more than 100 years ago, Cajori has pointed out the math ambiguity. Mathematics is a language and effective languages have ambiguities. Avoiding that would make every statement sound like gibberish from a lawyer, making sure that no loophole can be found. Fortunately, in the PEMDAS problem the issue can easily be avoided. Just write 8/(2(2+2)) for example or (8/2)*(2+2). There is very little cost to add these brackets. As a reasonable person (like a teacher) one has to know about this because if asking an ambiguous question in a test should not be acceptable even if for the person asking the question, there is only one acceptable answer. Empirical evidence shows that half of the population has a different interpretation. Added February 20th, 2024: I saw your excellent page on this after previously looking at George Bergmans also excellent article which was regarding this old internet version of this seen in a forum in 2011 thought I would drop you a line. Nowadays it has gone form forums to Youtube and considering there are a large number of videos :- 1. Getting it wrong 2. Not telling the full and fascinating story / history of this very interesting topic, I wondered if you had time to put up a video discussing it? It is one of those things that is simple but tells us more about teaching and the human psychology than the actual "rule" or lack of... In the world of physics a similar phenomenon has happened with Special Relativity and The Twin Paradox in regards to the number of "explanations", a lot of which do not hit the mark. People gloss over the history of that too. I hope this gets past your spam filter. As Homer Simpson grandfather would say " I am not a crank" . Always tricky nowadays dealing with the general public, unlike in the past where a letter had to be written and posted, the first level of quality control ! All the best Andy Watson Hi Andy, thanks! I had mentioned Bergman's note on November 8, 2021 on my blog entry and already then stated that I agree 100 percent with his assessment. Most professional mathematicians who are sensitive to linguistic and pedagogical issues would probably agree with Bergman's point of view. I'm very grateful for your reference to the physics forum entry. I will add a screen shot of that physics forum entry on this blog site. I started this pedagogical blog entry 10 years ago, in 2014 but this physics forum entry might be the earliest time that the issue was taken up again in a public discussion before the social media wars started. I will attach a screen shot of this forum entry which shows that among that physics oriented public, the decision PEMDAS-BEDMAS-PE(MD)AS difficulty was already divided. About a video: I'm a bit reluctant, as on youtube as it is already filled with hundreds if not thousands of videos on the topic. I gave once a presentation and wrote a summary for an extension school courses Here and it tells the main points. Yes, it is similar to the twin paradox thing. Also the later is far from settled: if one assumes the manifold of the "universe" to be non-trivial and the shortest geodesic loops are short enough that one can travel them, the standard twin paradox dismissal using reference frames is wrong and one has a serious problem. There are papers who tried to save it using additional assumptions but like in the PEMDAS story, the resolutions look more like "hacks". If space has a non-trivial fundamental group like induced through wormholes, then one can do time travel into the future and movies like "Interstellar" illustrate this. You are spot on also to see that this topic usually categorized as "cranks". Indeed, also your email was by the google AI categorized as "spam" ... Oliver Update of February 21, 2024: Andy Watson could track back "ground zero", where the PEMDAS ambiguity hit the earth. The epicenter appears to be a bodybuilder tcatcraweler (from Texas) who posted on the morning of April 7th 1011: Bodybuilding forum screenshot Andy also found the source Knowyourmeme: (Screen shot.) It mentions the first posts from April 7, 2011 and April 8, 2011 as well as a youtube video from April 8, 2011. Pretty awesome! February 22, 2024 Andy mentioned Also, whilst on my travels around the forums someone said, from memory, " It's PEDMAS, unless you are at Harvard ..." Which made me chuckle. My reply: This is a good one. Since the brand "Harvard" is currently rock bottom, this will at least not do much harm. By the way, BEDMAS gives for 2*3 ÷ 4*6 the answer 9=2*(3/4)*6 while PEMDAS gives 6/24=1/4. I bet, that most people would get 1/4. March 8, 2024 Andy mails in an experiment with AI, asking 48/2(9+3). I got the same when asking Chat GPT. For Gemini, I my own run got also 288. From March 12, 2024: David writes: Much of the viral 'ambiguity' issues with PEMDAS, and the other mnemonic learning tools is that these tools are taught to students learning explicit notation of operations. PEMDAS does not work correctly when dealing with implicit notation. Every formula used in engineering, physics, geometry, etc consists of implicit Groups of factors and coefficients, and many of those coefficients are fractional in nature. The key phrase here is that these formulae represent values which are the product of the Group of factors and coefficients. Since PEMDAS was conceived by frustrated middle school teachers as an aid to learning, it does not constitute an actual 'Rule' of Mathematics. And since it was developed for teaching students working with explicit notation, there's no reason to assume that it would work properly for implicit notation. However, given these factors, translation from implicit to explicit notation, including the implicit grouping relationship, removes a great deal of the alleged ambiguity. Circumference ÷ 2πr=Circumference ÷(2πr)=1 Circumference ÷ π d=Circumference ÷ (πd)=1 Like wise 8÷2(2+2)=8÷(2(2+2))=1 2(2+2)÷2(2+2)=1 Because the implicit notation statement 2(2+2) is Implicitly grouped. When translated into explicit notation, the added parentheses are required to maintain the grouping relationship. But, given the example of spherical volumes 4π/3 r3, area of triangles 1/2 bh, kinetic energy 1/2 mv2, etc. There is an argument that the slash operator is treated as juxtaposition division, so 8/2(2+2)=16 Since 8 halves would be interpreted as the coefficient of the parenthetical. Since every operation in mathematics has an inverse operation, the implicit multiplication operation does need such an inverse. In my 50+ years of experience, these conventions have served well. As for the 'ambiguity' of 1/2x, since x/2 is so much easier to write it's generally accepted to mean 1/(2x). Much like "for sell" when "for sale" would be more appropriate. The ambiguity seems to stem from the use of the implicit division symbol in an explicit statement, as 1 ÷ 2x has no such tendency towards ambiguity. Or to further translate this into explicit notation 1÷(2πx) would be even less ambiguous. And PEMDAS would handle such quite easily. All of this is compounded by the lack of any implicit operation capability in the binary language of electronic calculators. They have to be able to recognize and translate the implicit inputs into explicit notation before performing calculations. Sharp and Casio, and apparently some TI calculators as well are approximating such by adopting the PEJMDAS conventions. Placing juxtaposition multiplication ahead of explicit operations. My Answer: Hi David, I agree with that. There is indeed a lot of literature which uses this type of notation. It even had been in a guide book for review writers for the American mathematical society. [ By the way, I write not AMS because there is some ambiguity also in abbreviations. The American Meteorological Society for example is also called AMS. Acronyms produce lots of misunderstandings. And in a time of texting, it has become a OMG or even a SNAFU. ] The AMS guide asked writers to use 1/2π ∫o2π f(x) dx rather than 1/(2π) ∫o2π f(x) dx. In many cases, there is context which explains this. Everybody who has seen a Fourier coefficient knows it is 1/(2π) and not (1/2)π But these agreements often don't work in say school settings, and especially tests. There is no context there explaining what one means. You emphasis juxtaposition multiplication. This is a good word for the mechanism which often allows to use shortcuts. But it invites serious misunderstandings. I mentioned somewhere in my blog here the physics book of Kneubuehl, a formula collection for all of physics. Kneubuehl was very careful to avoid any ambiguity. He would write \frac{1}{2\pi} instead of 1/2\pi for example, the horizontal division which does not allow any other interpretation. It is possible without much additional overhead to write clearly. Oliver Melissa writes on March 24, 2024: I've recently stumbled across PEMA (Parentheses, Exponentiations, Multiplication, Addition), where division is converted to multiplying fraction and subtraction is converted to adding a negative. After learning how to use it, I have found that I get the correct answer every time. And even if I use juxtaposition with PEMA, it's almost impossible to get an incorrect answer. Where using PEMDAS with juxtaposition you wind up with a totally different answer. I'm in no way an expert with maths and I am always learning more. Anyway, I have read your article on ambiguous PEMDAS and found it rather interesting. I see how it's ambiguous. I've also seen how PEMA pretty much closes the door for ambiguity. So when solving an equation that is written 6÷2 * 8(6-2^2)+8 * 8=? Most people solve what's inside parentheses first which is correct. Then follow PEMDAS where division and multiplication are equal operations and solved from left to right, then the same holds true to addition and subtraction. But I noticed that a lot of people try to use juxtaposition with PEMDAS and get a different answer. Where when I use PEMA 6 *1/2 × 8(6+(-2^2))+8*8=? Whether I use juxtaposition or not I get the exact same answer. Am I correct that juxtaposition isn't supposed to be used with PEMDAS? What's your educated opinion about PEMA? My answer: Thanks. This is an interesting new angle. PEMA puts division and multiplication on the same level and is equivalent to the PE(MD)AS camp. Note that already subtraction is not associative (that it is not commutative is clear 3-5 is not 5-3) but that it is not associative seems not so well known ((4-3)-1)=1-1=0 is not the same as (4-(3-1)= 4-2=2. So, already putting subtraction and addition on the same level can only confuse. When we write 4-3-1 we mean evaluating from the left. Most people at least do so and interpret it as 0. I have seen quite many students however evaluating from the right and interpret it as 4-(3-1)=2. The reason is that we do that often. If we write 2^3^2, most folks would interpret it as 2^(3^2)=2^8=256 and not (2^3)^2=64. The exponentiation operation is another case which is not associative and like in the PEMDAS approach, computers and humans do it in different ways. If you say "got the correct answer", then this probably means you get the same answer than your calculator who uses PE(MD)AS and which is different what the majority of humans do (there is now enough empirical evidence and I check that regularly also in the classroom that many humans would interpret something like 6÷2(2+1) as 1 and not 9. If you decide to put division and multiplication on the same level you still have to decide where to evaluate first. 6/(2(2+1)) gives 1 while (6/2)(2+1) gives 9. Empirically, most computer programming languages interpret 6÷2(2+1) as 9 while most humans (make the experiment!) give the answer 1. The confusion comes from the fact that there is the impression that in mathematics, any expression is either right or wrong. There is a different possibility however, namely that it is just not well defined. This happens especially if we have structures that are not associative. In calculus we teach the cross product for example, an operation on vectors. If we write A x B x C how do we interpret this? It is not defined because one can either read it as A x (B x C) or (A x B) x C. In this case we did not run into difficulties because students who learn about the crossproduct already have some mathematical maturity and are aware of the fact that there are things which are not associative. The case of subtraction and division, which are non-associative operations, one introduces them before algebraic structures are taught (usually first only in middle school or sometimes only in high school). A teacher writing ambiguous expressions just runs into trouble. One can understand students and parents being angry about having given students ambiguous exam problems. Added 5/7/2024: the non-associativity of division is always a good one. There is a video which claims that 99 percent do computations like 4/4/4/4 wrong. I would not be surprised because school books do not teach it. Whether to start evaluating from the left ((4/4)/4)/4 = 1/16 or evaluating from the right (4/(4/(4/4)))=1 which is the same than (4/4)/(4/4)=1 we usually do not specify this. This is similar to 4^4^4^4, where different folks (and programming languages) get different answers (((4^4)^4)^4)=4^64 while 4^(4^(4^4)) is a number which has already more than one googol 10^100 digits. Subtraction, division and exponentiation are all not associative operations. The message is loud and clear: instead of claiming "right" or "wrong", we should just need to know that these expressions are ambiguous (even if a small 1 percent "elite" claims they have eaten the stone of wisdom and know an answer which 99 percent do "wrong". Language is a social construct. It is used to communicate. Communication means that both sender and receiver talk about the same thing. From June 12, 2024: Great article, if too long to be an effective slam dunk to link to people over the internet. I was taught M/D equal precedence... I think. I generally didn't run into this issue at school since operands were placed clearly in the numerator or denominator in fraction form when it started to matter. There's no ambiguity then is there? At one point I noticed that computers were doing something different, and I decided to interpret the `/` op as an unary op that placed the operand (after brackets and exponents) in the denominator. I started doing just that. Although I now realize that it's equivalent to doing division before mul. It's also equivalent to multiplying by the reciprocal, like that rather rude email was saying. Maybe division before multiplication was all he was trying to say. Ultimately this seems more of a convention problem than a math problem, and I like the idea of being explicit to take the convention problem out of math education! P.S. I hate pedmas/bedmas/pemdas whatever. Always felt like I was losing brain cells relying on acronyms to read math expressions. Interestingly enough I simultaneously have no problem singing a tune aloud to recall the quadratic formula. Hi Kai thanks this document summarizes all the important facts and references. The page is just for bookkeeping and having a bit of a time line. It is easy to bypass the difficulty by putting brackets or using clear notation. I mentioned the physics repetitorium of Kneubuehl who managed to do that well. Oliver From July 1, 2024: Can you please settle an argument for me? Consider the case of -121. I was taught, back in the 60's and 70's, that this meant the square of negative eleven: (-11)2. But my online searches reveal that many people, and most if not all calculators, read this as -(121), while many others agree with me. My tendency is to think that the expression is therefore inherently ambiguous in the absence of parentheses, but maybe I just don't want to believe I'm wrong. On the other hand, it makes no sense to me that the only valid way to express "the square of negative eleven" is to use parentheses. Thank you in advance for your time. --Brian Hi Brian, this is an excellent addition to the ambiguity question. I have not seen experiments done with students but guess that only a small fraction of them would interpret it as 121 but that most would see it as -121. The argument for the latter is to first evaluate the multiplicative structure 11^2, then deal with the additive structure. However, one can also argue that x=-11 is a number and not a result of an operation like 0-11 so that -11 is read as an entity x so that x^2=-11^2 = 121. A computer definitely gives -11^2=-121 but there are ways to write it also following the first interpretation like x^2 /. x->-11 in Mathematica. I would love to see a large scale experiment done with many students and see how many would read it in which way. One argument for reading it unambiguously as -121 is that if we were forced to write brackets, we would have expressions (-11)^2 and -(11^2) and that the later form is hardly ever seen and therefore left as -11^2. So, I could understand if a teacher would claim that -11^2 is unambiguous and needs to be read as -121. On the other hand, as pointed out again and again in this context, language is a social construct which aims to transfer information in such a way that it is not misunderstood and that even if there should be established rules, it can still not hurt to be overly clear and even redundant. If in an experiment, one would see that part of the population understands it wrong, one would better also clarify this, especially in exams that matter like entrance exams for schools or math competitions. As an author one could write for example "the negative number -11^2" or then put the bracket -(11^2), even if it might look like a pleonasm. Better a pleonasm than an ambiguity in important situations. We also add redundancy in communications that are really important like when using the phonetic alphabet Alpha-Bravo-Charlie rather than A-B-C. Oliver September 15, 2024: Stanciulescu writes: I came across your page in search of more answers to understand the confusion and the objections of others on the Internet regarding the order of operations in an equation. I hope that the subject is still relevant because I would like to have a constructive dialogue on this topic, so that I will further explain my confusion and some suggestions. I'm not from the USA, so I didn't study there, but in Europe, in Romania, to be more precise. I say this because over the years and recently these equations have been circulating on the internet, which seem trivial at the base, but the world always gets different results. Let's take it as an example the classical equation ÷2(2+2). In my education system and I think in Europe in general, I never learned PEMDAS, but I learned PE(MD)AS from a young age. So my natural and "correct" answer according to the learned math rules is 16, but from what I've read I understand that these are more conventions than rules and I understand that the brackets would definitely solve the confusion. However, I learned PE (MD)AS with the idea of not using extra unnecessary brackets and I think it is the easiest to implement in general. Now a perhaps stupid question arises. Why does PEMDAS exist? Isn't it possible that the confusion exists precisely because two conventions are taught that contradict each other in certain situations? Shouldn't mathematics have some basic rules to guide us when solving an equation? (Until now, I thought that this PE(MD)AS actually clarifies the rules of the "game", but apparently it is an unnecessary confusion in the world of mathematics) It seems that we ourselves create confusion through the education system and that mathematics is not to blame, how can you learn something in one country and something else in another? For me, the learned version, which I thought was a law in the order of operations in an equation, does not create any confusion and I think we should agree on a single official version. In the equation ÷divide;2(2+2) it is not necessary to add additional parentheses (assuming we accept the convention that if there is no symbol after 2 there is multiplication), thus solving the parenthesis first we get the equation ÷divide;·2*4 which I see that it creates confusion. Obviously, according to the "rule" that multiplication and division have the same priority in the equation, we will solve it from left to right. So automatically ÷2*4 becomes (÷2)*4. Of course, the bracket eliminates any confusion, but my question remains, why does PEMDAS exist if I haven't even heard of it and it seems to create confusion? I saw some examples in your article and I mostly agree with what you presented, but it seems that the confusion is created only by PEMDAS, because for an equation like 8*8*7÷5*6*3*2. I'm not going to add the parenthesis after each added figure because it will create a visual madness and it wouldn't be necessary if we did the calculation from left to right in the order of equal priority. Examples like 3/2x seem totally different to me because the symbols / and ÷· have a different meaning as an interpretation, in this case everything after or "under" / is a separate calculation. But the example like 3x÷·4y or 3* x÷·4*y is solved from left to right, and parentheses should be used precisely when we want to specify that certain calculations must be grouped and we put (3*x)÷(4*y). Another example that creates confusion for me is as you said,"there is now enough empirical evidence and I check that regularly also in the classroom that many humans would interpret something like 6÷2(2+1) as 1 and not 9", which without giving the impression that I want to be different, I don't think it is at all valid in my country. I strongly believe that there are extremely few people who would answer with 1 to the equation above because the order of operations is clear following the principles of PE(MD)AS. I understand that depending on how you write an equation can be interpreted differently, but when we talk about basic equations in mathematics there should be only one interpretation depending on how you write that equation and finishing a faculty of automation and computer science I did not encounter the problem the ambiguity of an equation unless the result made no sense. Thus, the lack of parentheses in an equation would have been the teacher's mistake, because without them we simply apply the basic "rules" in the order of operations in an equation, i.e. what we learned in the first school classes. I know that I have written a lot and said very little, but I would also like to hear your opinion on this subject. Why is PEMDAS taught if it contradicts other conventions and other countries use the PE(MD)AS version from the start, which eliminates confusion and allows a freer and easier writing of equations without excess brackets. I don't dispute the ambiguity of the situation, I try to solve it, but I think that we are learning too many things that lead us to that ambiguity and that eliminating them and replacing them with others that work better on a global level is a more practical solution than adding even more rules . I think that math is not confused, only we are confused. My answer: Hi Stanciulescu, You say "I learned PE(MD)AS from a young age." It must a very small part of the population who had been taught this. Maybe it increased in the last 10 years due to exposure. I'm from Switzerland and had not been aware of the notational difficulty until it had flared up 10 years ago. You ask "Why does PEMDAS exist?" It is an acronym that has a chance to be taught. PE(MD)AS is harder to explain as one has to explain the logical interpretation of (MD) as being on the same level. In reality, like L/2pi reads L/(2pi). You say "Parenthesis will add visual madness". One does only need to add parenthesis to resolve the ambiguity. Usually, one bracket is enough. In our modern time with good typesetting systems one can write \frac{xyz}{abc} for example one can avoid brackets even. You say: "I strongly believe that there are extremely few people who would answer 6÷2(2+1) with 1" The reality is different. The last 10 years enough experiments have been made. Experiments in media show that the last majority of the population interprets such expressions differently. A lot of literature avoids brackets violating the PE(MD)AS rule. You say "Why is PEMDAS taught if it contradicts other conventions and other countries use the PE(MD)AS version from the start, which eliminates confusion and allows a freer and easier writing of equations without excess brackets." One has not been aware of. One always underestimates what is realistic to teach. One forgets that language always had and always will have ambiguities. It is a social construct and so can not be engineered easily. You say: "I think that math is not confused, only we are confused". Math has never been confused. But math is also a language that must be spoken and is used to communicate ideas. The reality matters. We might wish to use it perfectly, like lawyer's do when writing contracts. But we also need to be practical and use it reasonably. The goal is to avoid communication errors. Oliver September 22, 2024: Doug writes: Hello Dr Knill, It appears the viral equation that stirs up controversy across social media is once again making the rounds. I'm just a lowly cybersecurity undergrad, but the underlying rules and perceived ambiguity of the equation 8 / 2(2+2) has caught my attention. I can't seem to focus on my work until I come to a satisfying answer. I believe the answer lies within the distributive property, oddly enough. Can we distribute a(b+c) if it is attached to another operator of equal or greater precedence as is the case in the "controversial" equation above? Can it be solved as 8 / (4+4) after distribution is applied? I was taught that we cannot distribute if it's tied to another operator of equal or greater precedence, but I'm honestly not certain if this is actually a rule. Are you aware of any cases where distribution of this nature would lead to incorrect output? Do I need to go to my retired high school algebra teacher's home and demand that lost point back? If distribution is allowed in this case, it implies that 2(2+2) is an individual term and the equation can be interpreted as a fraction with 8 as the numerator and 2(2+2) as the denominator. If not, then the equation must be interpreted as 8/2 multiplied by (2+2) unless explicit brackets around 2(2+2) are required for it to be interpreted as an individual term. Is the 2 outside the brackets 'stuck' to the term inside the brackets? I look forward to your response. Thanks, Doug My answer: Hi Doug, 8/2(2+2) is ambiguous because it is read in different ways depending on the rule one uses. If you write 8/(4+4), it is no more ambiguous. as you have chosen to evaluate 2(2+2) first. You made a choice similarly as when putting brackets. One can not resolve with distributivity other cases like 7/2m which most read as 7/(2m) rather than 7 m/2. Experiments show that most people read 8/2(2+2) as 1 and not as 16. Computers give 16. The fact that most folks read it differently forces the writer to clarify. This is why I called the phenomenon already more than 10 years ago an "Ambiguity". It can not be "resolved", it must be avoided. Oliver September 25, 2024: Nyamkhuu writes Dear Oliver, I have encountered PEMDAS problem similar to your post discussed, And I advise the owner of the question that we should write an unwritten multiplication sign and proceed like 8/2*(2+2)=16. But I noticed something interesting and was willing to ask about it. If I remember correctly, during my highschool we interpreted 8/2sqrt(2)=8/(2*sqrt(2)) and hence the answer should be 2*sqrt(2). But if we apply the same advice I gave, it is 8/2*sqrt(2)=4sqrt(2) and given the nature of sqrt(8)=2sqrt(2) the latest answer would be wrong, am I right? Just like someone who mentioned in your post, during high school we emphasize unwritten multiplication symbol more than written one (as a coefficient for example in 2pi which itself is understood 360 degree (even though computer interprets it wrongly for example computer would interpret 1/2pi as a pi/2 where as we would interpret it 1/(2pi) ) ) So since the person ask for advice needs elementary school level of answer, I gave "we should always assume there is multiplication symbol written and proceed as left to right" answer. But more I think about it, especially about 2pi and sqrt(8)=2sqrt(2) why we shouldn't take 2x and 2sqrt(2) as a whole as 2 is just a coefficient of the last part? (migh be different for the 8/2(2+2)= case, but I encountered an equation case more like 8/2x=2,) So I honestly agree with you 100%, I also gave advice that we should be given concise problems to the student which can't be interpreted in more than one way. But what intrigues me is 8/2sqrt(2) which if I follow advice I gave the result 4sqrt(2) but I did solve this problem as a 2sqrt(2) for my whole life. My question is, am I doing things wrong or sometimes the computer interprets things wrong? What do you think the answer should be? (I know full well that we should write it as 8/(2sqrt(2)) but I just want to know your personal opinion about the answer.) Sorry for my broken english, english is not my native language. But I hope I described situation and present the question without double meaning. (Also you don't have to include it to the blog post, since it is poorly written) Just to clear the confusion, to write it fast I substituted : as a /. And what gives me more confusion is photo math interprets 8sqrt(2):4sqrt(2) as a 8*sqrt(2):4*sqrt(2) and answers 4, whereas wolfram alpha interprets like me and gives 2 as an answer. What I am trying to ask from you is whether my and WA's interpretation is correct or wrong? And if it is correct, why do mathematicians as a community set it as a rule that considers a written number as a coefficient like my previous email? Best wishes, Nyamkhuu My answer Hi Nyamkhuu, it is a great example. I like 8/2sqrt(2) very much because I bet that the large majority of the population (including me) would answer with sqrt(8) = 2 sqrt(2). A computer like the computer algebra system Mathematica gives 8/2Sqrt[2] = 4 Sqrt[2] . Also in the second example 8sqrt(2) : 4sqrt(2), a computer gives 4, while most people (and so also most students) would give 2. Indeed, one can even disregard the * and write 8Sqrt[2]/4Sqrt[2] and the computer gives 4. This is why it is ambiguous. No teaching or indoctrination can change the fact that humans tend to treat expressions like 4sqrt(2) as units especially if the multiplication sign is not written (Mathematica allows this). This happens even more with constants like 4/2i where most humans read 2i as a unit and get 4/2i = 2/i while a computer gives 2i. In applications, where we often divide by 2pi, like in Fourier theory, this is prominent and the AMS writers guide a few decades ago even recommended not to put brackets in this case. Most folks read h/2pi as h/(2pi) and not (h/2)pi. These are ambiguous expression and should be avoided. It is easy to avoid if one is aware of it. Avoiding ambiguity even to the point of being redundant, that is good communication. I gave above in the blog the excellent example of Kneubuehl's book in physics who almost religiously used \frac{a}{b} for fractions and not a/b, just to be sure that nobody reads it differently. It is not only in math, also in politics or society. Much of the "divide" in society comes from ambiguous (and often willfully planted) ambiguous and loaded expressions, which are known to be interpreted in different ways. Oliver December 25, 2024: Robert writes (I abbreviate) I have a historical view on the ambiguity of 8:2(2+2). I have an explanation written and discussed with chat GPT which outlines the historical view ... and the universality of math. I was thought that in algebra implicit multiplication has priority over explicit. Also if y:2(a+a) equals y:2(2a) means y:4a Math rules need to be universal to all fields. Not just pure values. My answer: Hi Robert, yes, languages need to be universal, independent of the field and technology. This is hard to achieve so that we can not get around using redundant language. This is indeed historical and cultural also. The ambiguity of arithmetic can be easily bypassed by writing expressions more clearly. If you write y:4a , then this can be interpreted as y/(4a) or (y/4) a. Computer algebra systems give from the input y/4a the output ay/4. Most of us humans interpret y/4a as y/(4a). Yes, I have over time tried to test AI on understanding the issue and it is already quite good. It completely agrees with the point of view, I have advocated here for a decade (it might have read this post ...). Here is what chat GPT currently tells about y/4a In short: Historically, y:4a might imply y/(4a) Following strict PEMDAS left-to-right evaluation, it could imply (y/4) a. Parentheses are essential for clarity. I could not have said it better. Oliver Update from January 5th 2025: A suggestion of Scott Stockings, he calls "Stocking order": Dr Knill I wrote to you in 2023 about one of the viral math problems, and I've been mildly obsessed about developing a theoretical model that, outside of the generous use of parentheses, would compel ANY grouped form like 2(2 + 2) in 8 / 2(2 + 2) to be treated as an implicitly grouped form with implied parentheses. We already do it with mixed numbers (juxtaposition with implied addition) and fractions (juxtaposition with implied but not necessarily actualized division), so why should we treat implicit multiplication any differently. I have included a link to a video I made explaining my position. And if you think about it, exponents and other juxtapositonal groupings with brackets are implicit as well. If and when you have time, I would appreciate your thoughts. Thank you. Scott Stocking My answer Hi Scott, good luck with teaching this! The difficulty is to identify what is implicit. Somehow, the group 2(2+2) is grouped. You try to encode what people think when reading 8/2(2+2) Most folks give the answer 1. A computer or some of the most common interpretations (especially computers) give 16. I can only add that the cartoon answers this best https://xkcd.com/927 And can only repeat that this is an ambiguous expression which different parties interpret differently, forcing to clarify. Oliver
Update of January 15th 2025 Andy Watson sends the following AI generated picture: Andy also suggested to put something on youtube. I have just edited from my phone a short 1 minute extract from an older video: this short was extracted from a Video from 2022 about elementary algebra. Follow up from January 17th, 2025 Considering it is simply a/bc, it would be interesting to dig up Florian Cajori and ask him how something so simple is causing so much mayhem ! The psychology department at Harvard need it as spring semester homework , I'm sure they have calculators for the maths bit, even though the calculators will come up with two answers. yes, Cajori got it right 100 years ago. And yes, calculators often do not agree as the video of Winklmaier Link (MOV) showed. And, yes, the subject relates with psychology and human nature. Language is a tool to communicate and sometimes requires clarity. It needs redundancy if clarity can not be enforced. This is also the case for mathematical languages. It is good to have redundant structures and the possibility to do error correction. Errors especially happen if one has pre-existing conceptions or definitions that differ for sender and receiver. This happens so often, especially also in non-mathematical contexts like social issues or politics. In our modern world, some words trigger strong reactions even if they are defined. Also, and that is also psychological or pedagogical, we humans are quite simple creatures. Teaching complex rules which seem elegant or correct and unambiguous for some elite is futile. One sees especially on the academic side a push to to enforce language to the general public. There was once an effort in Germany to simply the German language by removing capitalization for example. Maybe one can say that language also has "momentum". One can only slowly change it. The same is with mathematical structures. 2/28/2025: Dark Angel writes: I invite you to demonstrate this equivalence with real terms: x/a*(b+c) = x/a(b + c ) I promise you it cannot be done. The "ambiguous" expression is not "ambiguous" at all, it is illustrating a fundamental algebraic operation, the parentheses, factorization, in the presence of a division operation. The solution is easily explained. I have 6=x apples. There are 2=a houses, in each house (there is 1=b child and c=2 adults [people].) How many apples can I give each person? ----------------------------------------------------- 6/2(1+2)=6/2(3) Each child and adult is a person = 6/(2*3) When you distribute) = 6/6 You can divide the apples among the people = 1 And see each person gets 1 apple ------------------------------------------------------ This expression is the meme of countless nonsense and misinformation. In every scenario where they evaluate 9, they clearly demonstrate, they have performed division before ever concerning themselves with the parentheses. My Answer: Hi Dark Angel, the expression is ambiguous because one interpretation is x(b+c)/a if you do division before the multiplication. Indeed, computer algebra systems give us that. Below I add what Mathematica tells. I agree that most humans interpret x/a(b+c) as x/(a(b+c)) as you explain with the apple house and people story. Most humans read 6/2(1+2) = 1 Oliver Wolfram 14.1.0 Kernel for Linux x86 (64-bit) Copyright 1988-2024 Wolfram Research, Inc. In[1]:= x/a(b+c) (b + c) x Out[1]= --------- a In[3]:= 6/2(1+2) Out[3]= 9 April 16, 2025: Louis writes Four years ago, I wrote to you about a problem on the internet 6/2(1+2). We discussed the inherent ambiguities of the problem; logical mathematical properties and you ultimately convinced me that parentheses were the only logical resolution to the problem. Since then, I have followed your AMBIGUOUS PEMDAS blog over the years and in my mathematical bumbling, I have recently stumbled upon a mathematical proof which I believe demonstrates unequivocally the actual answer to the problem without the need for parentheses. I realize that, in the current environment, parentheses is the simplest way to avoid ambiguity. However, I believe there is a mathematical (rather than ideological) based solution that resolves the issue and is consistent with the ISO ruling. I have not seen this proof before and it seems unlikely to me that someone else has'n already presented it. In any case, the logic and proof are as follows. Hi Luis, you seem to deduce somehow "Multiplication should take priority over division". This is what PEMDAS suggests (M before D) It would have been possible maybe 150 years ago to entrench such a rule. The situation is however that practically all computers treat M,D on an equal footing and take first what comes first. There are competing standards and there is no way out of this linguistic fact. You mention the PE(MD)(AS) rule. Like PEMDAS this is a postulated law. There is no proof which tells whether PEMDAS or PE(MD)(AS) is "right". It's like trying to prove that a certain grammar rule for a specific language is true. Language is a human construct. There are many ways to build the rules and all are "correct". But language is used to exchange information and for that one needs a "common key". If there is no established common key, one has to clarify with brackets. There is also no more fundamental foundation which can decide the matter. There is a big difference between division and multiplication. Multiplication is associative, division not. 6/2/3 is not well defined. Most interpret it as (6/2)/3=1 but you could also read it as 6/(2/3) = 9 and many humans might do so because many would see 2/3 as a number and think 6/"two thirds" which is 9. You seem to try to get rid of the quotient by writing a/b as a (1/b). If you do that you already make a choice. Note that a/b/c with this assumption is a*(1/b)*(1/c) = a/(bc) which takes the brackets to the right. This clashes with all computers and calculators. If you type a/b/c you get a/(bc). As I mentioned, there are quite a few other ambiguities like that exponentiation: a^b^c is read by some as (a^b)^c and others read it as a^(b^c). If you have a non-associative operation, you have to put brackets. Your suggestion to write a/b as a*(1/b) kind of puts brackets too and especially violates the left to right rule which is more entrenched. Oliver August 1, 2025: Louis writes Hi - I wanted to get your opinion on the use of language in helping to solve equations. Most people agree that 8/2(2+2) is 8/2(4). But I read the second equation as eight divided by two fours, not eight divided by two times four, which some people translate it as. Ultimately, I don't think that 2(4) and 2x4 mean the same, even though you use multiplication in both. Obviously they are both 8, but one says multiples of something, while the other is just straight forward math. And putting parentheses around both expressions doesn't change that they are different. Neill Hi Neill, the problem with 2(4) is that it can be read as 24. This was probably the reason to put the parenthesis. It is better to write 2*4. Then put parenthesis to make clear when writing 8/(2*4). Yes, most people read 8/2(2+2) as 1 and not as 16=(8/2)(2+2). The case 8/2(2+2) is probably not as divisive. More controversial is the expression 8/2a with a=2+2. In that case, most humans read it as 1, while computers evaluate 8/2a as 16 if a=2+2. I agree that putting too many parenthesis like 8/(2(4)) is a bit confusing. Oliver Update of September 17, 2025: Saw this problem on twitter: It is clear what the writer of the problem wanted and see the answer 5 but it can also be understood as sqrt(2). Division is not associative and 3/1/3 + 4/1/4 is usually resolved from left to right. Mathematica gives [knill@knill12:] math Wolfram 14.2.1 Kernel for Linux x86 (64-bit) Copyright 1988-2025 Wolfram Research, Inc. In[1]:= 3/1/3 + 4/1/4 Out[1]= 2 This problem obviously makes many angry, and rightly so