B Question about PEMDAS/BODMAS ambiguity

  • B
  • Thread starter Thread starter DaveC426913
  • Start date Start date
DaveC426913
Gold Member
Messages
23,830
Reaction score
7,814
TL;DR Summary
Just a quick clarification on brackets
PEMDAS/BODMAS is a bit ambiguous on what to do with brackets once their inner components are resolved.

A number ouside a bracket means multiply, obvs. I am virtually certain it is not some "special" kind of multiply that takes precedence; the lack of an operator is simply a shortcut.

So, given this:
6/2(1+2)

If I understand it correctly, the correct resolution is:
6/2(1+2)
= 6/2(3)
= 6/2x3
= 3x3
= 9

and not
6/2(1+2)
= 6/2(3)
= 6/6
= 1

Lot of misinformation out there so I'm asking you guys cuz I trust you.

(We need a fourth thread prefix: [F] Level: Facebook)
 
Mathematics news on Phys.org
IMHO, anyone who is too lazy to include more parentheses, like (6/2)(1+2) or 6/(2(1+2)), deserves what he gets.
 
  • Like
Likes scottdave, tellmesomething, usaj and 6 others
FactChecker said:
IMHO, anyone who is too lazy to include more parentheses, like (6/2)(1+2) or 6/(2(1+2)), deserves what he gets.
Yes. The best answer is: don't write an ambiguous equation in the first place.

But let's assume we are handed the equation as-is and are asked to solve it.
 
  • Like
Likes russ_watters
DaveC426913 said:
But let's assume we are handed the equation as-is and are asked to solve it.
It's ambiguous and interpretation depends on house style or context. It's not specific to resolving bracketed expressions - generally, a/bc is ambiguous between (a/b)c and a/(bc). Many people will argue for left-to-right evaluation (i.e. (a/b)c), but it isn't guaranteed. Refer to the author.

If this is your grandkids' homework, check their textbook for what it says.
 
OK. I PEMDAS includes the M/D convention of left-to-right though.

No, it's not homework, just one of those dumb Facebook puzzles that tripped me up and got me thinking.
 
DaveC426913 said:
No, it's not homework, just one of those dumb Facebook puzzles that tripped me up and got me thinking.
It's just ambiguous. That's why these examples start so many fights, because neither the 1 nor the 9 camp is clearly right.
 
DaveC426913 said:
Yes. The best answer is: don't write an ambiguous equation in the first place.

But let's assume we are handed the equation as-is and are asked to solve it.
Since I am retired and can not be fired, I would hand it back. ;-)
But otherwise, I agree that it is proper to proceed left-to-right with the operations of division and multiplication being of equal precedence.
(The computer agrees with me, but it requires 6/2*(2+1), so I don't know if that answers your question.)
 
Any linear notation, especially if it involves divisions that are not notated as ##{}^{-1}## but with ##/## or ##
\div ## instead needs either a lot - and I mean a lot - of parentheses or is ambiguous. The internet is full of nonsense that makes use of this ambiguity. My point of view meanwhile, and which I defend, is that neither ##/## nor ##\div ## are signs a mathematician would use. We write ##{}^{-1}## or horizontal lines of varying lengths. The other ones are for school kids to keep them stupid. (May the ****storm begin!)

"I hate that cat" (Freddie Frinton, 1961) [Ed.: The English Wikipedia version I linked to is inaccurate with the year. I used the German information as it was a German production.]
 
FactChecker said:
But otherwise, I agree that it is proper to proceed left-to-right with the operations of division and multiplication being of equal precedence.
At least one time we discussed this here it was prompted partially by a journal that specifically noted in its style guide that ##1/2\pi=\frac 1{2\pi}##. Which I think is perfectly reasonable - if I'd meant ##\pi/2## I'd have written that.

So I'm with fresh_42 on this one - ambiguous.
 
  • Like
Likes scottdave, PeroK and FactChecker
  • #10
I'm not aware that I ever learned any "order of operations". Perhaps it was taught at school and I just can't remember. When I picked up physics and maths eleven years ago I was not aware of it. And, I had no problems interpreting mathematical expressions correctly.

It was a bit of a shock to learn that I was supposed to be parsing every line like a computer program and applying a set of rules I'd never heard of! When I pushed back and said that, since I had never missed it, these order of operations rules were unnecessary, some people got very angry. One recurring theme was the confusion that the associative and distributive laws depended on an order of operations. Which they don't.

The other thing that generated a lot of bad feeling was my idea that a mathematical expression is not well-formed, if it's ambiguous. In other words, all these pointless Internet puzzles are not even well-formed mathematical expressions. I was suprised to find mathematicians who believed that "everything had a right answer", no matter what jumble of symbols were shoved together.

I did think about doing an Insight (or simply writing up) the rules that I had picked up without noticing. It all seems so simple and logical. But, there is so much anger in the "order of operations" camp against any attempt to challenge it, that I never bothered.
 
  • Like
Likes gmax137, fresh_42 and martinbn
  • #11
PeroK said:
It was a bit of a shock to learn that I was supposed to be parsing every line like a computer program and applying a set of rules I'd never heard of!
One genre if these internet puzzles is something like "what is 3×20 + 2×10?", leading to arguments between those who remember that you're supposed to evaluate multiplications first (80) and those who evaluate left-to-right (620). Curiously, if you tell them you have three 20p coins and two 10p coins, absolutely nobody believes that you have £6.20. What I take from that is that people in general are terrible at recognising the abstract rules they apply happily in some situations.

You would seem to be an exception.

Edit: after typing this I noticed that the first "similar thread" is the one I referred to earlier about journal style and I used the exact same example (even the numbers) there. I'm not sure what that says about me...
 
  • #12
Ibix said:
One genre if these internet puzzles is something like "what is 3×20 + 2×10?", leading to arguments between those who remember that you're supposed to evaluate multiplications first (80) and those who evaluate left-to-right (620). Curiously, if you tell them you have three 20p coins and two 10p coins, absolutely nobody believes that you have £6.20. What I take from that is that people in general are terrible at recognising the abstract rules they apply happily in some situations.

You would seem to be an exception.
It's not well-formed mathematics. I would insist that brackets are required. They are not optional in this case. Informally, it's clear what is meant.

There's a big difference between that and ##ab + cd##. Which is standard mathematics. Dropping the symbol for multiplication makes things clear. You can insist there is a rule there and, if you insist, then I could formulate the rule any number of ways.

We would then perhaps disagree if someone wrote ##a \ \ \ b + c \ \ \ d##. I would say that is not well-formed, whereas, I guess you would parse that as ab+cd and everything is hunky-dory.

My point is that no one who writes mathematics or physics textbooks has ever demanded that I know these rules! I can read any mathematics or physics book in blissful ignorance of these things.
 
  • #13
Im 34, and I was taught in 5th grade, that with PEMDAS, M and D are preformed from left to right. The same for A and S.

I quickly browsed 4 algebra books aimed at the remedial math level, and they take this formulation.

So I would say, for American books. Follow the above convention.
 
  • #14
MidgetDwarf said:
So I would say, for American books. Follow the above convention.
No book demands that you know how to interpret ##a/b/c##. Everyone writes ##(ab)/c## or ##a/(bc)## as appropriate.

Ironically, everyone professes PEMDAS, but then follows "my" rule about the necessity of brackets!
 
  • Like
Likes fresh_42 and martinbn
  • #15
Does any of these question appear anywhere except of course on social media? To me they seem deliberately designed to be ambiguous in order to cause pointless arguments.
 
  • Like
Likes pbuk and PeroK
  • #16
PeroK said:
No book demands that you know how to interpret ##a/b/c##. Everyone writes ##(ab)/c## or ##a/(bc)## as appropriate.

Ironically, everyone professes PEMDAS, but then follows "my" rule about the necessity of brackets!
If one avoids backslash and uses the notation fractions as ##\frac{ab}c## and ##\frac a{bc}##, there will be no confusion.

Or does the ##a/b/c## mean ##\frac{\frac{a}{b}}{c}## or ##\frac{a}{\frac{b}{c}}##?
 
  • #17
PeroK said:
I'm not aware that I ever learned any "order of operations".
IIRC then the only rule I learned was that ##x=ab+c## has to be calculated as ##x=(ab)+c## and not as ##x\neq a(b+c).## It has been called "Punktrechnung vor Strichrechnung" (points before lines). That was it. I never missed those PEMBAS, BODMAS, or whatever. I very likely would have had more difficulties learning those acronyms than correct calculations.
 
  • #18
DaveC426913 said:
OK. I PEMDAS includes the M/D convention of left-to-right though.
Not as far as I recall. Of course when I took algebra in 9th grade, the only mention was of MDAS (with a mnemonic of My Dear Aunt Sally). There was no mention of left to right as far as operator associativity was concerned. In other words, for operators at the same precedence level (+ and - or ##\times## and /) how should 6 - 2 + 3 be parsed? Should we do the subtraction first and then the addition? Or do the addition first and then the subtraction? The first interpretation gives a result of 7 while the second gives a result of 1. If we understand that the associativity is left to right, then the result of 7 is straightforward.

OTOH, how do the exponents associate in this expression - ##2^{3^2}##? Should the answer be 64 (the square of ##2^3##) or 512 ( 2 to the 9th power)? To the best of my knowledge, neither PEMDAS or BODMAS provides any clue.
 
Last edited:
  • #19
PeroK said:
There's a big difference between that and ##ab + cd##. Which is standard mathematics. Dropping the symbol for multiplication makes things clear.
PeroK said:
My point is that no one who writes mathematics or physics textbooks has ever demanded that I know these rules! I can read any mathematics or physics book in blissful ignorance of these things.
I'm not sure how much we apply the PEMDAS rules without thinking about it. We certainly do apply rules sometimes without thinking about it.
That being said, parentheses are free. These puzzles annoy me.
 
  • #20
Those "puzzles" on FB that "Only a Genius Can Solve!" are posted solely to garner comments. Prove me wrong!
 
  • #21
Mark44 said:
DaveC426913 said:
PEMDAS includes the M/D convention of left-to-right though.
Not as far as I recall. Of course when I took algebra in 9th grade, the only mention was of MDAS (with a mnemonic of My Dear Aunt Sally). There was no mention of left to right as far as operator associativity was concerned.
See below.

Mark44 said:
In other words, for operators at the same precedence level (+ and - or ##\times## and /) how should 6 - 2 + 3 be parsed?
Left-to-right.

6-2+3
=4+3
=7


"PEMDAS is an acronym for the words parenthesis, exponents, multiplication, division, addition, subtraction. For any expression, all exponents should be simplified first, followed by multiplication and division from left to right and, finally, addition and subtraction from left to right."
https://study.com/learn/lesson/pemd...an acronym for,subtraction from left to right.
 
  • #22
gmax137 said:
Those "puzzles" on FB that "Only a Genius Can Solve!" are posted solely to garner comments. Prove me wrong!
They absolutely are. In fact, much of Facebook - articles and all - is picking up that strategy and taking it another step:
- post a multiple choice puzzles and don't include the actual answer in the options
- post demonstrably false information. People will show up in droves to correct someone.

This kind of thing is rampant:

F-18 Hornet - apex predator of the sky
1737313283780.png
 
  • #23
The addition before subtraction rule, if taken seriously, would mess up the Taylor series:
$$\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots$$
 
  • #24
DaveC426913 said:
Left-to-right.
How about my other example, the one with exponents?
##2^{3^2}##? Left to right or right to left? My concern with PEMDAS/BODMAS is that it doesn't address how operators associate, which specifically dictates left to right vs. right to left.
 
  • #25
Mark44 said:
How about my other example, the one with exponents?
##2^{3^2}##? Left to right or right to left?
Yes. PEMDAS does not address that specific condition.

Frankly, in this case, my intuition tells me to do it top-down.
2^3^2 reads to me as 2^9.

Mark44 said:
My concern with PEMDAS/BODMAS is that it doesn't address how operators associate, which specifically dictates left to right vs. right to left.
Yes, it is not all-encompassing.
 
  • #26
I agree with Dave. My reasoning is that (2^3)^2 would be written as 2^6.
 
  • #27
mathwonk said:
I agree with Dave. My reasoning is that (2^3)^2 would be written as 2^6.
What??
 
  • #28
8^2, aka 64, or 2^6. It took me a minute.
 
  • Like
Likes DaveC426913
  • #29
I refer to the general rule that (a^b)^c = a^(bc).
 
  • #30
May be instead of numbers there should be a variable too. Say the expression ##2^{x^3}## is never going to be confused with ##(2^x)^3##.
 
  • #31
Regarding ##2^{3^2}##:
DaveC426913 said:
Yes. PEMDAS does not address that specific condition.
We should not confuse the order of operations with ambiguity caused by bad typesetting. With proper typesetting, ##2^{3^2}## would not be confused with ##(2^3)^2## and PEMDAS would give the correct result.
 
  • #32
FactChecker said:
We should not confuse the order of operations with ambiguity caused by bad typesetting. With proper typesetting, ##2^{3^2}## would not be confused with ##(2^3)^2## and PEMDAS would give the correct result.
This has nothing to do with order of operations (AKA precedence), but rather with associativity (grouping) of operators. PEMDAS (or BODMAS) doesn't have anything to say about how exponents should be grouped when there are more than one of them. Modern programming languages specify exactly how to deal with these kinds of situations. IOW, whether operators group left-to-right or right-to-left. I've said before that it seems to me that mathematics should take a leaf from programming languages in this regard.
 
  • Like
Likes DaveC426913
  • #33
Mark44 said:
This has nothing to do with order of operations (AKA precedence), but rather with associativity (grouping) of operators. PEMDAS (or BODMAS) doesn't have anything to say about how exponents should be grouped when there are more than one of them.
The proper typesetting position of an exponent is clearly defined. There is no confusion between ##xy## versus ##x^y##. Likewise, there is no confusion between ##2^{3\cdot 2}## versus ##2^{3^2}##.
Mark44 said:
Modern programming languages specify exactly how to deal with these kinds of situations. IOW, whether operators group left-to-right or right-to-left. I've said before that it seems to me that mathematics should take a leaf from programming languages in this regard.
PEMDAS does not define the proper typesetting of exponents, subscripts, or superscripts, and it does not try. Also, programming languages do not allow for advanced typesetting to identify exponents, subscripts, or superscripts. [UPDATE] In those cases it is up to the individual language to specify how an exponent will be identified, like '^' or '**'.
 
Last edited:
  • #34
FactChecker said:
...there is no confusion between ##2^{3\cdot 2}## versus ##2^{3^2}##.
OK, but that's not what's in question.

Does
##2^{3^2}##
equal 64? Or 512?
 
  • #35
FactChecker said:
The proper typesetting position of an exponent is clearly defined. There is no confusion between xy versus xy. Likewise, there is no confusion between ##2^{3\cdot 2}## versus ##2^{3^2}##.

FactChecker said:
PEMDAS does not define the proper typesetting of exponents ...
What I'm saying is that PEMDAS or some modification of it should explicitly define how ##2^{3^2}## is to be evaluated. Even with the typesetting as shown here, it's not clear to many people that the correct grouping is ##2^9## rather than ##8^2##.
 
  • #36
While
Mark44 said:
What I'm saying is that PEMDAS or some modification of it should explicitly define how ##2^{3^2}## is to be evaluated.

While I am fine with how this thread is playing out, my initial query was about the ambiguity that's already within the scope of PEMDAS - which is not all-encompassing. To-wit: PEMDAS is a high school mnemonic that is intended to help with basic arithmetic operations

It seems it implicitly considers nested powers to be too rare in regular use to warrant being included in its compact rules. I'm OK with that. After all, it can't cover everything and still be a mnemonic.

But since it already has rules for brackets and for M/D, it should be internally consistent to clarify how the two should be reconciled, since the causal user of PEMDAS will surely encounter values next to brackets but lacking an operator.
 
  • #37
DaveC426913 said:
If I understand it correctly, the correct resolution is:
6/2(1+2)
= 6/2(3)
= 6/2x3
= 3x3
= 9
To go back to your original question. I can't see the rationale behind splitting up the term after the division symbol. Naively, I would interpret ##?/?## in the same way as ##\frac ? ?##.
DaveC426913 said:
and not
6/2(1+2)
= 6/2(3)
= 6/6
= 1
That seems more natural to me.
 
  • #38
Mark44 said:
What I'm saying is that PEMDAS or some modification of it should explicitly define how ##2^{3^2}## is to be evaluated. Even with the typesetting as shown here, it's not clear to many people that the correct grouping is ##2^9## rather than ##8^2##.
The expression ##2^{3^2}## is well defined as ##2^{(3^2)}=2^9##. The expression ##(2^3)^{{}^2}## is not valid; the final 2 is raised too high to be an valid exponent. EDIT: ##(2^3)^{{}^2}## does not equal ##(2^3)^2## or ##2^{3^2}##. It is not a valid expression.
 
Last edited:
  • #39
FactChecker said:
The expression ##2^{3^2}## is well defined as ##2^{(3^2)}=2^9##.
Exactly where is this well-defined? I don't recall reading it in algebra textbooks and it's certainly not stated as part of PEMDAS that exponents should be grouped right-to-left.

FactChecker said:
The expression ##(2^3)^{{}^2}## is not valid; the final 2 is raised too high to be an valid exponent. EDIT: ##(2^3)^{{}^2}## does not equal ##(2^3)^2## or ##2^{3^2}##. It is not a valid expression.
I would bet that at least 99 out of any 100 people would not see ##(2^3)^{{}^2}## as being appreciably different from ##(2^3)^2##.
 
  • #40
PeroK said:
To go back to your original question. I can't see the rationale behind splitting up the term after the division symbol. Naively, I would interpret ##?/?## in the same way as ##\frac ? ?##.

That seems more natural to me.
It seems natural, but it flies in the face of the PEMDAS rules.

X(Y) means X times Y; it's just shorthand.
So Z/X(Y), means start from left - i.e. the division first
 
  • #41
DaveC426913 said:
F-18 Hornet - apex predator of the sky
1737399416653.png
No aircraft buffs here, eh? :wink:
 
  • #42
DaveC426913 said:
No aircraft buffs here, eh? :wink:
It's an F-15, either the A or C variant. It's off-topic, though...
 
  • #43
DaveC426913 said:
It seems natural, but it flies in the face of the PEMDAS rules.
What about ##\frac 6 {2(1+2)}##?

Division first, remember!
 
  • Haha
Likes DaveC426913
  • #44
Mark44 said:
Exactly where is this well-defined? I don't recall reading it in algebra textbooks and it's certainly not stated as part of PEMDAS that exponents should be grouped right-to-left.
An exponent is on the right and one level up, not two levels up. Just because it is hard to see visually that it is wrong does not make it right. I don't know where this is defined, but I know that the exponent, ##c##, of ##a^{b^c}## is not on the same level as ##b## is.
Mark44 said:
I would bet that at least 99 out of any 100 people would not see ##(2^3)^{{}^2}## as being appreciably different from ##(2^3)^2##.
It's not a question of how hard it is to visually see. This is a mathematics question, not an eye chart. They certainly are very different mathematically.
 
  • #45
FactChecker said:
An exponent is on the right and one level up, not two levels up. Just because it is hard to see visually that it is wrong does not make it right. I don't know where this is defined, but I know that the exponent, ##c##, of ##a^{b^c}## is not on the same level as ##b## is.

It's not a question of how hard it is to visually see. This is a mathematics question, not an eye chart. They certainly are very different mathematically.

Are we arguing whether an given exponent looks too small, and that somehow that changes the meaning? Surely we are not.

Because, unless I am mistaken, you can't arbitrarily pick levels, can't you can't skip any. Which means text size is not an indicator - only location (i.e. up-and-right) is.

To-wit:
FactChecker said:
The expression ##(2^3)^{{}^2}## is not valid; the final 2 is raised too high to be an valid exponent.
I say they are the same thing.

The fact that you were able to construct them visually using LaTex does not mean the distinction has mathematically rigorous meaning. How would that rule apply if this were written in pencil? How could you even write it? (In other words, you are calling out a LaTeX artifact, not a math artifact.)

They are both, simply, 2^3^2. One just uses some janky LaTeX.


Still, that seems be a tangent.


This is what I'm arguing:
FactChecker said:
The expression ##2^{3^2}## is well defined as ##2^{(3^2)}=2^9##.
I do not grant this without convincement.

That could be interpreted as either 2^(3^2) or (2^3)^2 until and unless we have some conventions to follow.
 
Last edited:
  • #46
DaveC426913 said:
Are we arguing whether an given exponent looks too small, and that somehow that changes the meaning? Surely we are not.
An exponent is shown in typeset documents as being just to the right and above the base number. In ##a^{b^c}##, ##c## is the exponent of the base ##b## and the result is the exponent of ##a##. ##c## is not the exponent of ##a^b##. That would be denoted by ##(a^b)^c##.
You can do it your way but, IMO, it will cause you trouble if you try to publish.
 
  • #47
In reviewing my responses, I see they could be misinterpreted as sarcastic. I am not being sarcastic.

FactChecker said:
An exponent is shown in typeset documents as being just to the right and above the base number.
I'm sorry. I do not follow.
Are typeset documents the authorities? Is that where the rule originates?

FactChecker said:
In ##a^{b^c}##, ##c## is the exponent of the base ##b## and the result is the exponent of ##a##.
Are you asserting this?

FactChecker said:
##c## is not the exponent of ##a^b##.
Why not?
FactChecker said:
That would be denoted by ##(a^b)^c##.
You're saying we must use brackets to denote the difference?

In other words, the absence of brackets makes the tower of exponents ambiguous, yes? Which means 232
might be interpreted either way.
 
  • #48
DaveC426913 said:
In other words, the absence of brackets makes the tower of exponents ambiguous, yes? Which means 232
might be interpreted either way.
No. The brackets are necessary for it to be a valid expression equivalent to ##(2^3)^2##.
Notice that the final ##2## is at different levels in ##2^{3^2}## versus ##(2^3)^2##. It can not be at both levels. They are mutually exclusive.
If you agree that the ##c## in ##a^{b^c}## is at the right level to be the exponent of ##b## then it can not be the exponent of ##a^b##. The two are mutually exclusive because the ##c## can not be at both levels.
##2^{3^2}## should not be interpreted as ##(2^3)^2##.
 
Last edited:
  • #49
Mark44 said:
Exactly where is this well-defined? I don't recall reading it in algebra textbooks and it's certainly not stated as part of PEMDAS that exponents should be grouped right-to-left.
No it is not in PEMDAS because at the level PEMDAS is taught repeated exponentiation is not encountered, however exponentiation is a right-associative operation. If it were left-associative you would have ## x^{a^b} = (x^a)^b = x ^ {ab} \implies a^b = ab ##.

This is not taught explicitly for the same reason that we do not teach explicitly that in e.g. ## e^{i\theta} ## the multiplication comes before the exponentiation, breaking PEMDAS.

As said somewhere above, PEMDAS is not mathematics, it is simply a mnemonic that helps us do arithmetic and algebra over first the integers, then the rationals and finally the polynomials without starting with the field axioms, which would be a bit tough in 5th grade.
 
  • Like
Likes PeroK, SammyS and FactChecker
  • #50
Mark44 said:
I would bet that at least 99 out of any 100 people would not see ##(2^3)^{{}^2}## as being appreciably different from ##(2^3)^2##.
FactChecker said:
It's not a question of how hard it is to visually see. This is a mathematics question, not an eye chart. They certainly are very different mathematically.
I don't buy your argument at all. Since both expressions have ##2^3## in parentheses, which are at the highest level of precedence, I'm going to rewrite the two expressions as ##8^{{}^2}## and ##8^2##. To claim that these are "very different mathematically" seems pedantic to me.
 
Back
Top