Math Q: Who invented the Order of Operations?

I did not mean to criticize you specifically; apologies. The acronym itself makes little sense (though who am I to criticize if there is data it is useful): why mention both multiplication and division, for example? Are we to assume one comes before the other? [In fact some style guides say simply to write 1/(2x) instead of 1/2x.] And if someone writes \log 2x or \exp 2x I would assume the multiplication happens first.

Didn’t someone upthread point out that implied multiplication by adjacency is actually the second highest in the order of operations, coming only after parens. That’s something that’s missed in the PEMDAS acronym.

3rd highest, after parens and exponentiation. It’s the M in PEMDAS.

Kinda. For xab, you want to multiply a times b before taking the exponent of x.

Yes, one can use algebra to symbolically rearrange that to xaxb then do both exponentiations before the multiplication-by-adjacency of the two intermediate results.

But this whole discussion of operator precedence is about the sequence of calculating what you read while leaving it in whatever format it was written.

Heck, consider xa+b. In this case we need to do addition before we can do exponentiation.

PEMDAS has the advantage of being memorable to schoolkids. It has lots of conceptual problems as an embodiment of the actual full set of rules.

No. What they were pointing out was that, for example, in the expression x^2y, you first do the 2y before the exponentiation. Otherwise you’d do x^2 and then multiply the result by y. Which is not the way anyone interprets that expression.

Ninja’d.

I looked at this book for example

[“Practical and Intuitive Methodology”]
and on Page 590 there is the expression
F(t) = \exp tx
where multiplication clearly occurs before exponentiation.

OK, then I looked at this

software tool; the polynomial x^2-x^2y may be entered as x2-x2y

Do you mean x^{2y} or x^2y?

Which one do you think it means?

Sorry, did not pick up the context for this. I’ve been down this rabbit hole before. There is no strict convention for this. My opinion is that PEMDAS is not meant to apply to expressions with implicit operators. The use of implicit operators assumes further definition which is frequently unclear concerning cases like this. When superscripts are used for exponentiation then new grouping levels are created. For instance xab is equivalent to x^(a*b) while xab is equivalent to x^(a^b) (not sure if that formats correctly). In simple text it is rarely well defined IME and PEMDAS should not be relied on. FORTRAN for instance would interpret x**a*b as x**(a)*b, not x**(a*b). So you’re correct, this is missed entirely in PEMDAS.

I think I fixed your formatting; let me know if there’s something not quite right in it. It’s complicated by Discourse using asterisks as formatting codes.

And when students make an order-of-magnitude error in a calculation, in my experience, it’s almost always due to one of two mistakes, one of which is typing \frac{x}{2\pi} into their calculator as x/2\pi. (The other is typing something like 10^6 as 10e6.)

Thanks. Looks right. I noticed the italics but was pretty tired while posting and thought I might screw it up more if I tried to fix it. At least the super/subscripting worked right.

The trick is put a backslash in front of every asterisk you intend to be displayed as such rather than signallng italics or bold or bulleted or …

Which I forgot to do on my first post in this thread too. :man_facepalming:

Only if there is no sub-grouping using parentheses or some other method. RPN uses a stack to achieve the same thing. I personally find left-to-right and parens with no operator precedence to be the best method in terms of readability because I used that so much. The result is that no matter what method is in use I use parens wherever the order of operations is not left to right and mixes operations that might be understood under different rules. That is the most clearly readable representation an expression using plaintext. I recall at least one studio tool that would insert parens on request based on the language in use to avoid confusion. In the world of multilinqual coding this is invaluable.

Quite right. And I agree with you that computer code is improved by full parenthesis-ization rather than leaving precedence to chance and possibly misremembered rules.

This is much more true IMO for computer code than it is for arithmetic in schoolbooks and homework, in even complicated spreadsheets, etc. Due mostly to the blending in code of arithmetic operators, logical operators, bitwise operators, and implicit type conversions. This last feature of course is the one that varies most between modern languages.

Back in the day I wrote a lot of APL. It has not stood the test of time well, but their ideas about order of evaluation were spot-on.

Of course the assertion I was responding to was simply that one could / should always re-order any algebraic expression such that doing the arithmetic evaluation straight left to right with no parentheses whatsoever would give the correct result. One can’t, so won’t.

Back before mathematical notation was created and all math problems were word problems, were there customs as to how things were written? For instance, there are many ways to describe the equation “2x(6-1)”, such as “multiply by two the result of subtracting one from six” or “subtract one from six and then multiply the result by two”. Were all descriptions pretty much okay, or were there expectations as to the order that things were stated?

Over the years we’ve had several threads asking about, discussing, and debating the order of operations. I’m bumping this most recent one, because there’s a new video that does a good job of exmplaining " Why is the Order of Operations the way that it is?"