Talk:Order of operations

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Mathematics (Rated C-class, Mid-importance)
WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
C Class
Mid Importance
 Field:  Basics
WikiProject Computer science (Rated C-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.

Minor Edits 25 March 2006[edit]

Changes inside the table only:

  • capitalization more consistent
  • removed & (ampersand) where is should be the word "and"
  • made it clear that there is more than "comparision less-than"

Charles Gaudette 18:54, 25 March 2006 (UTC) there is so many things that people can do to save math —Preceding unsigned comment added by (talk) 18:07, 1 March 2011 (UTC)

BODMAS' O[edit]

The O in bodmas is by no means universally held to be Orders. In fact, this is the first time that I have heard it to be specifically called this. Others that I have heard include:

Over (Similar to divide or brackets) Other (would include exponents) Of (Similar to divide) Order (Close to orders)

Essentially, the O is there really just to add a much needed vowel in the middle of a group of consonents. This is especially true when considering that it is really only useful for children - as an acronym wouldn't do for all of the mathematical operators (really). MATH HAS A HATER... ME!

When I was taught the Bomdas Rule (Ireland) 'O' meant "Of means multiply, and must be done as if inside brackets" for questions such as 2 + 1/2 of 4. Regards, MartinRe 10:39, 7 May 2999 (UTC)
Ref for above [1] MartinRe 10:41, 7 May 2006 (UTC)
I was also taught this (in England), and I believe it is wrong. Most people would evaluate "1/2 of 3 + 7" as 5, some as 8.5, and none as 7.16666 (as required by the "Of" version). Maproom (talk) 09:35, 4 April 2008 (UTC)

In the school text books of the school where I went in the North-east of England, about six years ago, it almost always said the O stood for 'of'.--Jcvamp 06:08, 14 February 2007 (UTC)

  • BODMAS Should be included as it is used in England as the mnemonic used —Preceding unsigned comment added by (talk) 02:51, 15 February 2010 (UTC)


Almost all descriptions of the order of operations are flatly wrong, including the one here. To give just one example, in 2 + 3 + 4*5 it is perfectly ok to add the 2 and 3 before you multiply the 4 and 5. In fact, the very phrase "order of operations" is misleading. What this article is really about is understood parentheses, since the operations of arithmetic are all binary operations. Small wonder that non-mathematicians have trouble understand algebra! Rick Norwood 14:18, 7 May 2006 (UTC)

Do you have a source? It looks like that fails the Google Test:
Results 1 - 10 of about 23 for "understood parentheses".
Results 1 - 10 of about 631,000 for "order of operations". capitalist 02:29, 8 May 2006 (UTC)

Yes, as I said, almost all. In this case 631,000 to 23. All professional mathematicians know better, but few spend any time fighting the battle to improve elementary education. It doesn't do any good, and annoys the education majors. Rick Norwood 19:26, 8 May 2006 (UTC)

Well if the goal is to improve communication between the 23 and the 631,000, wouldn't it seem easier to convince the smaller group to change their terminology instead of trying to get the rest of the planet to go along with the 23? That would be the quickest way to get everyone on the same sheet of music. Or are there factual issues beyond just the terminology? In other words, if the 631,000 build computers using the information in this article, will they not work as well as computers built by the 23? If that's the case then the 631,000 must change in favor of the 23. If it's just terminology then I think the reverse is true. capitalist 04:24, 9 May 2006 (UTC)

All computers and most calculators use the correct heirarchy. The one in this article is the one usually taught, and in a sense, it works, but nobody who understands mathematics would insist, in the problem 1 + 2 + 3*4, that you must do the 3*4 before the 1 + 2. Clearly, you get the same answer either way. Rick Norwood 21:18, 10 May 2006 (UTC)

The article doesn't claim that you won't get the same answer. In the first line it states that O.O.O. is a notational convention, not mathematical fact. It sounds like just a terminology issue. Given the preponderance of the term "order of operations" over the term "understood parantheses" my guess would be that the latter term is disappearing from the language. An interesting case of linguistic evolution I suppose, but at any rate I wouldn't recommend trying to stem the tide through a change in the title of the article. capitalist 03:24, 11 May 2006 (UTC)

I, too, would oppose a title change. I do think the rule can be stated precisely. Just what more a precise statement would take is something I've been working on. Rick Norwood 17:27, 11 May 2006 (UTC)

I have a question what's the score from: 7-4+3*0+1 - because in every country I have been so far it's 4 and only 4. Poland, UK, Ireland, Slovakia. — Preceding unsigned comment added by (talk) 04:23, 10 July 2012 (UTC)

The answer is 4. Rick Norwood (talk) 18:42, 10 July 2012 (UTC)

Re: "Almost all descriptions of the order of operations are flatly wrong, including the one here. To give just one example, in 2 + 3 + 4*5 it is perfectly ok to add the 2 and 3 before you multiply the 4 and 5." This is disingenuous. What order of operations rule does is prevent the 3 being added to the 4. It is true that the addition can be done in two stages as described. But this can only be done by somebody who recognises that the 4 and the 5 are factors not units that must be dealt with before the final addition can be completed. In other words, the problem must still be parsed with PEDMAS first.

Mathematicians never use PEDMAS any more than physicists ever use Roy G. Biv. Both are mnemonics for beginners. Mathematicians know that "order or operations" only applies to the two operations that precede and follow a given numerical expression. Rick Norwood (talk) 14:50, 10 September 2012 (UTC)
Rick, I think you're laboring under the belief that the word order implies a chronological order, and not a hierarchical one. The order of operations is a hierarchy that allows one to correctly interpret other algebraic properties.
Using commutativity as an example: In the expression 2 + 3 + 4 * 5, the 2 and 3 may be interposed, and 3 + 2 + 4 * 5 will give the same result. Similarly, the 3 and the compound term 4 * 5 may be interposed, and 2 + 4 * 5 + 3 will give the same result. But the 3 and 4 may not be interposed: 2 + 4 + 3 * 5 gives a different and incorrect result. The commutativity of the + operator doesn't "outrank" the * operator, because * is of a higher order than + (and not necessarily that it must be done first).
Similarly, we may associate 3 and 4 * 5 and compute 2 + (3 + 4 * 5), but we may not simply associate 3 and 4 and compute 2 + (3 + 4) * 5, because the * operator binds the 4 more tightly than the + operator does.
Fortunately, interpreting the hierarchical order of operations as a chronological order never results in an incorrect result, and so students are often taught that it is a chronological order before they are exposed to more abstract ideas as commutativity and associativity. --Heath (talk) 02:45, 21 January 2013 (UTC)

Everything you have said is true, but in practice, we use the hierarchy to do things chronologically. As you say, the language for students is active rather than abstract to make it easier for beginners to understand. I just wish my children had not been taught false information. Their gradeschool textbook, written by a member of the editorial board of Mathematics Teacher, said 7 - 4 + 1 = 2 because Aunt comes before Sally. I think that now this Wikipedia article has it right. Rick Norwood (talk) 13:25, 21 January 2013 (UTC)


Anyone knows what would be the result of the equation y = 2x-x^2+6 when x = -0.5? Would it be 4.75 or 5.25? Is the negate applied to the x^2 first or the order 2 applied to x first, then negate?

xieliwei 16:39, 25 June 2006 (UTC)

Substitution, in an ambiguous case, must be carried out within parentheses. Thus, replacing x with -0.5 yields 2(-0.5) - (-0.5)^2 + 6 = -1 - (0.25) +6 = 4.75. Rick Norwood 14:01, 25 June 2006 (UTC)

I have a question also, when did mathamatics start using the Order of Operations? Was it something that came with the computer age or did the likes of Sir Isaac Newton or Pythagoras use it?--SerialCoyote 19:29, 17 November 2006 (UTC)

Obviously it was not as recent as the computer age. Just look at math journals and books of the 19th century or journals and books that appeared in the first half of the 20th century. How could they have done without such things?? It seems weird to think they could have. Michael Hardy (talk) 17:04, 5 July 2008 (UTC)
That is an excellent question, and a subject worth researching. This article would benefit greatly from such information. Rick Norwood 13:33, 4 December 2006 (UTC)
Mathematics started using the Order of Operations immediately when multiplication was understood as a concept. It is not a convention that is true because it is agreed upon. It is a theorem (although not usually stated as such) that falls out from the definition of multiplication as repeated addition and the axioms of arithmetic (in particular, the distributive law and the multiplicative identity). Ditto for exponents because they are defined as repeated multiplication.Guildwyn (talk) 14:46, 5 July 2008 (UTC)
Wow - talk about a lightbulb moment! How did I clock up half a century without figuring that out? Blindingly obvious when stated like that. Thanks Guildwyn (if you are still around). (talk) 14:42, 22 February 2017 (UTC)

Unfortunately, what Guildwyn says is not correct. Historically, various orders of operations have been used, and even today, as this article points out, different computer programs use different orders of operations. Because multiplication is repeated addition, it is convenient to do multiplication first. But it is not a theorem. Rick Norwood (talk) 12:24, 23 February 2017 (UTC)

I agree with Rick. Moreover, the order of operations was not considered before the invention of algebraic notation by François Viète during 16th century, while multiplication was understood as a concept 2000 years before (Euclid was certainly not the first one to understand this concept). D.Lazard (talk) 13:23, 23 February 2017 (UTC)

Order of Unary Minus[edit]

I believe the 5th example (Examples section) to be incorrect. I'm loathe to go and change it since that could easily descend into arguments, so here's my understanding:

The article has , but the OOO should actually be

I can't find a lot of authorative references on the internet, but the 2 I did find are:

Intentional 01:59, 3 December 2006 (UTC)

You are correct. Rick Norwood 13:31, 4 December 2006 (UTC)
Not even the Math Forum writers agree 100% -- at least recommends using parentheses to remove ambiguity:
In practice, the meaning comes from the context of the problem one is modeling. I don't know that the most common convention, can accurately be called "standard." Is there a standards body which publishes mathematical order of operations?

Gerardw 23:06, 11 July 2007 (UTC)

This standard comes from the way we write polynomials. Since always means the opposite of the square of x, and for real x is never positive, we would wish to be able to "plug in" 3 for x and get the same answer: Rick Norwood 14:16, 21 September 2007 (UTC)

Microsoft Excel[edit]

Would it be useful to mention that in Excel, arithmetic negation has a higher precedence than exponentiation? For example a formula such as -2^2 will return 4, as in (-2)^2, rather than -4, as in -(2^2). This is an endless source of pain and confusion because most other programs and languages interpret it as -(2^2). In particular, I've seen many people fall into this trap when trying to write a Gaussian function in Excel. For reference, see [2]. Itub 12:08, 19 February 2007 (UTC)

Unix's bc programming language, which uses a very C-like expression syntax plus exponentiation, does the same thing; I've noted this as well. Using binary subtract instead of unary negate avoids the trap (0-2^2 = -4), but I'm not sure it's worth mentioning that in this article. 03:16, 3 July 2007 (UTC)

I'm glad to see that these important facts are now in the article. Rick Norwood 14:02, 3 July 2007 (UTC)

Fractional lines[edit]

A while ago I added "fractional lines" together with "roots". Now, Rick Norwood has removed it again, with the edit summary to say you do "fractional lines" first is confusing and misleading.

I don't get this. As I understand it, in and , "1+2" and "25+2" are evaluated first, then the root respectively the division, and finally the multiplication. This is because roots and fractional lines come before multiplication in the hierarchy. In , the division and the multiplication are done before the additions, because division and multiplication come before addition. So division written with a symbol like "/" and division written by fractional lines do not have the same place in the hierarchy. I find it confusing and misleading to omit fractional lines at this point.

It seems most people describing the hierarchy do omit fractional lines here; I just don't understand why. Can anyone explain this?--Niels Ø (noe) 18:58, 21 October 2007 (UTC)

To say "do" fraction lines first is confusing. A horizontal fraction line (but not a slanting fraction line) is both a symbol of division and a symbol of grouping. In 2 + 3*4 we "do" the multiplication first, meaning that we multiply first. But to "do" the fraction line first does not mean that we divide first. It means that we first treat the fraction line as a symbol of grouping, and only later treat it as an operation. This is too complicated to put in a chart.
I suspect that more lies have been told to students about the order of operations than about any other subject except American history. The order of operations is essential to progress in mathematics, but it is frequently misunderstood. I suspect misinformation about the order of operations is responsible for at least some of the failure in America to teach our children math. The mathematically able pick up on what the hierarchy "really" means by following examples, and discard the misinformation in the textbooks. Rick Norwood 21:29, 22 October 2007 (UTC)
OK, but why not omit roots from the chart too, then? is - I believe - not an acceptable notation anyway, and in or , the horizontal line is a symbol of grouping, much like the fractional line.--Niels Ø (noe) 06:43, 23 October 2007 (UTC)

Taking the nth root of m is a binary operation which can be indicated in several different ways. One way is m^(1/n). Root taking is done before multiplication or addition. 4*9^.5 = 12. Also note that the hierarchy was designed so an operation and its inverse are on the same level. Root taking is the inverse of exponentiation. 4^2^.5 = 4. Further, just as subtraction is a form of addition (addition of the opposite), and division is a form of multiplication (multiplication by the reciprocal), root taking is a form of exponentiation. The people who designed the hierarchy did not choose which operations to give precedence to randomly! There are many other patterns in this chart. Another symbol for root taking is the radical sign. It, like the horizontal line, is a symbol of grouping as well as an operation. The whole subject of symbols of grouping is an interesting one, but it is a different subject from order of operations. Rick Norwood 15:21, 23 October 2007 (UTC)

It may well be worth addressing 2D display formats like the rules for how you interpret them are somewhat different to 1D inline formats. Display formats are deserving of their own section. --Salix alba (talk) 17:55, 23 October 2007 (UTC)
4*9^.5 is not a root, it is a power, just as 4+(-3) is a sum, not a difference. The hierarchy is about how to interpret what is written in terms of operations to be performed (e.g. "add four and negative three"), not about other expressions having the same result (like the difference 4-3, "subtract three from four"). If roots are to be mentioned, it must refer to roots written as roots with a radix sign, but I still think it should be removed.
I think Salix has a point: The hierarchy is about interpreting math written in "1D" with "incomplete parenthesisation"; I don't know how best to express this. Interpreting "2D" features like fractional lines or radix signs, or interpreting parentheses, is in my experience as a teacher never a problem - but translating 2D expressions into 1D so that it can be entered into a computer or calculator often is, and so is removing parenthesis from expressions like 1-(2-3).--Niels Ø (noe) 11:41, 24 October 2007 (UTC)

First, please note that removing "roots" from the hierarchy is not an option, since the chart as given is standard in the literature and not ours to play around with. Second, 4^.5 is a root, because the definition of a unit fractional exponent is that it indicates a root. (It makes no sense to multiply 4 by itself half of a time.) The hierarchy only depends on the operation, not on the symbol used to indicate the operation. If I write using words instead of symbols "find two times the square root of 9" or "find the square root of 9 times 2", either way the answer is 6, because of the hierarchy.

Of course, we could all switch over to Polish prefix notation, but having taught classes using the old Hewlett Packard calculator, I don't think that would be a good idea. Rick Norwood 13:36, 24 October 2007 (UTC)

I'm not sure what you refer to by "the chart as given is standard in the literature"; it does not seem to be in the references or links cited in the article, and I have found several places that conform with the PEMDAS mnemonic - i.e., no mention of roots. I repeat, 4^.5 is not a root, and it is a different expression from 4^(1/2) (which, however, isn't a root either). Of course, they have the same value, but that is not the issue here. (Incidentally, CAS systems may consider them different as the expression with 1/2 may be evaluated exactly, where as the one with .5 may give a finite precision answer). Your argument about multiplying 4 by itself half of a time cannot be generalized to something like , , or with irrational exponents, anyway. I have to repeat: Order of operations is about how to interpret an expression as a sequence of computational steps. Expressions like are dealt with by the rule without the mention of roots, as exponents are evaluated before multiplication, so you have to come up with either several specific references where roots are mentioned in the hierarchy, or with an example using proper math notation (as opposed to various computer- or CAS-notations) where explicit mention of roots (as opposed to fractional lines) is needed to interpret the expression correctly.--Niels Ø (noe) 15:43, 24 October 2007 (UTC)

All mathematicians agree about the order of operations, which greatly aids international mathematical communication. As the article shows, some computer scientists disagree.

PEDMAS is used in grade school, and in every American grade school book I have examined it is stated incorrectly. For a good book on the subject, you need to go to another country, such as Finland or Singapore. The big problems with PEDMAS are first, it confuses symbols of grouping with operations, and second, it wrongly suggests that addition should precede subtraction.

In mathematics, an operation is a function, and two functions are equal if they give the same output for every input. A binary operation is a function whose input is an ordered pair. You are confusing the operation, that is to say the function, with the notation, which is traditional and arbitrary, and with the method by which the output is computed. The square root, the exponent 1/2, and the exponent .5 all indicate the same function, called the square root function, because in every case the output is, by definition, the non-negative number whose square is equal to the input. You say that the fact that they have the same value is not at issue. In mathematics, that is exactly the issue. Same value means same function.

You mention . There is a lot of history, here. Originally, exponents were written as words, quadratum, cubum, and so on, and only whole number exponents were allowed. Square roots were indicated by the letter R. Thus the square root of 4 squared would be written R4quadratum, and the answer is the same whether the root is taken first or the exponent is taken first, thus roots and exponents are on the same level in the hierarchy.

Gradually, over the centuries, negative, fractional, irrational, and imaginary exponents were allowed, so that by the 18th Century, Euler could write e to the pi i equals minus one. , is defined to mean the limit as n/m approaches pi of the mth root of 4 to the nth power, where m and n are relatively prime natural numbers. On the other hand can be computed using e to the power pi ln 4. The former is a definition, the later a theorem.

Each of these new kinds of exponents had to be defined, but in every case exponents were still given precedence over addition, subtraction, multiplication and division, and put on the same level with roots. The other three signs could be written either before or after a number, but a root sign must always precede the number it acts on, and an exponent sign must always follow the number it acts on. Thus in R4*9 you do R4, then *9, but in R4^9 you can do either operation first.

The bar over the root sign evolved from the expression RV, which stood for radix universalis, and meant to take the root of everything that followed. Thus RV4*9 meant R(4*9). In modern notation, , but . The bar is a symbol of grouping, not an operation.

Rick Norwood 14:15, 26 October 2007 (UTC)

Thanks for the history lesson, which I find very interesting. Perhaps we should have an article about that, or a history section in the present article. However, it does not change my opinion that order of operations, today, is about interpretation of notation, and and are different notations. I agree that PIDMAS or whatever is not a good mnemonic, and I also agree that functions is an important concept here, but perhaps I do ont agree as to why. Function notation needs no hierarchy of operators to be unambiguous, so you could state the order-of-operations-thing as a set of rules for converting the strange way we write math into function notation (Łukasiewicz notation, if you like): = sum(2, product(3,4), product(5,power(6,2))).
Similarly, = squareroot(4) = root(4,2) = power(4,1/2) = power(4,0.5) = . Here some equal signs represent translation between different notations for the same computation - some represent mathematical identity between different computations.
But, to return to the original questions about the radical sign and fractional lines, if a notation like is considered acceptable - today, that is - I can see why one would need to include roots in the hierarchy. Otherwise, I can't. The notation is much like f(blah blah): You don't need a hierarchy to interpret it.--Niels Ø (noe) 16:11, 26 October 2007 (UTC)

The notation was very common twenty years ago. Today, the use of calculators has just about wiped it out, because calculators usually treat the nth root of m not as a binary operation but rather as a family of functions "nthroot" acting on a single variable m, and calculators require function arguments to appear inside parentheses. Thus, if we only wanted to consider calculator mathematics, we could let exponents stand alone at the top of the chart. In years to come, the very idea of a "root" may wither away.

But that day is not yet. Also, I think the old chart is still useful as a mnemonic for many other rules. For example, in terms of the chart, each operation distributes over the two operations one line below, never distributes over the operations two lines below. Laws of logs and laws of exponents also follow patterns which the chart helps beginners learn. And there is someting pleasing about the fact that in the left hand column, each operation can be defined as repeated application of the operation below, at least for natural numbers, while the operations in the right hand column are inverses of the operations in the left hand column.

In any case, it does no harm to include roots. Rick Norwood 17:09, 26 October 2007 (UTC)


Should it be Parentheses then the rest? And should we show menomic devices such as Pemdas? —Preceding unsigned comment added by BrainiacMatt (talkcontribs) 19:44, 12 December 2007 (UTC)

All of the acronyms are misguided and, in my experience as a teacher, do more harm than good. The title of this article is, after all, order of operations, and parentheses are symbols of grouping, not operations. Confusing symbols of grouping with operations has, in my experience, done a lot of harm. Still, all Wikipedia can do is report what is, we can't fix it.

Rick Norwood (talk) 13:39, 13 December 2007 (UTC)


No kidding, huh? Well, I apologize for removing that line without trying it myself. Just from memory, I could swear it wasn't right! Melchoir (talk) 20:57, 11 February 2008 (UTC)

"Proper use of parentheses..."[edit]

The notation for some operations implicitly groups operand expressions (e.g. expressions under a root or in an exponent). This grouping may need to be made explicit with parentheses when using alternative notations.

There's nothing else to say on the matter. In all other cases, parentheses are required in a plain-text expression iff they're required in the standard mathematical notation. (x) and x are equivalent everywhere else, too. sin(x+1) always needs parentheses. Et cetera. If I work in that brief explaination elsewhere, I think the whole section can go. --LuminaryJanitor (talk) 15:14, 4 May 2008 (UTC)

Trigonometry Traditions[edit]

I dislike the traditions of notation for trigonometry functions, but they exist. I'm looking at the 2004 Larson/Hostetler high school Trigonometry textbook. In defining simple harmonic motion, one reads: "d = a sin ωt" instead of "d = a sin( ωt )" . I've not seen an authoritative rule, but it seems to be, the first term after one of the six trigonometry function names (and their inverses) is implicitly bracketed as the function's input. Thus "tan 2πx + 3" is parsed as tan(2πx) + 3. Many books explicitly bracket a term that has a leading negative sign, as in sec(-2πx). There is of course the basic irritation that in a trigonometry context, "sin x" is not the product of four variables, but a function of one variable x. Comments? What other functions have this implicit bracketing? Is this tradition worth mention in the article? --Gregoreo (talk) 21:37, 11 August 2008 (UTC)

I just stumbled upon the issue of priorities between operations like composition of a function and exponentiation: one should read but is very often understood as while it should be equivalent to . But the latter is sometimes interpreted as which is, in my opinion, plainly wrong... Are these caveats worth mentioning? Christian.Mercat (talk) 13:33, 10 November 2011 (UTC)

PEMDAS Deprecated[edit]

There's a well-intentioned addition of 15 Sep 2008 that puts at the beginning of the article the PEMDAS acronym, the "Please Execuse My Dear Aunt Sally" mnemonic, and an example. There are reasons something similar hasn't been provided. (1) PEMDAS, etc, are covered succinctly in the Acronyms section. The article has plenty of examples. (2) As the Acronyms section observes there are many other such memory devices. BOMDMAS, BOMDAS, BIDMAS, PEMDSA are among these. (3) The standard structure of a mathematics article would place this information later, not at the very top. (4) Also as observed in the current article, "Warning: Multiplication and division are of equal precedence, and addition and subtraction are of equal precedence. Using any of the above rules in the order addition first, subtraction afterward would give the wrong answer to 10 - 3 + 2...." PEMDAS and other simple acronyms can lead students to wrong results! Some presentations thus put it as PE(M or D)(A or S). Of course the parentheses kills memorability, and grin, introduces a little self-reference. I appreciate how PEMDAS helps students learn, but if they learn an untruth, it is really hard to unlearn that. That is why many Algebra books--McDougal Littel Algebra 1 (2008), Addison-Wesley Beginning Algebra (2007), Glencoe Mathematics Applications and Concepts (2006) and many more--do not mention PEMDAS. The harm PEMDAS does outweighs its temporary benefits.

In view of the parochial, misleading, and redundant qualities of this PEMDAS block, I recommend that the PEMDAS addition of 15 Sep 2008 be removed. --Gregoreo (talk) 15:53, 18 September 2008 (UTC)

Conflict with external source[edit]

In the article posted regarding the algebraic order of operations from PlanetMath, it is stated that multiplication is followed by division which is followed by addition, with subtraction implicitly following after. It then states that anything written higher has greater priority than those listed below; namely, this states that multiplication has higher precedence than division, and so on. If we are to state on the main article that multiplication and division have equal precedence, than we really should not be linking to an article that contradicts this. If this article is correct, then we should reevaluate our position on this. (talk) 23:01, 6 November 2008 (UTC)

Current definition of order of operations omits unary operators[edit]

I'm a new contributor, please let me know if I'm violating any protocol despite reading the relevant guidelines.

The first sentence of the article states that the order of operations is involved when a number or expression is both preceded and followed by a binary operator; the sentence refers to algebra and computer programming. In computer programming the order of operations comes into play for unary as well as binary operators, and it's necessary to know the order of operations for all operators, unary included. A few examples in C are: *p++ (two unary operators), and *p.f and &s.f and !a < b (all with one unary and one binary operator).

Some languages (C, C++, Java are examples) have a ternary operator (the conditional operator); in such cases the order of operations must be defined for the unary, binary, and the ternary operator as well.

I would suggest an alternate wording to the sentence, but as a new contributor I thought I would begin by just bringing up the issue on the talk page, where I hope I am less likely to have my head bitten off if I'm out of line in some way.

Ybsgirg (talk) 06:41, 8 March 2009 (UTC)

I agree. The word "binary" can be omitted. Good point. I'll make the change.Rick Norwood (talk) 12:58, 8 March 2009 (UTC)

Under special cases, there is the following line: "in the case of a factorial in an expression, it is evaluated before exponents and roots" 1) Is there a source for this? (there obviously should be) 2) This is not in the main article on factorial 3) It doesn't even make sense: What is 5^2! according to the above rule, it would have to be 120^2Mortgagemeister (talk) 18:04, 31 July 2009 (UTC)

The latest addition to this special cases section, has the following statement: "This convention is prone to misreading except in the simplest cases, and so parentheses are recommended." This statement is clearly an opinion and sorta of sounds like original research. Mortgagemeister (talk) 14:21, 4 August 2009 (UTC)

More on latest addition to the special cases: "If exponentiation is indicated by stacked symbols, an author may treat physical height as a grouping convention, so that" would mean rather than and would mean while .

Not sure why the "if". In math, (as opposed to computers) exponentiation is usually indicated by "stacked symbols". Never heard it described like that, but okay. Why is this under a special case? It is the usual case. Moreover, who is this "author"? Why the restriction to the author? Can't anyone treat "physical height as a grouping convention"? Again - never heard it called this, but ok I suppose. And why "may treat"? "must" would be better. This whole thing really smacks of original research IMHO12.8.160.219 (talk) 22:14, 4 August 2009 (UTC)

More on latest addition: (not sure why the above didn't show my name and not sure how to fix it)

would mean "would mean". As opposed to what? ?????? What else would it mean?????? Mortgagemeister (talk) 11:18, 5 August 2009 (UTC)

As written, no other meaning is possible. If written 2^3!, it would be ambiguous. Rick Norwood (talk) 13:53, 5 August 2009 (UTC)

Rick - I certainly agree with you re: . I agree with you re: 2^3! only to the extent that anything with a caret just isn't "real" math. It is computer math and thus the question would be of course which computer and/or which compiler. Is that what you meant by ambiguous? (talk) 21:38, 5 August 2009 (UTC) <==mortgagemeister (the (talk) 21:38, 5 August 2009

(UTC) doesn't seem to work for me?????)

"Real math" is independent of notation. The superscript notation is traditional, but no more "real math" than the caret notation. Also, hierarchy of operations is not "real math" but is entirely conventional -- it "is" whatever people decide it is. Essentially everyone (except a few American grade school textbooks) agree that 3*4+5 = 17, not 27. There is no such general agreement about 2^3! nor is there ever likely to be. Rick Norwood (talk) 13:52, 6 August 2009 (UTC)

More metaphysical then I intended. All I meant was that the "superscript notation" is what is taught in almost every math classroom. If a student were to take no computer classes and not buy a computer he could still get an A in every class and never even "meet" the caret notation. Moreover, if we are going to get a bit metaphysical, the math is certainly notation dependent. The superscript notation is implicitly an unary operator. The caret is a binary operator. Perhaps that is why you consider it ambiguous. (If not why do you?)Mortgagemeister (talk) 15:38, 6 August 2009 (UTC)

Since we agree on the unambiguity of , I am going to edit that section out. Mortgagemeister (talk) 21:07, 6 August 2009 (UTC)

The difference between a binary and a unary operator is not a question of notation. Many notations can be used for either. And while factorial is unary, exponentiation is binary -- it has both a base and an exponent. And the caret notation is now common in e-mail and text messaging as well as on calculators and in computer programs. But I agree that can go. Rick Norwood (talk) 12:55, 7 August 2009 (UTC)

But it seems (at least if I read the history correct) that you just put it back in? And you took out the precedence rule for factorial vs exponent and left it what? unknown, unstated? Mortgagemeister (talk) 13:37, 7 August 2009 (UTC)

Your latest addition: "a factorial in an exponent applies to the exponent, while a factorial not in the exponent applies to the entire power." sounds like a forced rule, having nothing to do with precedence. Any "order" has to be more than just a bunch of rules, each of which dealing with only a single case. (talk) 16:37, 7 August 2009 (UTC)

So Rick - your latest edit is a duplicate of what already exists (in the examples) of the first section. Moreover, it is a special case because it is an exception to the rule of equal precedence operators are evaluated left to right. If that is why you are putting it in the special case section, I certainly think you should make that clear. Mortgagemeister (talk) 21:57, 8 August 2009 (UTC)

Lots of Irritating, Silly Acronyms[edit]

Where does the list in the sentence "Thus, we also have BEDMAS, BIDMAS, BIMDAS, BIODMAS, BODMAS, BOMDAS and BPODMAS." come from? What does using both I and O together mean? Does "BP" mean "Brackets then Powers" or "Brackets then Parentheses"?

If this is a list of acronyms that have been used traditionally, then we should have some references and descriptions on when these acronyms have been used. Otherwise, what use is the list? At the least, we should clarify to "For example, each of the following acronyms has been taught at some time and place:"

If on the other hand this is just a list of possible acronyms, why aren't other choices like BPOMDAS included?

Assuming this list isn't historical, I think just a couple extreme cases should be used to illustrate how you can really louse things up. For example include only BPODMAS. Or a sentence like "For example, some text books teach the acronym "BPODMAS".

And while I'm at it, how about a section called "Inconsistencies and Shortcomings of Order of Operations Systems" or somesuch to underscore the fact that the 'helpful' mnemonics possibly do more harm than good. Donimo (talk) 03:25, 23 May 2009 (UTC)

How do you write a^b^c?[edit]

I don't know how to get a^b^c to display in superscript form. Help? Rick Norwood (talk) 13:16, 7 August 2009 (UTC)

I was able to get this:
Mortgagemeister (talk) 15:02, 7 August 2009 (UTC)

You misunderstand my question. I want to display a stack of powers without using parentheses. Rick Norwood (talk) 13:55, 8 August 2009 (UTC)

Mortgagemeister, you have wrongly placed the parentheses around ab, and your method, using TWO sets of math tags, is uncouth. Michael Hardy (talk) 16:34, 8 August 2009 (UTC)

Mr. Hardy: I didn't wrongly place anything. I wasn't answering the question "What is the order of operations for a^b^c?" I thought Rick Norwood was trying to figure out the wiki syntax for presenting a^b^c in "stacked symbols". I was showing how far I had been able to get. As to the couthness of my method - well I'm from Brooklyn. I certainly congratulate you on your couth method. Mortgagemeister (talk) 21:51, 8 August 2009 (UTC)

And so I was. Thank you for your help. The use of set braces around the exponent was just what I needed, couth or no. Rick Norwood (talk) 11:52, 24 July 2010 (UTC)

I do think there is some current ambiguity in the Order of Operations as it currently stands, as the article only addresses hand written or typeset expressions. It does not address the current common usage of using the caret ^ or doubled asterisks ** to expression exponentiation. As a result, there is a perceived ambiguity to expressions such as a^b^c, and whether or not they should be computed as (a^b)^c or a^(b^c). In this case, I believe the most commonly used idea of operations of the same type being performed left to right is incorrect, as what most people visualize when seeing that expression would need to be read right to left. I cannot, however, find documentation for either way being the preferred method. (talk) 22:19, 25 December 2012 (UTC)

One-half x[edit]

The paragraph just above the Examples section has the information backwards. I believe better wording would be the following:

Similarly, care must be exercised when using the slash ('/') symbol. The string of symbols "1/2x" is interpreted by the above conventions as 1/(2x). If what is meant is (1/2) × x, it should be written as (1/2)x. Again, the use of parentheses will clarify the meaning and should be used if there is any chance of misinterpretation.

Also, x/2 is not part of the misinterpretation. If there are no reasonable objections, I'll go ahead and make that change. JackOL31 (talk) 17:52, 5 December 2009 (UTC)

But if multiplication and division are of equal priority, and consecutive operations of equal priority are performed left to right, then the correct interpretation of "1/2x" is indeed (1/2)x. Also, the current statement contradicts the relevant claim in the "Calculators" section. I will reverse the statement unless someone has an objection. TrippingTroubadour (talk) 08:09, 27 February 2010 (UTC)

PEMDAS is wrong[edit]

I also learned PEMDAS in school. However, consider the expression:

4 / 2 * 2

What is the answer? The correct answer is 4. Division should come before multiplication. PEMDAS would lead you to believe that the correct answer is 1.

There may be counter examples out there that I'm unaware of, but if not, it really should be PEDMAS. Please Eliminate Dumb Math Acronyms at School :) —Preceding unsigned comment added by (talk) 02:41, 12 May 2010 (UTC)

The article mentions that PEDMAS is wrong. Now if only we could get the grade school textbooks to stop teaching students wrong math. But that seems impossible. Rick Norwood (talk) 14:06, 12 May 2010 (UTC)
I thought the Order of Operations acronym was GEMA or GEMS: Grouping - Exponents - Multiplication & division - Addition & Subtraction/Subtraction & Addition. --DanMat6288 (talk) 00:09, 24 June 2010 (UTC)

GEMA is better than PEDMAS, but it is still wrong. In 3 + 4 + (5 + 6) I can do 3 + 4 before I do 5 + 6. This article states in the first paragraph the actual rule, but no grade school text book I know of does. Rick Norwood (talk) 12:56, 24 June 2010 (UTC)

Unfortunately, PEMDAS or GEMS are simply acronyms to help people remember basic order, they cannot be taken as a hard and fast rule. Students should know the mathematical properties before learning order of operations using an acronym. For example, the example given above 3 + 4 + (5 + 6) is correct, you can add any of those numbers before adding the other, the parentheses are superfluous. The associative property of addition states that the order of the addends does not matter when adding more than three numbers. Without understanding the mathematical properties, PEMDAS and GEMS will only take you so far. — Preceding unsigned comment added by (talk) 20:31, 8 June 2014 (UTC)

There seems to be no one standard, unfortunately. The local junior college teaches the GEMS sequence (though without using the acronym). I.e., multiplication and division are at the same level, so you do them left to right. Same for addition and subtraction. But the local GED program teaches PEMDAS, with multiplication taking precedence over division, and addition over subtraction. So the few GED students who need to take the college entrance diagnostic have to relearn a different system. — Preceding unsigned comment added by (talk) 01:50, 8 May 2013 (UTC)

The above sentence is not true. PEMDAS tells you to work from left to right so 4 divided by 2 = 2, multiplied by 2 = 4. Simple! — Preceding unsigned comment added by (talkcontribs) 03:45, 27 November 2013

The usual answer is that the above expression should be read as 4 * (1/2) * 2, and then PEDMAS works as intended. Doing the multiplications first gives you (4/2) * 2 = 8/2, or 4 * (2/2) = 8/2, depending on whether you do the first or second multiplication first. This is all already explained in the mnemonics section, with the example given for addition/subtraction rather than multiplication/division. Maybe it would be a good idea to add an example for that too, in case it's not clear that the same argument applies. (Though I agree it would be better to simply change the mnemonic, but that's not Wikipedia's job - it just reports how things are, not how they should be.) Quietbritishjim (talk) 15:27, 27 November 2013 (UTC)


This problem has been meming its way around the internet lately. I checked out this article to see if it could shed any light on the question of whether the correct answer is 2 or 288. The real question is whether the expression could also be written as 48÷2×12, or whether its the equivalent of 48÷(2×12). We don't evaluate 48÷2x as 48÷2×x, which would be 24x, but it could be that this is only the case when using variables, and that when using numbers, multiplication is multiplication. There are some fairly smart and informed people here, so I thought I'd ask if anyone knows what the correct answer is. - Lisa (talk - contribs) 04:14, 10 April 2011 (UTC)

Reading 48÷2x is actually completely correct though. To answer your question directly though, the convention is to solve equal priority operators from left to right. (talk) 09:27, 10 April 2011 (UTC)
Thanks. But I think the question is, are 2(12) and 2×12 the same? Are they both the identical operator? Is 48/2x equal to 24x or 24/x? - Lisa (talk - contribs) 12:29, 10 April 2011 (UTC)
Yeah, I'm seeing it like this image here:
My Casio 9860GII and 991ES return 2, GNOME calculator results in 2. Sage and Maxima all fail to evaluate without an operator before the first (. Mathomatic returns 288.
2 in that case to me is clearly wrong.
Thoughts? --Lakkasuo (talk) 15:16, 10 April 2011 (UTC)
My thinking is that 2x differs from 2 × x. The notation 2x carries implicit grouping. Brackets and parentheses are evaluated first because they connote grouping, so a notation that groups implicitly should take precedence over one that does not. So the answer would have to be 2. - Lisa (talk - contribs) 16:39, 10 April 2011 (UTC)
From what I learned in grade school, I'm pretty sure that it's 288. The crux of the argument is as Lisa says - is 2(12) an equivalent statement to 2×12 (or rather - it should be the crux...some people fail to realize that multiplication and division are, more or less, the same operation). In my experience, a(b) means a×b, since when a statement is fully evaluated inside any sort of parenthesis, the parenthesis are simply removed and coefficients are multiplied having the normal multiplication priority. However, I believe that order of operations was not always taught this way, and so some may in fact have learned that 2(12) = (2(12)). Having not learned it this way, it makes little sense to me, but what can I say... Rill2503456 (talk) 01:00, 12 April 2011 (UTC)
I agree with Lisa. To me 2(12) implies grouping, and the question she raised here is if 2x12 and 2(12) are the same? I am not a math professional so most people here know more than I do. But from what I've read so far, although Order of Operations clearly says execute operators with equal priority from left to right, it never states if 2x12 and 2(12) have equal priority or not. I understand it's common to write 2x12 as 2(12) but are they exactly the same? Hoyun (talk) 15:28, 29 April 2011 (UTC)
In most situations 2(12) is shorthand for 2*12. Historically, it was invented to avoid 2×12 which could be mistaken for 2x12= 2*x*12 = 24x. Computer scientists needed a better multiplication sign and introduced * for that purpose, because it looked a little like ×, could not be mistaken for x, and was handy on the typewriter or cardpunch keyboard. As I mention below, this "left to right" rule is grade school, not used by professionals. Rick Norwood (talk) 15:37, 29 April 2011 (UTC)
Surely the correct interpretation is dependent on context? Considered in isolation it is unclear.
In the case of 100/2π, is it necessarily obvious which interpretation to take? Is '2π' taken as shorthand for a single constant or is it split to give (100/2)*π?
Similarly, 4i^2 can mean two entirely different things depending on whether the context indicates use of complex numbers.
Doctor Wibble (talk) 09:13, 13 April 2011 (UTC)
I didn't see anything in this article about working from left to right to calculate items in the same order of precedence. I think that's where a lot of this confusion is coming in--people don't realize they have to calculate the division part before the multiplication because it's the leftmost item. —Preceding unsigned comment added by (talk) 22:34, 12 April 2011 (UTC)

In the United States, at least, there is one set of rules in grade school and a different set of rules for professionals. Grade school teachers tend to teach what they were taught in grade school, by teachers who taught what they were taught, and so on. There is absolutely no "rule" in mathematics about working from left to right. Real mathematicians, scientists, engineers and other professionals know not to write expressions that can be easily misunderstood, and that anything that can be misunderstood will be. Thus the horizontal fraction bar is preferable to the slanting fraction bar. Rick Norwood (talk) 12:25, 14 April 2011 (UTC)

That notation is ambiguous in mathematics, and so it would be fundamentally wrong just how it's written, a vinculum or grouping symbols would be used instead to clearly show the division, as it is it can't be solved in mathematics as it's badly constructed. In computing, the operation will be done left-to-right, and since we've been using computers for calculations for ages, that makes 'left-to-right' the de facto standard when ambiguity is found. The proper way to note 48/2(9+3) would be with the vinculum, or like this (48/2)*(9+3), putting back any implied operators and properly grouping the operations, and that's how a computer will solve the operation, so that's the way to go. (talk) 02:44, 26 July 2012 (UTC)


Thought the following two sentences were possibly confusing:

"If PEMDAS is followed without remembering to do multiplication and division at the same time and done instead with multplication then division students will get wrong answers. For example: 6÷2(1+2)=9 not 1."

I.e. is 6/2(1+2)=9 a wrong answer by a student or the correct answer?

9 is correct, if you don't believe me copy and paste 6/2(1+2) into Google and hit enter —Preceding unsigned comment added by (talk) 13:22, 29 April 2011 (UTC)

Made minor change to make meaning certain. —Preceding unsigned comment added by (talk) 12:16, 29 April 2011 (UTC)

The answer to 6/2(1+2)=1, not 9. You are confusion multiplication with distribution. Distribution is NOT multiplication even if you multiple and it is not an operation because it does not change equality, it simply re-writes an equality in different ways.I will solve it two different ways to show. First, Lets Distribute the 2 into (1+2). 6/(2+4) Now Follow PEMDAS or PEDMAS. 6/(6)=1 Second way. 6/2(3) now, we DISTRIBUTE, NOT MULTIPLY the 2 into the 3. Although we multiply to make the work less, we are technically ADDING ((3)+(3))=(6). 6/(6) =1 The following question arises. Is 2(3) the same as 2*(3)? the answer is no, they are two different numbers because the operation splits quantities. —Preceding unsigned comment added by (talk) 17:23, 29 April 2011 (UTC)

Sorry, but you're wrong. In order to distribute the 2 over the sum, using the rule multiplication distributes over addition, you have to multiply 2 times the sum before you divide the six by the two. That's wrong. The correct rule is that 6/2(1+2) means 6 * (1/2) * (1+2). Division is multiplication by the reciprocal. You seem to think distribution is different from multiplication. It's not. It is a property of multiplication. In 2(3) the operation is still multiplication, only the "multiplication" is "understood". In other words, concatination implies multiplication. Cut and paste 6/2*(1+2) into Google, as suggested above, if you're still in doubt. Rick Norwood (talk) 17:35, 29 April 2011 (UTC)
6/2*(1+2) is not the same expression as 6/2(1+2). A number, 6, divided by a number, 2, multiplied by a number,(1+2) is not the same as saying a number, 6, divided by a number, 2(1+2). Although they seem to be same because we learn that when you distribute a number in parenthesis you multiply that number. However, what you are failing to see is that 2(3) is a single number. Whereas 2*(3) are two different numbers separated by an operation. Distribution is not an operation (else it would be in the order of operations), and only operation separate numbers. —Preceding unsigned comment added by (talk) 18:39, 29 April 2011 (UTC)
Looking a raft of high school algebra books, any California high school student that does not agree that 6/2(1+2)= 9 will be graded wrong. While I appreciate that there have been, and may still be, groups that give precedence to implicit multiplication over explicit multiplication, that is not the convention currently taught in high schools in California, at least. If a mathematical society wants to come up with some different rules, I suppose they can, but first they will have to unlearn what they were taught in high school, then live with the fact that the rest of the population is being taught rules that come up with 6/2(1+2)= 9. The links below jump directly to the pages spelling out the order of operations rules taught and tested for.
Macchess (talk) 08:10, 3 May 2011 (UTC)

Unsigned: you do not get to make up the rules of mathematics as you go along. 2(3) is not a "single number", it is the product of two numbers. When two numbers are juxaposed, the juxaposition must mean something. What it means is a convention, but it is an important convention. In this case, what it means is multiplication, a decission arrived at, historically, in 17th century France, and accepted throughout Europe and later throughout the world.

Distribution is a law of mathematics, which can be taken as one of the field axioms, or proved as a consequence of the Piano postulates. Multiplication distributes over addition. In this case, however, the distributive law is not the problem. The question is whether to divide by the shortest complete symbol or string of symbols following the division sign, in this case the 2, or to divide by some longer string of symbols. The former choice was made. You can check this just by typing that string of symbols into any reasonably expensive calculator. Follow this link to see how Texas Instruments used to follow the opposite convention but changed its mind.

But the most important rule is not a rule of mathematics but a rule of common sense. Don't write expressions like this.

Rick Norwood (talk) 12:13, 30 April 2011 (UTC)

I think that Wolfram Mathematica is quite an authority in case of mathematics, isn't it? ;) —Preceding unsigned comment added by (talk) 22:23, 30 April 2011 (UTC)

No mention of "left to right"[edit]

"If PEMDAS is followed without remembering to do multiplication and division at the same time and done instead with multplication then division students will get wrong answers. For example: 6÷2(1+2)=9, not 1."

This is clearly a ridiculous portion, not because the answer is wrong, but because the justification is absurd. There is no way to do "multiplication and division at the same time" in this example.

Following PE(DM)(AS) as explained in this article the best you can get is the following:


There is no way to perform the division of 6 by 2*3 "at the same time" as multiplication of 6÷2 and 3.

One possible convention you could adopt is, when all else is equal, perform operations from left-to-right, in which case you would come out with the answer 9. But nothing in this article mentions that left-to-right is a convention in BEMDAS and I can't find any sort of official opinion from any reputable organization regarding it. Another convention one could adopt is to view the multiplication implied by placing numbers adjacent to each other as a form of grouping, which would give an entirely different answer (one that many newer programs and calculators would give, although almost certainly not the majority). MarcelB612 (talk) 19:51, 30 April 2011 (UTC)

Good catch. At the same time is absurd. I'll fix it. Rick Norwood (talk) 20:52, 30 April 2011 (UTC)
I have added "left to right" to the main "order of operations" list. Reading this whole mulit-page article, there was still no mention how 10/5*2 should be evaluated. If we don't say left-to-right is a convention, one saying 10/5*2=10/10=1 would be right. — Preceding unsigned comment added by (talk) 13:35, 26 July 2012 (UTC)

This has been discussed many times before. There is no left to right rule. Rather, /5 means *(1/5) (division is multiplication by the reciprocal) and 10 * 1/5 * 2 can be done in any order. Nobody in his right mind would do 13/17*17 from left to right. Rather, they would observe that the division by 17 and the multiplication by 17 cancel, leaving 13. In teaching this, It is better to teach students to use the vinculum rather than the solidus, that is the horizontal fraction line rather than the slanting fraction line, because the slanting fraction line often leads to this confusion. Nobody gets confused by ×2, Rick Norwood (talk) 15:04, 26 July 2012 (UTC)

Microsoft Excel and the unary minus[edit]

The article says that Microsoft Excel evaluates a unary minus at a higher order of precedence than exponentiation. This would mean, presumably, that it would interpret the polynomial −x^2 + x + 1 as equal to the polynomial x^2 + x + 1. Does anyone know if later versions of Excel have this same problem? Rick Norwood (talk) 12:18, 1 May 2011 (UTC)

I am using Excel 2003, which interprets −x^2 + x + 1 as equal to x^2 + x + 1. Surely later versions do the same, because they should not break existing formulas. Ceinturion (talk) 19:52, 3 May 2011 (UTC)

Not necessarily. The footnote to this section mentions this as a "problem" and offers a "fix". More recent versions may (or may not) provide that fix. Anybody have a version of Excel from the last seven years? Rick Norwood (talk) 12:29, 4 May 2011 (UTC)

Church's dot[edit]

What about the dot notation of Alonzo Church where left-grouping is assumed for the missing brackets and a dot stands for a missing left bracket whose mate is as far to the right as possible without changing the pairing of the existent brackets? It is regularly used for the λ-binder in the λ-calculus and occasionaly with non-assiciative algebraic operations. For example the logical axioms (A⇒(B⇒C)) and ((A⇒(B⇒C))⇒((A⇒B)⇒(A⇒C))) can be shortened as A⇒.B⇒C and (A⇒.B⇒C)⇒.A⇒B⇒.A⇒C Zinoviev (talk) 12:10, 2 November 2011 (UTC)

Printed mathematics textbook as a source (moved from top of page)[edit]

I'm dealing with some extremely "special" folks that don't believe -1^2 has a different meaning than (-1)^2. I see you need a citation for this result in the "gaps in the standard" section. This is addressed in every basic level mathematics textbook. Exactly what information do I need do I need to provide so that you'll be satisfied with the citation? I have many print books that clearly indicate -1^2 = -1, but I can't find anything online. (talk) 04:11, 28 September 2011 (UTC)

You may cite a published mathematics textbook if you want. The more authoritative the better. There is no need for it to be online. In maths, printed works may often be considered more reliable than web sites. Thincat (talk) 19:47, 27 November 2011 (UTC)

APL and Smalltalk wrong[edit]

APL and Smalltalk do have different precedence levels.

APL operators have higher precedence than functions and are left associative.

Smalltalk unary messages have higher precedence than >1-ary messages. — Preceding unsigned comment added by (talk) 04:43, 15 July 2012 (UTC)

Multiplication and division[edit]

I can't wrap my head around this paragraph:

Similarly, there can be ambiguity in the use of the slash ('/') symbol. The string of characters "1/2x" is interpreted by the above conventions as (1/2)x. The contrary interpretation should be written explicitly as 1/(2x). Again, the use of parentheses clarifies the meaning and avoids the possibility of misinterpretation.

It appears to be saying that should be interpreted as rather than . As far as I know, the correct interpretation (calculators notwithstanding) is . To check that I wasn't going crazy, I spent about 20 minutes flipping through various math and science books on my bookshelf and confirmed that, indeed, the convention seems to be that the solidus is evaluated last in these kinds of expressions. For example, in Griffiths' electrodynamics book we find expressions like and , all clearly written with the convention that the solidus has lower precedence than multiplication. What gives? Am I missing something about this paragraph? Zueignung (talk) 00:56, 1 August 2012 (UTC)

The paragraph is right in that the expression is ambiguous, but I agree that the more common and more natural interpretation is , whereas is written as (1/2)x. I don’t known what kids learn in elementary school, it may well be that the convention they are taught doesn’t respect the practice in professional mathematics.—Emil J. 10:27, 1 August 2012 (UTC)

It depends a lot on the context. Consider, for example, . Most people would "see" the middle term here as (1/2)x because they are used to the form of a quadratic equation. On the other hand, in , many people would "see" 1/(2x) = 4, because they would expect (1/2)x in this case to be written x/2. The important point is that 1/2x is ambiguous. The only "rule" is that /expression is the same as (expression)^-1. When "expression" is not just a single symbol, it is safest to put it inside parentheses. Rick Norwood (talk) 13:49, 1 August 2012 (UTC)

Where are the references for these claims? Who says that "should" be written as with a solidus? It appears to contradict the convention used in published work. Zueignung (talk) 14:19, 1 August 2012 (UTC)

I never said that "should" be written as . Of course it should not be so written, to avoid ambiguity. The question is, what to do when it is so written? Rick Norwood (talk) 15:46, 1 August 2012 (UTC)

The paragraph in question says: "The contrary interpretation should be written explicitly as 1/(2x)" (emphasis mine). Who is saying that it "should" be written this way? Why should I not remove this unsourced assertion, given that it appears contrary to established convention? Zueignung (talk) 16:20, 1 August 2012 (UTC)

The example was 1/2x. If you want this to be interpreted as 1 divided by the quantity 2x, you should use parentheses. But it would be better to avoid the solidus entirely. Rick Norwood (talk) 17:21, 1 August 2012 (UTC)

Please provide bibliographic references backing the assertion that 1 divided by the quantity 2x should have parentheses if written with a solidus. The assertion appears to be at odds with reality. Zueignung (talk) 19:57, 1 August 2012 (UTC)

That 1/2x is ambiguous and should be avoided is one of those things that is so obvious that I'm having trouble finding a reference that actually says so, just as I would have trouble finding a reference that says you shouldn't use the symbol "2" as the name of a variable. But saying it is obvious doesn't solve the problem, since Zueignung thinks it is obvious that there is no ambiguity, and provides one example from a serious math book where the solidus has lower precidence than multiplication, that is, where x/yz has a different meaning from x÷y*z. Can anyone help with a reference? Rick Norwood (talk) 16:02, 2 August 2012 (UTC)

Rick, you are constantly making a straw-man argument. The paragraph Zueignung is objecting to doesn’t just say that 1/2x is ambiguous. It says that 1/2x should be interpreted as (1/2)x, whereas 1/(2x) should be written with brackets. This is the main problem. I can’t speak for Zueignung, but I would be happy if the paragraph were trimmed to only state that 1/2x is ambiguous, without suggesting which of the two interpretations is right and which is wrong.—Emil J. 16:23, 2 August 2012 (UTC)

I agree that 1/2x is ambiguous. I disagree that the order of operations conventions as currently stated in the article would call for this expression to be interpreted as (1/2)x, and I disagree that if one intends to write with a solidus that one "should" write . This is a value judgement that requires proper attribution. It is fine for the article to say something like "Mathematical typesetter John Smith (2003, p. 46) suggests that parentheses should be used to avoid ambiguity." I do not think it is appropriate to state—without attribution—that one should use parentheses in this situation, given that it does not seem to be borne out in practice. I agree with Emil J; I think it would be best to simply state that 1/2x is ambiguous and leave it at that. Zueignung (talk) 16:30, 2 August 2012 (UTC)

I can live with that, but I will also still search for an reliable reference. My reason for thinking that 1/2x "ought to mean" (1/2)x is as follows. The current rules for operations state that multiplication and division are on the same level, and that division is multiplication by the reciprocal. I've never seen a rule that says implied multiplication takes precidence over the solidus.
Would you agree that 1 ÷ 2 × x means (1/2)x, for the same reason and following the same rule that says 1 - 2 + x = -1 + x? (When my children were in grade school their textbook, written by an editor of The Mathematics Teacher, a journal in which I have published, said that 1 - 2 + x = 1 -(2+x) because My Dear Aunt Sally clearly states that addition takes precedence over subtraction. This article rightly rejects My Dear Aunt Sally. I only mention this because so many children are being taught so badly that I think the rules should be crystal clear.) So I ask, is 1 ÷ 2 × x equal to 1 ÷ 2x? Is it equal to 1/2×x? If the answer to either of these questions is no, then the precidence of an operation changes depending on which symbol is used to write that operation, which seems to cause needless confusion. And, of course, if we teach that 1/2x means 1/(2x), then we need to explain that calculators do operations differently from mathematicians, which also seems to cause needless confusion. I understand that Zueignung is expressing an honest opinion. But I teach this stuff all the time, both at the graduate level in abstract algebra and at the freshman level in our Math for Teachers course, and I take getting it right seriously. Rick Norwood (talk) 19:09, 2 August 2012 (UTC)

It may well be that some (or many) people are working with conventions that are ambiguous, that make operator precedence dependent on what symbol is being used, or that are at odds with calculator conventions. If that is indeed the case, these facts should be noted in the article. Sweeping these things under the rug and simply declaring what 1/2x "ought to mean" makes the article factually inaccurate. Zueignung (talk) 20:25, 2 August 2012 (UTC)

But the phrase you put in quotes, "ought to mean", is not in the article. It is in the discussion here, and was given to explain why I think the usual rules are good rules. What the article says is "The string of characters "1/2x" is interpreted by the above conventions as (1/2)x." And that is the case. If multiplication and division have no difference in precedence, then 1/2x means 1÷2×x =(1/2)x. That is just applying the rules as stated. The next sentence, which you have flagged as dubious, says "The contrary interpretation should be written explicitly as 1/(2x).[dubious – discuss]" But if the rules state that one interpretation obeys the rules as given, then it follows logically that the other interpretation does not obey the rules as given, and should be written differently. Is your objection the use of the solidus rather than the vinculum? Rick Norwood (talk) 14:57, 3 August 2012 (UTC)

Now the discussion is beginning to move in circles. This is my objection: 'I do not think it is appropriate to state—without attribution—that one should use parentheses in this situation, given that it does not seem to be borne out in practice.' Zueignung (talk) 15:10, 3 August 2012 (UTC)

I edited the paragraph to make explicit the facts that (a) if the solidus is interpreted as multiplication by the reciprocal, then 1/2x = (1/2)x, and (b) this is not the usual interpretation in published work. Zueignung (talk) 03:00, 5 August 2012 (UTC)

Evidently, physics has its own conventions. Rick Norwood (talk) 15:34, 6 August 2012 (UTC)

This difficulty has been met by a lot of people, and I think it should be more carefully addressed in the article. On one hand, computers usually evaluate from left to right, so that 8-4+3=(8-4)+3 (and analogously, ). On the other hand, the expression 8/4*3 (with the slash being usually taller than the surrounding symbols) is graphically similar to , and is sometimes the chosen substitute when embedding in computer text a fraction of monomials. This convention makes sense when transcribing formulas from a physics textbook, because by giving the division operator a lower order of precedence than the multiplication operator, we can transcribe , as a*b/2c*d*e, which is more economic than (a*b)/(2c*d*e). The expression a*b/2/c/d/e doesn't resemble the original formula, and also leads to a bad strategy for computation (because multiplication is preferable over division). (Marcosaedro (talk) 09:22, 26 September 2012 (UTC))

People will do what they will do, but it seems to me like a really bad idea for physics and mathematics to have a different set of rules, especially when people use one rule part of the time and the other rule part of the time. Rick Norwood (talk) 12:04, 26 September 2012 (UTC)

Mnemonic used in NZ[edit]

"PEMA is one of the mnemonics taught in New Zealand.[citation needed]" Last time I checked, being a New Zealander and got taught it in primary 10-12 years ago, BEDMAS is what we use here. This is, of course, it has been changed in the last few years. I'll see what references I can find either way for this.

  • I learnt BEDMAS too, albeit before NCEA. Neftaly (talk) 00:03, 9 January 2013 (UTC)
  • I learnt BEDMAS and BODMAS (during NCEA changeover). Don't know where this PEMA crap came from... — Preceding unsigned comment added by (talk) 02:58, 9 January 2013 (UTC)

Subtraction and division are binary operations[edit]

The article claims that "It is helpful to treat division as multiplication by the reciprocal (multiplicative inverse) and subtraction as addition of the opposite (additive inverse)", and proceeds to treat division and multiplication in that way. So, according to the article, represents . The article later says that "There exist differing conventions concerning the unary operator − (usually read "minus")", accepting unary expressions such as , to be interpreted as .

I claim that this attitude is not neutral and does not represent the point of view of all mathematically active people and machinery.

Subtraction is usually first introduced before negative numbers, as a (partially defined) binary operator in the set of natural numbers. In this context, can't be defined as , and in fact the result of can't be computed directly using the algorithm of addition.

After the introduction of negative numbers, subtraction of integer numbers can be defined, and the expression can be interpreted as , just as .

Analogous considerations affect the definition of division, which is usually first defined between (positive) integers and later generalised.

In rigorous treatments of mathematics, the set of natural numbers is usually not considered a subset of the set of integer numbers (which are more complicated objects, defined later). And the set of integers is not contained in the set of fractions. This care is also often taken by computers, which have different datatypes and operations for unsigned integers (natural numbers), signed integers and floating point numbers (fractions). For example, in C (programming language) you get and .

If subtraction is considered a binary operation, it is usually given the same level of precedence that multiplication, and expressions involving both operations are evaluated from left to right, giving, for example, .

(The left-to-right convention, also disambiguates multiple exponentiations, giving, for example, 5^4^3=(5^4)^3.) But see the article on operator associativity (which originally led me here), where the exponentiation is regarded as right-associative (evaluated from right to left). Left to right convention is also used in lambda calculus, which is where I started reading.

Conclusion: the point of view presented in the article isn't shared by computer programmers, nor rigorous mathematicians, nor schoolchildren. (Marcosaedro (talk) 08:05, 26 September 2012 (UTC))

Lexing Error?[edit]

There's a lexing error(whatever that is) on the page. Please fix it. — Preceding unsigned comment added by (talk) 00:32, 2 October 2012 (UTC)

Request for a citation about what the TI-89 does.[edit]

I'm a little puzzled about a request for a citation for what the TI-89 does. If I push the buttons on the TI-89, that is what it does. But nobody is likely to say in a book that if you push those buttons that is what the TI-89 does. You can't really use the evidence of your own experience in Wikipedia, but I'm not sure how else to prove that the TI-89 does what it in fact does. Suggestions? Rick Norwood (talk) 22:26, 5 October 2012 (UTC)

I removed it, calling it a "trivially reproducible operation on the TI-89", I'm not sure how one would cite that, but anyone with a TI-89 can reproduce it without fail, so its pointless to ask for a citation. Zath42 (talk) 05:17, 15 October 2012 (UTC)

recent edit[edit]

It is not enough to know how to use fractions to write about them. To write about them requires understanding and care. I've reverted the following addition to the article "The "fraction bar" or viniculum has the same role as the parenthesis. It instructs you to treat the quantity above the numerator as if it were enclosed in a parenthesis, and to treat the quantity below the numerator as if it were enclosed in yet another parenthesis." There is no "quantity above the numerator". In any case, the article already explains that the vinculum is used as a symbol of grouping. Rick Norwood (talk) 15:40, 10 January 2013 (UTC)

a^b^c priority order?[edit]

Is there any good references for the priority order of a^b^c? I recall from some classes long time ago that a^(b^c) is the correct order, but when Excel, Matlab R2011b and my TI-82 Stat calculator shows the opposite, I'm not so sure anymore, and would be pleased to get some trustworthy references. -- Petter Källström, Petter.kallstrom (talk) 12:23, 14 February 2013 (UTC)

The rule is arbitrary, but standard. The reasoning is that a^(b^c) cannot generally be simplified, while (a^b)^c = a^(b*c). My TI-82 gives 2^3^2 = 512 (rather than 64), so it follows the standard rule. Does yours not?
In the sf novel by Robert A. Heinlein, The Number of the Beast, Heinlein incorrectly calculates 6^6^6. Sf writer Larry Niven wrote to correct him, in a letter that has been published, but I forget where. As for a more authoritative reference, I looked in four books readily to hand and none mentions the subject at all. Must be out there somewhere. Rick Norwood (talk) 13:17, 14 February 2013 (UTC)

Roots or logs?[edit]

The article lists exponents and roots, multiplication and division, and addition and subtraction. I'm not sure this is right. Subtraction is addition of the additive inverse. Division is multiplication by the multiplicative inverse. But roots are not the inverse of exponents; logarithms are. Roots are exponents where the exponent is a multiplicative your prenthesese first and bla bla bla you just do stupid dumb crap ha ha ha bye

I'm going to ignore your ha ha ha and seriously answer your question. Addition and multiplication have only one inverse because they are commutative. Exponentiation is not commutative and therefore has two inverses. The root returns the base (given the exponent). The logarithm returns the exponent (given the base). Really, neither belong in the order of operations, because they are not written in the binary form a (operation) b, thus the question of order never comes up. But the various grade-school level books on the subject, written by people with only a superficial understanding of mathematics (according to the National Counsel of Teachers of Mathematics there are no acceptable mathematics textbooks used in America -- the best is from Singapore) roots get into order of operations as reported in the published literature, and Wikipedia is committed to reporting what sources say. No original research. Rick Norwood (talk) 00:57, 7 May 2013 (UTC)


The comments on factorials are unreferenced and either trivial or extremely dubious. Is there any objection to removing them? -- (talk) 18:27, 20 August 2013 (UTC)

I'm a professional mathematician. How do I know that 2*3!=12 but 2^3!=64. I don't know. It just makes sense. There are traditions in mathematics that may never have been written down. So, I guess I can't stop you from removing them. But they do make since and they do offer valuable advice for students. Rick Norwood (talk) 00:05, 21 August 2013 (UTC)
You are not the only professional mathematician in this conversation. The section in question asserts far more than that Rick Norwood believes 2*3!=12, it asserts that it is an established convention that 2n!=2(n!). If this were the case, it would be easy to find sources supporting it. (My personal belief is that no universal convention for resolving 2n! exists, that (2n)! is probably the more common meaning, and that anyone who cares about being understood will use parentheses.) The question of how to interpret 2^3! is a very odd one as mathematics is not, generally speaking, written in ASCII notation, and moreover the discussion in he section is about certain totally unambiguous non-ASCII expressions. Separately, I don't understand your last sentence. -- (talk) 01:07, 21 August 2013 (UTC)

Your assumption that all the rules have been written down is interesting. That has not been my experience. In 1900, Hilbert could probably have made rules that every living mathematician would listen to, but I can't think of anyone who has that authority today. Steven Krantz? Not even he, in my opinion. I certainly agree that careful mathematicians use parentheses when there is any possibility of misunderstanding. Rick Norwood (talk) 01:21, 21 August 2013 (UTC)

I find the idea that everyone agrees 2n! = 2(n!) but no one has ever written this down to be very strange, compared with the more plausible alternative that it doesn't come up very much and so there has never been a need for a convention to develop. (talk) 02:48, 21 August 2013 (UTC)
I agree with the IP editor. In the absence of a reputable source, the article should not assert anything about the interpretation of factorial expressions. Zueignung (talk) 04:23, 21 August 2013 (UTC)

Wolfram alpha treats 2^3! as 2^(3!)=64 [3] that is what I would expect most other mathematical engines to do as ·! is a unary operator and normally unary operators have a higher precedence that binary mathematical operators. --Salix (talk): 06:43, 21 August 2013 (UTC)

I like your observation about unary operators having higher precedence than binary, though that does not (usually) apply to unary minus. Actually, when I said "never written down" I overstated the case. Probably somebody has discussed the issue, maybe in a paper on combinatorics. What I should have said is that I'm not aware of anyone writing down a rule other than here. And, while Wikipedia is not supposed to decide such issues, it probably has that effect, at least in some cases. One compromise would be for this article to just report what Wolfram alpha and Texas Instruments in fact do with factorial. Rick Norwood (talk) 11:48, 21 August 2013 (UTC)
I agree that discussion of "in practice" rules for various computational systems would be of interest. (talk) 20:23, 21 August 2013 (UTC)

left to right[edit]

From time to time someone edits this pages with information they were taught in high school, that operations on the same level must be performed from left to right. The teachers who teach this, and there are many, no doubt have the best of intentions. But, as all professional mathematicians know, it simply is not true. For example, in the expression 3 - 4 + 5 + 6, there is nothing at all wrong in adding the 5 and the 6 before adding the 3 and the -4. 3 - 4 + 5 + 6 = 3 - 4 + 11 = -1 + 11 = 10. Rick Norwood (talk) 01:16, 13 November 2013 (UTC)

For programming languages the order is defined. See for example C operator precedence#Operator precedence and Operator associativity partially because computers need to be told how to do everything and also to resolve ambiguous situations like 3 − 4 − 5. Curiously some operators bind right to left, notably the power operator. --User:Salix alba (talk): 06:38, 13 November 2013 (UTC)


it would be good to have a written history of the development of this process, and why certain operations were chosen for precedence over others, and why left-to-right operation was eliminated. tpk (talk) 15:50, 18 January 2014 (UTC)

I would also find it interesting, though the history may by this time be obscure or lost. The order of operations is logical: exponentiation comes before multiplication because an exponent is used to indicate repeated multiplication, multiplication comes before addition because multiplication is used to indicate repeated addition. I'm not sure there was ever a "left to right" rule, except in certain grade school classes where the teacher, usually not a mathematician, thought it was a good idea. Rick Norwood (talk) 17:06, 18 January 2014 (UTC)
I too would like to see a history section discussing the historical evolution and variance over time. The Dutch, French and German WPs have quite a bit of material on this topic already. --Matthiaspaul (talk) 20:43, 23 August 2015 (UTC)
Yes a history section is needed. A related need is some explanation of the domain and authority behind this convention. That is who dictates that this convention should be used for interpreting arithmetic expressions, within what disciplines is this accepted, and when may we rely on something we read following it? (I.e. texts after year such-and-such, texts from what disciplines, etc.) --Ericjs (talk) 18:29, 12 May 2016 (UTC)

"most textbooks"[edit]

People often edit this page based on what they were taught in grade school, but much US primary education has its own rules, which are not used by professionals. One of the causes of the math wars was the unsuccessful attempts by professional mathematicians to get grade schools to teach mathematics the way it is done beyond grade school.

A recent edit claimed, without references, that "most textbooks" teach that implied multiplication has higher precedence than written multiplication and division. I recently graded the AP calculus exam in Kansas City, and students who used that "rule" lost points. 1/2x should, as the article states, be avoided. But when it is used it is read "one half x", that is, 1 divided by 2 and then the quotient multiplied by x.

Another point raised by the same edit: functions are not considered binary operations.

Rick Norwood (talk) 12:28, 8 July 2014 (UTC)

I imagine it depends on what you consider a "textbook" to be. At least here in the UK, even university-level books are often called "textbooks", at least in undergraduate, so the edit may have been correct with that interpretation. But I agree that implicit multiplication is more likely to be considered lower precedence than division in schools (not colleges/universities) because of teachers' slave-like adherence to rules like BODMAS as if they were handed down by gods. In contrast, professional mathematicians would feel confident that 1/2x would be interpreted by their peers as 1/(2x) because if they had meant (1/2)x they would have just written x/2. I see implicit multiplication used this way extremely often in the exponential, such as writing the Gaussian PDF as , which surely no experienced person would find confusing.
Of course, regardless of how obvious it is to those that practise it that this is standard, it needs a citation to go in the article text. Quietbritishjim (talk) 19:52, 10 July 2014 (UTC)

The Gaussian PDF is an interesting example. Because it is a familiar formula, people "understand" what it means. But how about ? I see that in class often. The AP calculus committee decided to mark that right if the intent is half of x, wrong if the intent is one over the quantity 2x.Rick Norwood (talk) 21:34, 10 July 2014 (UTC)

If x/2 were intended then that's surely what would've been written, whereas 1/2x is a useful decluttering of 1/(2x), and it seems visually clear that the 2 is more closely associated with the x than the 1. If I hadn't seen the Wikipedia page it wouldn't even have occurred to me that another interpretation were possible. I would expect it to normally be written , but in an exponent (as with the Gaussian) it's better to write fractions in the x/y style because otherwise the denominator is almost the same level as the base of the exponent. I suspect that's why the problem re-emerges, with the different interpretation, in advanced settings. Quietbritishjim (talk) 00:16, 12 July 2014 (UTC)

Quietbritishjim: Maybe in Great Britain "surely" x/2 would be written. In the US, not so. Fractions are taught badly here in grade school and high school, and so I must teach my calculus students that 1/2 * x and x/2 are equal. Until I teach them, many take the derivative of x/2 using the quotient rule! However, the larger point is this. There is no consensus on whether implied multiplication takes precedence over written multiplication, nor is there a consensus over whether a large multiplication "dot" acts as a symbol of grouping. In the absence of consensus, all this article can give are the standard rules, as written in many books, which do not distinguish between the several symbols for multiplication. Blame Leibniz, who introduced "understood multiplication" to avoid dealing with the fact that in England the decimal was a dot on the line while multiplication was a dot above the line, while on the continent it was the other way around.Rick Norwood (talk) 11:53, 12 July 2014 (UTC)

Collective terms[edit]

Regarding these three groupings:

  1. exponents and roots
  2. multiplication and division
  3. addition and subtraction

Would anyone know if collective terms exist to express these? Like is there a term meaning "add or subtract" or a term meaning "multiply or divide" or similar? I would think it would be informative to include that in the article but nothing comes to mind. Ranze (talk) 03:14, 29 July 2014 (UTC)

Adding and subtracting can be called "combining like terms", and multiplication and division can be called "expanding and reducing", exponents and roots can be called "powers", with roots being fractional powers, but none of these are common enough to be used in the article. As is mentioned in the article, we only need three binary operations: addition, multiplication, and exponentiation. Subtraction is addition of the opposite, division multiplication by the reciprocal, and roots can be expressed as fractional exponents. I don't know if this useful information is taught in schools or not. Rick Norwood (talk) 12:06, 29 July 2014 (UTC)


A recent edit claimed that Matlab evaluates exponents from left to right instead of top down. This reference says otherwise. "When using stacked exponents, the convention is to work in top down order. So for example, the expression 2.1^4.3^2.1 should be evaluated using parenthesis as 2.1^(4.3^2.1)"

But it may be that different versions of Matlab use different rules. In any case, the edit was unreferenced, so I reverted it pending more detailed information from an expert on Matlab. Rick Norwood (talk) 13:52, 8 October 2014 (UTC)

That particular quotation seems to suggest that *user* needs to add parentheses in order for it to be evaluated in the conventional way, which hints that maybe it will be evaluated the other way if you don't explicitly put parentheses in. But looking at the rest of the page, it doesn't say outright either way, and there are not evaluated examples of stacked exponents without them. I think it would be best to find another source. (I don't have Matlab installed to test which is really correct.) Quietbritishjim (talk) 10:21, 9 October 2014 (UTC)

"1/2x is interpreted as 1/(2x) by TI-82"[edit]

I can attest that this is also true of the Casio Fx-991MS scientific calculator; it is not interpreted as (1/2)x. If there's a number immediately the left of brackets, it is calculated first. So the answer for "6÷2(1+2)" is 1, rather than 9.

The thing is, I seem to remember that this is also the order of operations that was taught in math class in Ontario, Canada, all through high school. In order for the answer to be 9, it would have been written as "(6÷2)(1+2)". Esn (talk) 09:19, 19 November 2014 (UTC)

I (and others) have tried to point out, ever so gently, that is a widely held convention; i.e., it is often not the case in scientific literature that multiplication and division have equal precedence. But other editors won't have it. Zueignung (talk) 10:18, 19 November 2014 (UTC)

It is not the case that "other editors won't have it"; it is a case where authorities disagree. There are two conflicting widely held conventions, which is unfortunate, but not something Wikipedia (or anybody else, apparently) can settle. As for what is taught in grade school, all authorities agree that what is taught in grade school is wrong (e.g. you must work from left to right), but the grade school teachers are not about to change just because what they teach is wrong. They teach what they were taught.Rick Norwood (talk) 12:29, 19 November 2014 (UTC)

Please provide the names of these authorities. Then please insert them into the article, because so far it is mostly uncited and reads like original reasearch. There are almost no references in the article supporting the description of "the standard order of operations". Zueignung (talk) 18:39, 19 November 2014 (UTC)

The associative law of addition, which I hardly need to cite sources for since it in virtually every textbook, says that (a + b) + c = a + (b + c). Therefore, as all authorities agree, I can work addition problems from right to left rather than from left to right. Nobody disagrees with that.

On the other hand, punch "6/2(1+2)" into different calculators, and you get different answers, which shows that the people who program calculators have different opinions. Rick Norwood (talk) 22:42, 19 November 2014 (UTC)

Is this convention consistently different in different geographical locations? Or institutions? Where is the border, precisely? (Also, what is the history of the standard order of operations? Who decided on these rules? Was there a split on this very issue right from the start?) Esn (talk) 12:32, 2 December 2014 (UTC)

I've tried to locate a scholarly treatment of the subject, but all of the many published books on the subject that I have been able to find are written by primary schoolteachers who disagree among themselves and say things that no mathematician would accept, e.g. you must add from left to right.Rick Norwood (talk) 13:07, 2 December 2014 (UTC)

I've never seen anyone use the 1/(2x) convention anywhere in published papers in maths or computer science - it seems to be exclusively something you see at the primary or secondary school level. And it sounds like physics uses the same convention of 1/2x. Rick, can you provide a single example of a journal that does it your way? Because there are already examples cited of journals that do things the other way. Ramseytheory (talk) 12:05, 27 July 2015 (UTC)

I'm not sure what you mean by "my way". I only point out that some sources use one convention, some the other. For example type 1 ÷ 2x into a TI-89, you get (1/2) x. According to esn above, the Casio Fx-991MS returns 1/(2x). All Wikipedia can do is report that there are two conventions, and suggest people use parentheses if they want to be clear. Rick Norwood (talk) 12:54, 27 July 2015 (UTC)
Right now though, the page gives the strong impression that 1/(2x) is more common in almost every setting and that maybe one or two specific journals do things differently. The clause "However, there are examples, including in the published literature..." is a lot weaker than "However, in most of the published literature...". The latter version would be more accurate, and this would be an easy change to make. Ramseytheory (talk) 15:21, 28 July 2015 (UTC)

I agree with you, and I think most mathematicians use that convention. In the past, though, attempts to say so have annoyed people who grew up with the other convention. I suggest a text that does not preference either version. Rick Norwood (talk) 11:55, 29 July 2015 (UTC)

I've just noticed that what I wrote above is slightly ambiguous - to clarify, my position is that in academia, 1/2x is generally taken to mean 1/(2x) rather than (1/2)x, and so you wouldn't normally write 1/(2x). Hopefully that meaning came through, sorry if it didn't. In any case, I don't think replacing "However, there are examples, including in published literature, where implied multiplication..." by "However, in most of the published literature, implied multiplication..." does preference either version. It doesn't say the version these people grew up with is wrong, just that it's rarely used in academia. Would it be OK for me to make that change? Ramseytheory (talk) 12:52, 29 July 2015 (UTC)

Not unless you have some evidence for "rarely used in academia". Rick Norwood (talk) 13:48, 29 July 2015 (UTC)

This is silly: none of this stuff is referenced, and neither the current version nor the proposed version has any proper evidence for it. (And probably no actual evidence exists, i.e., no one bothers to write proper secondary sources about this kind of thing, and for good reason.) I like Ramseytheory's version well enough, possibly also changing "most" for "much". Also, I think "published literature" is going to be ambiguous or unclear for many readers: most people who come to read an article like this aren't academic mathematicians. --JBL (talk) 14:16, 29 July 2015 (UTC)
Agreed with Joel. Rick, you yourself said above that you tried to find a proper source on academic conventions and came up blank. I tried as well, with the same result. Meanwhile, we've at least got evidence in the existing citations that 1/2x = 1/(2x) is a common convention in academia, if not the most common. Do you have evidence to the same standard for 1/2x = (1/2)x, e.g. some major textbooks or journals that use it? Because if you can't find any then I think it's fair to change the article to say it's rare, and then anyone who can come up with evidence to show that it's common can update the article and cite it.
That said, the "right" way of solving this is probably to just look at the 10-20 most recent mathematics submissions to arxiv. I would expect most of them to use 1/2x = (1/2)x, a few of them to either never write inline fractions of the form 1/2x, and none of them to use 1/2x = (1/2)x. I'm guessing this would constitute original research and couldn't be cited, but I'd be happy to do it if you would accept the result. (Joel, good point on "published literature" - how about "academic literature"?) Ramseytheory (talk) 12:20, 30 July 2015 (UTC)
Probably you should edit the key sentence (about what you would expect to find). I would guess option 2 (avoid the issue entirely) is very, very common. I agree with "academic literature" as an improvement. --JBL (talk) 13:17, 30 July 2015 (UTC)
Probably true, actually - a lot of people prefer to avoid inline fractions entirely, for example. I'll stand by 1/2x = (1/2)x being much rarer than 1/2x = 1/(2x), though. Ramseytheory (talk) 16:57, 30 July 2015 (UTC)

I'm in academia and have been teaching math all my professional life, and had never seen 1/2x = 1/(2x) until the issue came up here. The TI-89, which sets 1/2x = (1/2)x is the most popular academic calculator. And, logically, the meaning of 1/2x should not depend on the symbol we use for division and the symbol we use for multiplication, else we would have to memorize a complicated set of rules for every pair of symbols. Rick Norwood (talk) 15:19, 30 July 2015 (UTC)

When one talks about "the academic literature," one is certainly not discussing calculators that are rarely used by anyone beyond the context of a sophomore-level mathematics class. Your last sentence is a total nonsequitur, since this is a question of actual usage in real life. Ramseytheory, I suggest you go ahead and make the change. (Though, as I mentioned, I think "much" is more defensible than "most.") --JBL (talk) 15:47, 30 July 2015 (UTC)
I've made the "much" version of the change. For what it's worth, I've also been in research for the last 5 years (as a PhD student and postdoc) and my experience agrees with JBL's that mathematicians and computer scientists rarely use calculators. Normally if the numbers are big enough to need one then Mathematica or some other CAS is a better tool... Ramseytheory (talk) 16:57, 30 July 2015 (UTC)

My second sentence, which you dismiss as a "non sequitur", is the main point. The rules should be simple and consistent, not one rule for 1/2x, one rule for 1/2*x, one rule for 1/2(x), one rule for 1÷2x, one rule for 1÷2*x, and one rule for 1÷2(x). Your way looks right to you because you're used to it. The rule I've always used looks right to me. The same is true about the never-ending controversy over whether a ring has a multiplicative identity. What you learn first looks right. Please do not let your personal experience influence your Wikipedia edits. Do not say that much academic literature uses either convention unless you have a source. Otherwise, all you are saying is much of the academic literature you've happened to run across uses this convention. Rick Norwood (talk) 17:01, 30 July 2015 (UTC)

I've changed "much" to "some". If you have evidence for "much" I'll change it back. Note that the convention in the footnote "In both books these expressions are written with the convention that the solidus is evaluated last." is an even stronger claim. Under the solidus evaluated last rule, 2x + 1/2 + 3 means (2x + 1)/(2 + 3). You can see how messy things can get when somebody, even as great a writer as Feinman, makes up their own rules. Rick Norwood (talk) 17:11, 30 July 2015 (UTC)

As JBL said, under NPOV it is totally irrelevant what the rules should be since we're talking about what they are - to the extent that the paragraph is normative at all it already suggests that 1/2x = (1/2)x is the "right" way of doing things. A lot of people think that pi should be replaced by tau/2, but pi remains the dominant convention. I'm not doing this because 1/2x = 1/(2x) "looks right to me", I'm doing it because to the best of my recollection I have literally never seen a paper or university-level textbook that uses 1/2x = (1/2)x. And I've now asked three times, but you have still yet to provide a single source showing that even some of the academic literature uses 1/2x = (1/2)x. I'd settle for a major journal's style guide and some textbooks, i.e. the same level of evidence currently present for 1/2x = 1/(2x). If you can't provide this, which should be easy if "much" isn't correct and 1/2x = (1/2)x is dominant in your area, then I'm reverting your change. If you can provide it, then in lieu of an actual study to prove "much" I'll settle for rewording the paragraph to say that some of the literature does one thing and some does the other (with citations for both). Ramseytheory (talk) 09:54, 31 July 2015 (UTC)

Since you cite your credentials, I'll cite mine. Ph.D. in mathematics, member of the Institute for Advanced Study in 1980-81, twenty-eight published papers. All of which is totally irrelevant. Your have had your experiences, I have had mine, our experiences have been different, and are entirely beside the point, since a Wikipedia editor is not allowed to use their own expertise to justify their edit, but must use published sources. It is not up to me to find a published source that says that "much" is wrong. It is up to you to provide a published source that "much" is right. Rick Norwood (talk) 13:16, 31 July 2015 (UTC)

There already is some published evidence that "much" is right - Physical Review is a pretty major journal and as such very unlikely to take their submission instructions contrary to widespread practice in their field. AMS reviews had a similar policy, but removed it - presumably since the point of the paragraph was to tell people to in-line formulae to save on printing costs. Two major textbooks using the convention are already cited, and this StackExchange answer points out that Rudin uses it as well (together with some less fundamental books). If it would be helpful I could find many other examples of textbooks using the 1/2x = 1/(2x) convention as well.
Moreover, the article as it currently stands implies by omission that most of academia uses 1/2x = (1/2)x. And you haven't provided any evidence even for the far weaker claim that some of academia uses 1/2x = (1/2)x. Even if the evidence for "much" weren't there, all that would mean is that the article should be phrased "some... some..." - which would still require you to put up some evidence of 1/2x = (1/2)x being used.

Ramseytheory (talk) 15:49, 31 July 2015 (UTC)

Here is the evidence you requested.

  • "Multiplication vs. Division and Addition vs. Subtraction. What happens when an expression involves more than operator at the same level of precedence? (For example, more than one multiplication and division or more than one addition and subtraction.) What would be two possible values for this expression? 2/3*4; The division was performed first (to obtain 2/3), and the result was then multiplied by 4 (to obtain 8/3). Had the multiplication been performed before the division, the result would have been 1/6. This does not mean that multiplication takes precedence over division, however. In the absence of parentheses, multiplication and division are performed left to right. We say that multiplication and division are left associative." Operator Precedence Worksheet.
  • "Sometimes one rule seems natural, and sometimes another, so people will forget any rule we choose to teach in this area. I've heard from too many students whose texts do "give an example that really puts this rule to the test," but do so by having them evaluate an expression like: 6/2(3) that is too ambiguous for any reasonable mathematician ever to write." Doctor Peterson, The Math Forum
  • "division and multiplication have the same priority," Rules of arithmetic - Mathcentre

I've looked at about a dozen of these on google scholar, avoiding the ones that refer to a particular programming language, and all either say that multiplication and division have the same precedence, or that people disagree, and so there is no fixed rule. Wikipedia should not say that the multiplication before division rule is the one that is most common. Rick Norwood (talk) 13:58, 2 August 2015 (UTC)

Rick Norwood, so far, to defend the idea that if one comes across the string "1/2x" in the academic literature one should expect it to mean x/2 and not 1/(2x), you have offered the following defenses:
  • statements about the behavior of certain calculators;
  • personal statements of incredulity; and
  • references that do not discuss the academic literature.
This is ... not compelling. --JBL (talk) 21:12, 3 August 2015 (UTC)

Just to be sure we understand each other. You think references on google scholar are not important, but your personal experiences are? Rick Norwood (talk) 22:40, 3 August 2015 (UTC)

No, you do not understand me. Perhaps you should go re-read the discussion. --JBL (talk) 23:23, 3 August 2015 (UTC)

Ok, I've re-read the discussion. In favor of 1/2x = 1/(2x) I find Physical Review, a physics journal. If you want to say that most physics journals use this convention I have no objection. I find a statement that the AMS had this convention but changed it. That is, if anything, evidence that the consensus is shifting. Wolfram Alpha also had this convention but changed it. StackExchange is unrefereed. Anybody can post there. If Rudin used this convention, you should reference Rudin by book and page number. I looked through Real and Complex Analysis and Functional Analysis and did not come across it. I can hardly read whole books looking for it. This is all the evidence I find in favor of 1/2x = 1/(2x). Let me know if I missed any. In favor of 1/2x meaning (1/2)x, I've cited Operator Precedence Worksheet, "In the absence of parentheses, multiplication and division are performed left to right." and Mathcentre in the UK, "division and multiplication have the same priority". I could easily cite more sources. Let me know how many you want. I also cited "The Math Forum", which says "6/2(3) that is too ambiguous for any reasonable mathematician ever to write." but Math Forum is also unrefereed, though it is written by a mathematician. I've published an article on the subject in Mathematics Teacher, a refereed journal, but it is math ed and in any case I hesitate to cite my own publication. My conclusion is that we have a lot of evidence that both conventions are used, some evidence that division and multiplication, like addition and subtraction, have the same priority, and no evidence that "most" sources give multiplication priority over division. Rick Norwood (talk) 12:23, 4 August 2015 (UTC)

Rick, are you ever going to add citations to the body of the article in support of your claims? Or are you just going to continue to waste other editors' time by intentionally misconstruing what they say on the talk page? Zueignung (talk) 03:12, 29 August 2015 (UTC)

I added a citation but someone reverted it without explanation. Now another person has added a citation. I'll add yet another. Please show me where I have ever intentionally misconstrued what someone else said. Rick Norwood (talk) 11:57, 29 August 2015 (UTC)

Rick, JBL reverted you because the link in the reference you gave was ill-formed and non-functional. Per WP:ROWN, what he should have done instead of reverting is just fix the citation for you. However, you could probably improve your citation style as well (see Template:Citation). ;-) --Matthiaspaul (talk) 23:36, 30 August 2015 (UTC)

Thank you for the information and the suggestion.Rick Norwood (talk) 11:36, 31 August 2015 (UTC)

Implied groupings[edit]

This article is badly misleading because it uses P to only mean explicit groupings. But groupings can be both explicit and implicit. Take for example the expression 1/2x. By not using an explicit operator between the 2 and the x, an implicit grouping has been implied.

No sane person would want to write x/2 as 1/2x. It makes no sense to write it that way. On the other hand 1/2*x has no implicit grouping so it can easily mean x/2, even though it is not a nice way to write it...

To ignore implicit groupings simply leads to a generation that cannot do basic algebra. Just try doing vector operations without understanding implicit groupings. It would lead to attempting to divide by vectors and other such nonsense operations.

I will attempt to find some good references to explicit groupings before editing the article.. Bill C. Riemers (talk) 01:48, 26 March 2016 (UTC)

Here one excellent article by a professor from Berkeley that incates PEDMAS does not even apply to expressions like 1/2x because the implied grouping makes it ambiguous. As such this example should be modified to use an implicit operator. Bill C. Riemers (talk) 02:06, 26 March 2016 (UTC)

This subject has been discussed here at length above. Scientists tend to agree with you that 1/2x means the reciprocal of 2x. Mathematicians tend to see it as x/2. I'm a mathematician.
I would argue that once we open to the door to the idea of "implicit grouping", do we then say that 2x^2 means the square of 2x? Certainly not. So, how to formulate the exact rule for when 2x is explicitly grouped. Is it grouped in √2x? Is it grouped in 1/2 x? How large does the space between the 2 and the x have to be before the implicit grouping is broken? Is half an em enough to break the implicit grouping? How about an em? You see the bag of worms opened up. Essentially, scientists say "if it looks like implicit grouping to me, it is, and you mathematicians spend too much time worrying about definitions." Yes, we do worry about definitions, but we have reasons.
In any case, this is not the place to debate the subject. Wikipedia uses references and while there are references both ways, the preponderance of the references agree with the article as it stands. Almost all references agree that 1/2x should be avoided.
Rick Norwood (talk) 11:58, 26 March 2016 (UTC)
"Mathematicians tend to see it as x/2." This claim continues to be completely false, and you have never produced a single piece of evidence that supports it. --JBL (talk) 14:20, 26 March 2016 (UTC)
As soon as you get into higher order mathematics, even vector operations the PEDMAS rules simply fall apart. As such, most mathematicians could care less about the silly PEDMAS rules taught in grade school. (talk) 18:31, 26 March 2016 (UTC)
The point between implied groupings, is that if there is an implied grouping that is ambiguous then the rules PEDMAS should simply not be applied. If you do not know if the author that wrote 2x^2 intended an implied grouping between the 2 and the x, then you should not proceed to blindly calculate a result, but should instead seek clarification on what they meant. I would however, argue it is clear in the case of 2x^2 the author means 2(x^2) because exponents are a higher order operation than multiplication. The ambiguity really only becomes likely with two operations of the same order prescience. (talk) 18:32, 26 March 2016 (UTC)

I am certainly not implying that PEDMAS or any of the other silly grade school rules apply. As discussed in an issue of the Notices of the American Mathematical Society last year, all American K-12 math textbooks are hopelessly flawed. I have given a number of references (in the previous section) where the standard hierarchy of operations applies, with addition and subtraction on the bottom level, multiplication and division on the middle level, and exponents and roots on the highest level. I've also pointed out the ambiguity that arises when "implied grouping" is asserted. Others disagree, and I'm under the impression that most mathematicians believe whatever they learned in their first real math course is the right way to do things, and any other way seems wrong to them. (It's the same with beliefs about whether a ring must have an identity.) Since it is all a matter of definition, the important thing is to use parentheses to avoid possible ambiguity. Rick Norwood (talk) 11:58, 27 March 2016 (UTC)

Paragraphs 2 and 3[edit]

Paragraph 3 is really just a synopsis of par. 2: I think it should go. GeneCallahan (talk) 20:18, 29 May 2017 (UTC)

 Done Agreed. --Bill Cherowitzo (talk) 22:10, 29 May 2017 (UTC)
I put it back. It is there to emphasize the history of the idea, that it is not some modern invention but goes back to the beginnings of algebraic notation,. Rick Norwood (talk) 11:41, 30 May 2017 (UTC)
I also agree that it's largely redundant; I've tried another version. --JBL (talk) 16:58, 30 May 2017 (UTC)
OK. Rick has a good point and Joel's rewrite was better, but I still had that feeling of redundancy. I've tried another version which essentially combines the two paragraphs and so removes that feeling without losing that historical perspective.--Bill Cherowitzo (talk) 17:17, 30 May 2017 (UTC)