this post was submitted on 31 May 2025
215 points (90.3% liked)

Technology

71991 readers
3146 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] billwashere@lemmy.world 23 points 3 weeks ago (4 children)

So order of operations is hard?

[–] SmartmanApps@programming.dev 0 points 1 day ago

So order of operations is hard?

Not for students it isn't. Adults who've forgotten the rules on the other hand...

[–] HereIAm@lemmy.world 11 points 3 weeks ago (3 children)

The issue normally with these "trick" questions is the ambiguous nature of that division sign (not so much a problem here) or people not knowing to just go left to right when all operators are of the same priority. A common mistake is to think division is prioritised above multiplication, when it actually has the same priority. Someone should have included some parenthesis in PEDMAS aka. PE(DM)(AS) 😄

[–] SmartmanApps@programming.dev -1 points 1 day ago (1 children)

The issue normally with these “trick” questions

There's no "trick" - it's a straight-out test of Maths knowledge.

the ambiguous nature of that division sign

Nothing ambiguous about it. The Term of the left divided by the Term on the right.

A common mistake is to think division is prioritised above multiplication

It's not a mistake. You can do them in any order you want.

when it actually has the same priority

Which means you can do them in any order

[–] HereIAm@lemmy.world 1 points 21 hours ago (1 children)

"A common mistake is to think division is prioritised above multiplication"

That is what I said. I said it's a mistake to think one of them has a precedence over the other. You're arguing the same point I'm making?

[–] SmartmanApps@programming.dev 0 points 21 hours ago

I said it’s a mistake to think one of them has a precedence over the other

And I said it's not a mistake. You still get the right answer.

You’re arguing the same point I’m making?

No, I'm telling you that prioritising either isn't a mistake. Mistakes give wrong answers. Prioritising either doesn't give wrong answers.

[–] vithigar@lemmy.ca 7 points 3 weeks ago (3 children)

The same priority operations can be done in any order without affecting the result, that's why they can be same priority and don't need an explicit order.

6 × 4 ÷ 2 × 3 ÷ 9 evaluates the same regardless of order. Can you provide a counter example?

[–] HereIAm@lemmy.world 5 points 3 weeks ago* (last edited 3 weeks ago) (4 children)

So let's try out some different prioritization systems.

Left to right:

(((6 * 4) / 2) * 3) / 9
((24 / 2) * 3) / 9
(12 * 3) / 9
36 / 9 = 4

Right to left:

6 * (4 / (2 * (3 / 9)))  
6 * (4 / (2 * 0.333...))  
6 * (4 / 0.666...)  
6 * 6 = 36

Multiplication first:

(6 * 4) / (2 * 3) / 9  
24 / 6 / 9

Here the path divides again, we can do the left division or right division first.

Left first: 
(24 / 6) / 9  
4 / 9 = 0.444...

Right side first:  
24 / (6 / 9)  
24 / 0.666... = 36

And finally division first:

6 * (4 / 2) * (3 / 9)  
6 * 2 * 0.333...  
12 * 0.333.. = 4 

It's ambiguous which one of these is correct. Hence the best method we have for "correct" is left to right.

[–] SmartmanApps@programming.dev 0 points 1 day ago

Right to left:

6 * (4 / (2 * (3 / 9)))

Nope! 6 × 4 ÷ 2 × 3 ÷ 9 =4 right to left is 6 ÷ 9 x 3 ÷ 2 × 4 =4. You disobeyed the rule of Left Associativity, and your answer is wrong

Multiplication first: (6 * 4) / (2 * 3) / 9

Also nope. Multiplication first is 6 x 4 x 3 ÷ 2 ÷ 9 =4

Left first: (24 / 6) / 9

Still nope. 6 × 4 x 3 ÷ 2 ÷ 9 =4

Right side first: 24 / (6 / 9)

Still nope. 6 × 4 x 3 ÷ 9 ÷ 2 =4

And finally division first: 6 * (4 / 2) * (3 / 9)

And finally still nope. 6 ÷ 9 ÷ 2 x 4 x 3 =4

Hint: note that I never once added any brackets. You did, hence your multiple wrong answers.

It’s ambiguous which one of these is correct

No it isn't. Only 4 is correct, as I have just shown repeatedly.

Hence the best method we have for “correct” is left to right

It's because students don't make mistakes with signs if you don't change the order. I just showed you can still get the correct answer with different orders, but you have to make sure you obey Left Associativity at every step.

[–] vithigar@lemmy.ca 5 points 3 weeks ago (1 children)
[–] SmartmanApps@programming.dev 0 points 1 day ago

I stand corrected

No, you weren't. Most of their answers were wrong. You were right. See my reply. 4 is the only correct answer, and if you don't get 4 then you did something wrong, as they did repeatedly (kept adding brackets and thus changing the Associativity).

[–] Melvin_Ferd@lemmy.world 3 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

Maybe I'm wrong but the way I explain it is until the ambiguity is removed by adding in extra information to make it more specific then all those answers are correct.

"I saw her duck"

Until the author gives me clarity then that sentence has multiple meanings. With math, it doesn't click for people that the equation is incomplete. In an English sentence, ambiguity makes more sense and the common sense approach would be to clarify what the meaning is

[–] SmartmanApps@programming.dev 0 points 1 day ago (1 children)

until the ambiguity is removed

There isn't any ambiguity.

all those answers are correct

No, only 1 answer is correct, and all the others are wrong.

Until the author gives me clarity then that sentence has multiple meanings. With math

Maths isn't English and doesn't have multiple meanings. It has rules. Obey the rules and you always get the right answer.

it doesn’t click for people that the equation is incomplete.

It isn't incomplete.

[–] Melvin_Ferd@lemmy.world 0 points 1 day ago* (last edited 1 day ago) (1 children)

Can you explain how that is? Like with an example?

Math is exactly like English. It's a language. It's an abstraction to describe something. Ambiguity exists in math and in English. It impacts the validity of a statement. Hell the word statement is used in math and English for a reason.

[–] SmartmanApps@programming.dev 0 points 23 hours ago (1 children)

Can you explain how that is? Like with an example?

I'm not sure what you're asking about. Explain what with an example?

Math is exactly like English. It’s a language

No it isn't. It's a tool for calculating things, with syntax rules. We even have rules around how to say it when speaking.

It’s an abstraction to describe something

And that something is the Laws of the Universe. 1+1=2, F=ma, etc.

Hell the word statement is used in math and English for a reason

You won't find the word "statement" used in Maths textbooks. I'm guessing you're referring to Expressions.

[–] Melvin_Ferd@lemmy.world 0 points 23 hours ago (1 children)

Those rules are based on axioms which are used to create statements which are used within proofs. As far as I know statements are pretty common and are a foundational part of all math.

Defining math as a language though is also going to be pointless here. It's not really a yes or no thing. I'll say it is a language but sure it's arguable.

And again laws are created using statements. I have plenty of textbooks that contain "statements"

[–] SmartmanApps@programming.dev -1 points 22 hours ago (1 children)

Those rules are based on axioms

Nope! The order of operations rules come from the proof of the definitions in the first place. 3x4=3+3+3+3 by definition, therefore if you don't do the multiplication first in 2+3x4 you get a wrong answer (having changed the multiplicand).

As far as I know statements are pretty common

And yet you've not been able to quote a Maths textbook using that word.

are a foundational part of all math

Expressions are.

It’s not really a yes or no thing

It's really a no thing.

And again laws are created using statements

Not the Laws of Maths. e.g. The Distributive Law is expressed with the identity a(b+c)=(ab+ac). An identity is a special type of equation. We have...

Numerals

Pronumerals

Expressions

Equations (or Formula)

Identities

No statements. Everything is precisely defined in Maths, everything has one meaning only.

[–] Melvin_Ferd@lemmy.world 1 points 22 hours ago* (last edited 22 hours ago) (1 children)

Order of operations is not a hard rule. It is a convention. It's something agreed upon but is it not something that is universally true.

Solve for X

X^2=4

[–] SmartmanApps@programming.dev 0 points 21 hours ago* (last edited 21 hours ago) (1 children)

Order of operations is not a hard rule

Yes it is.

It is a convention.

Left to right is a convention. Left Associativity is a hard rule. Left to right is a convention which obeys the rule of Left Associativity.

It’s something agreed upon

It's something that is a natural consequence of the definitions of the operators in the first place. As soon as Multiplication was defined in terms of Addition, that guaranteed we would always have to do Multiplication before Addition to get right answers.

is it not something that is universally true

Yes it is! All of Maths is universally true! 😂

Solve for X X^2=4

You know that's no longer an order of operations problem, right?

[–] Melvin_Ferd@lemmy.world 1 points 20 hours ago* (last edited 20 hours ago) (1 children)

What proof do you have that using a left to right rule is universally true?

From my understanding It's an agreed convention that is followed which doesn't make it a universal truth. If we're all doing it just to make things easier to understand, that implies we could have a right to left rule. It's also true that not all cultures right in the same way.

But here is an interesting quote from Florian Cajori in his book a history of mathematical notations.

Lastly here is an article that also highlights the issue.

https://scienceblogs.com/evolutionblog/2013/03/15/the-horror-of-pemdas

Some of you are already insisting in your head that 6 ÷ 2(1+2) has only one right answer, but hear me out. The problem isn’t the mathematical operations. It’s knowing what operations the author of the problem wants you to do, and in what order. Simple, right? We use an “order of operations” rule we memorized in childhood: “Please excuse my dear Aunt Sally,” or PEMDAS, which stands for Parentheses Exponents Multiplication Division Addition Subtraction.* This handy acronym should settle any debate—except it doesn’t, because it’s not a rule at all. It’s a convention, a customary way of doing things we’ve developed only recently, and like other customs, it has evolved over time. (And even math teachers argue over order of operations.)

[–] SmartmanApps@programming.dev 1 points 19 hours ago

What proof do you have that using a left to right rule is universally true?

From my understanding It’s an agreed convention that is followed

Read what I wrote again. I already said that left to right is a convention, and that Left Associativity is a rule. As long as you obey the rule - Left Associativity - you can follow whatever convention you want (but we teach students to do left to right, because they often make mistakes with signs when they try doing it in a different order, as have several people in this thread).

that implies we could have a right to left rule

You can have a right to left convention if the rule is Right Associativity.

It’s also true that not all cultures right in the same way

Yeah, I don't know how they do Maths - if they do it the same as us or if they just flip everything back-to-front (or top to bottom - I guess they would). In either case all the rules on top stay the same once the direction is established (like I guess exponents would now be to the top left not the top right? but in any case the evaluation of an exponent would stay the same).

But here is an interesting quote from Florian Cajori in his book a history of mathematical notations

Yeah, he's referring to the conventions - such as left to right - not the rule of Left Associativity, which all the conventions must obey. For a while Lennes was doing something different - because he didn't understand Terms - and was disobeying Left Associativity, (which meant his rules were at odds with everyone else), but his rule died out within a generation of his death,. Absolutely all textbooks now obey Left Associativity, same as before Lennes came along.

Lastly here is an article that also highlights the issue

Not really. Just another person who has forgotten the rules.

"as it happens, the accepted convention says the second one is correct"

No it isn't. The Distributive Law says the first is correct (amongst 4 other rules of Maths which also say the answer is only 1). The second way they did it disobeys The Distributive Law (and 4 other rules) and is absolutely wrong.

[–] HereIAm@lemmy.world 1 points 3 weeks ago (2 children)

100% with you. "Left to right" as far as I can tell only exists to make otherwise "unsolvable" problems a kind of official solution. I personally feel like it is a bodge, and I would rather the correct solution for such a problem to be undefined.

[–] SmartmanApps@programming.dev 0 points 1 day ago

100% with you. “Left to right” as far as I can tell only exists to make otherwise “unsolvable” problems a kind of official solution

It's not a rule, it's a convention, and it exists so as to avoid making mistakes with signs, mistakes you made in almost every example you gave where you disobeyed left to right.

[–] Robust_Mirror@aussie.zone 3 points 3 weeks ago (1 children)

It's so we don't have to spam brackets everywhere

9+2-1+6-4+7-3+5=

Becomes

((((((9+2)-1)+6)-4)+7)-3)+5=

That's just clutter for no good reason when we can just say if it doesn't have parentheses it's left to right. Having a default evaluation order makes sense and means we only need parentheses when we want to deviate from the norm.

[–] SmartmanApps@programming.dev 0 points 1 day ago (1 children)

It’s so we don’t have to spam brackets everywhere

No it isn't. The order of operations rules were around for several centuries before we even started using Brackets in Maths.

((((((9+2)-1)+6)-4)+7)-3)+5

It was literally never written like that

we only need parentheses when we want to deviate from the norm

That has always been the case

[–] Robust_Mirror@aussie.zone 0 points 19 hours ago (1 children)

You're literally arguing nothing right now. THEY took the position we should have brackets defining the order in every single equation or otherwise have them as undefined TODAY. It doesn't matter when they were invented. Obviously it's never been written like that. They are the one arguing it SHOULD BE. I said that would be stupid vs following the left to right convention already established. You're getting caught up in the semantics of the wording.

What you inferred: they're saying brackets were always around and we chose left to right to avoid bracket mess.

What I was actually saying: we chose and continue to choose to keep using the left to right convention over brackets everywhere because it would be unnecessary and make things more cluttered.

And yes, that IS a position mathematicians COULD have chosen once brackets WERE invented. They could have decided we should use them in every equation for absolute clarity of order. Saying we should not do that based on tradition alone is a bad reason.

The "always been the case" argument could justify any legacy system. We don't still use Roman numerals for arithmetic just because they were traditional. Things DO change.

Ancient Greeks and Romans strongly resisted zero as a concept, viewing it as philosophically problematic. Negative numbers were even more controversial with many mathematicians into the Renaissance calling them "fictitious" or "absurd numbers." It took centuries for these to become accepted as legitimate mathematical objects.

Before Robert Recorde introduced "=" in 1557, mathematicians wrote out "is equal to" in words. Even after its introduction, many resisted it for decades, preferring verbal descriptions or other symbols.

I could go on but if you're going to argue why something shouldn't be the case, you should argue more than "it's tradition" or "we've done fine without it so far". Because they did fine with many things in mathematics until they decided they needed to change or expand it.

[–] SmartmanApps@programming.dev 1 points 19 hours ago (1 children)

THEY took the position we should have brackets defining the order in every single equation or otherwise have them as undefined TODAY

Who's this mysterious "THEY" you are referring to, because I can assure you that the history of Maths tells you that is wrong. e.g. look in Cajori and you'll find the order of operations rules are at least 2 centuries older than the use of Brackets in Maths.,

It doesn’t matter when they were invented

The rules haven't changed since then.

They are the one arguing it SHOULD BE

...and watch Physicists and Mathematicians promptly run out of room on blackboards if they did.

You’re getting caught up in the semantics of the wording

No, you're making up things that never happened.

they’re saying brackets were always around and we chose left to right to avoid bracket mess

and that's wrong. Left to right was around before Brackets were.

we chose and continue to choose to keep using the left to right convention over brackets everywhere

and you're wrong, because that choice was made before we'd even started using Brackets in Maths, by at least a couple of centuries.

it would be unnecessary and make things more cluttered

They've always been un-necessary, unless you want to deviate from the normal order of operations.

They could have decided we should use them in every equation for absolute clarity of order

But they didn't, because we already had clarity over order, and had done for several centuries.

Saying we should not do that based on tradition alone is a bad reason.

Got nothing to do with tradition. Got no idea where you got that idea from.

Things DO change.

The order of operations rules don't, and the last change to the notation was in the 19th Century.

I could go on

and you'd still be wrong. You're heading off into completely unrelated topics now.

you should argue more than “it’s tradition” or “we’ve done fine without it so far”

I never said either of those things.

Because they did fine with many things in mathematics until they decided they needed to change or expand it

And they changed the meaning of the Division symbol sometime in the 19th Century or earlier, and everything has been settled for centuries now.

[–] Robust_Mirror@aussie.zone 1 points 19 hours ago (1 children)

The "mysterious" they is HerelAm, the person I was replying to you ninny.

[–] SmartmanApps@programming.dev -1 points 18 hours ago

The “mysterious” they is HerelAm, the person I was replying to you ninny

The person who couldn't even manage to get 10-1+1 correct when doing addition first 😂

[–] barsoap@lemm.ee 1 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

It’s ambiguous which one of these is correct. Hence the best method we have for “correct” is left to right.

The solution accepted anywhere but in the US school system range from "Bloody use parenthesis, then" over "Why is there more than one division in this formula why didn't you re-arrange everything to be less confusing" to "50 Hertz, in base units, are 50s^-1^".

More practically speaking: Ultimately, you'll want to do algebra with these things. If you rely on "left to right" type of precedence rules re-arranging formulas becomes way harder because now you have to contend with that kind of implicit constraint. It makes everything harder for no reason whatsoever so no actual mathematician, or other people using maths in earnest, use that kind of notation.

[–] SmartmanApps@programming.dev 0 points 1 day ago* (last edited 1 day ago)

The solution accepted anywhere but in the US school system range from “Bloody use parenthesis, then” over “Why is there more than one division in this formula why didn’t you re-arrange everything to be less confusing” to “50 Hertz, in base units, are 50s-1”.

No, the solution is learn the rules of Maths. You can find them in Maths textbooks, even in U.S. Maths textbooks.

so no actual mathematician, or other people using maths in earnest, use that kind of notation.

Yes we do, and it's what we teach students to do.

[–] HereIAm@lemmy.world 2 points 3 weeks ago

I fully agree that if it comes down to "left to right" the problem really needs to be rewritten to be more clear. But I've just shown why that "rule" is a common part of these meme problems because it is so weird and quite esoteric.

[–] Robust_Mirror@aussie.zone 3 points 3 weeks ago (1 children)

Another person already replied using your equation, but I felt the need to reply with a simpler one as well that shows it:

9-1+3=?

Subtraction first:
8+3=11

Addition first:
9-4=5

[–] SmartmanApps@programming.dev 0 points 1 day ago

Addition first: 9-4=5

Nope. Addition first is 9+3-1=12-1=11. You did 9-(1+3), incorrectly adding brackets and changing the answer (thus a wrong answer)

[–] troistigrestristes 2 points 3 weeks ago (1 children)

Oh my god now this is going to be Lemmy’s top thread for 6 months, isn’t it?

Btw, yeah I’m with you on this, you just need to know the priorities and you’re good, because the order doesn’t matter for operations with the same priority

[–] HereIAm@lemmy.world 1 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

Except it does matter. I left some examples for another post with multiplication and division, I'll give you some addition and subtraction to see order matter with those operations as well.

Let's take:
1 + 2 - 3 + 4

Addition first:
(1 + 2) - (3 + 4)
3 - 7 = -4

Subtraction first:
1 + (2 - 3) + 4
1 + (-1) + 4 = 4

Right to left:
1 + (2 - (3 + 4))
1 + (2 - 7)
1 + (-5) = -4

Left to right:
((1 + 2) - 3) + 4
(3 - 3) + 4 = 4

Edit: You can argue that, for example, the addition first could be (1 + 2) + (-3 + 4) in which case it does end up as 4, but in my opinion that's another ambiguous case.

[–] SmartmanApps@programming.dev 0 points 1 day ago

Except it does matter

No it doesn't. You disobeying the rules and getting lots of wrong answers in your examples doesn't change that.

I left some examples for another post with multiplication and division

Which you did wrong.

I’ll give you some addition and subtraction to see order matter with those operations as well

And I'll show you it doesn't matter when you do it correctly

Subtraction first: 1 + (2 - 3) + 4 1 + (-1) + 4 = 4

Nope. Right answer for wrong reason - you only co-incidentally got the answer right. -3+1+2+4=-3+7=4

Right to left: 1 + (2 - (3 + 4)) 1 + (2 - 7) 1 + (-5) = -4

Nope. 4-3+2+1=1+2+1=3+1=4

Edit: You can argue that, for example, the addition first could be (1 + 2) + (-3 + 4)

Or you could just do it correctly in the first place, always obeying Left Associativity and never adding Brackets

in my opinion that’s another ambiguous case

There aren't ANY ambiguous cases. In every case it's equal to 4. If you didn't get 4, then you made a mistake and got a wrong answer.

[–] troistigrestristes 2 points 3 weeks ago (1 children)

Oh, but of course the statement changes if you add parentheses. Basically, you’re changing the effective numbers that are being used, because the parentheses act as containers with a given value (you even showed the effective numbers in your examples).

Get this : + 1 - 1 + 1 - 1 + 1 - 1 + 1

You can change the result several times by choosing where you want to put the parentheses. However, the order of operations of same priority inside a container (parentheses) does not change the resulting value of the container.

In the example, there were no parentheses, so no ambiguity (there wouldn’t be any ambiguity with parentheses either, the correct way of calculating would just change), and I don’t think you can add “ambiguity” by adding parentheses — you’re just changing the effective expression to be evaluated.

By the way, this is the reason why I absolutely overuse parentheses in my engineering code. It can be redundant, but at least I am SURE that it is going to follow the order that I wanted.

[–] SmartmanApps@programming.dev 0 points 1 day ago

Oh, but of course the statement changes if you add parentheses

It sure does, but they don't seem to understand that.

[–] AnotherPenguin@programming.dev 1 points 3 weeks ago (1 children)

Another common issue is thinking "parentheses go first" and then beginning by solving the operation beside them (mostly multiplication). The point being that what's inside the parentheses goes first, not what's beside them.

[–] SmartmanApps@programming.dev 0 points 1 day ago* (last edited 1 day ago)

Another common issue is thinking “parentheses go first”

There's no "think" - it's an absolute rule.

then beginning by solving the operation beside them

a(b) isn't an operation - it's a Product. a(b)=(axb) per The Distributive Law.

(mostly multiplication)

NOT Multiplication, a Product/Term.

The point being that what’s inside the parentheses goes first, not what’s beside them

Nope, it's the WHOLE Bracketed Term. a/bxc=ac/b, but a/b( c )=a/(bxc). Inside is only a "rule" in Elementary School, when there isn't ANYTHING next to them (students aren't taught this until High School, in Algebra), and it's not even really a rule then, it's just that there isn't anything ELSE involved in the Brackets step than what is inside (since they're never given anything on the outside).

[–] Zenith@lemm.ee 2 points 3 weeks ago

Yeah and I’m tired of pretending it’s not!

[–] Gsus4@mander.xyz 1 points 3 weeks ago* (last edited 3 weeks ago)

Next they're going to have an epic debate on whether work done by the system is positive or negative and are all going to feel really smart and passionate about it. Like one of those Science vs Religion debate clubs from the 2000s