Order of Operations
Moderators: gmalivuk, Moderators General, Prelates
 Nineteener
 Posts: 20
 Joined: Sat Feb 19, 2011 1:15 am UTC
 Location: Iowa
Order of Operations
Is there any reason why math is done in the order it is aside from some guy saying "Let's do it this way" ages ago?
Who's to say 1+2*3 isn't equal to 9? Why do we assign it to be 7?
Who's to say 1+2*3 isn't equal to 9? Why do we assign it to be 7?
Re: Order of Operations
I don't think so.
These problems only exist in infixed notation, in RPN for example, you'd have 1,2,3*+ = 7 and 1,2,3+* = 9
These problems only exist in infixed notation, in RPN for example, you'd have 1,2,3*+ = 7 and 1,2,3+* = 9
my pronouns are they
Magnanimous wrote:(fuck the macrons)
Re: Order of Operations
I've long wondered what that person's Aunt Sally must have been like. Constantly in need of being excused, and yet dear.

 Posts: 98
 Joined: Sun Dec 14, 2008 4:23 am UTC
Re: Order of Operations
It's probably rooted in trading and similar activities. The order of operations that we use is useful when I'm trying to figure out the total price of 3 apples, 8 carrots, and 4 L of water. I'm not really sure where additionbeforemultiplication would be useful...
Re: Order of Operations
capefeather wrote:It's probably rooted in trading and similar activities. The order of operations that we use is useful when I'm trying to figure out the total price of 3 apples, 8 carrots, and 4 L of water. I'm not really sure where additionbeforemultiplication would be useful...
Really?
I've got six customers and each need two loaves of bread. So six customers times two loaves....
Re: Order of Operations
As above, I don't know where it came from. But I can't imagine having 3 + 2 * 7 being anything else. It just seems.. natural.
Like imagine doing a + b + c. Then imagine you have scaling factors for a, b, c: s1 * a + s2 * b + s3 * c.
What would you define this as in your different order of operations? s1 * (a + s2) * (b + s3) * c? Perhaps something else? It seems
unnatural to do it that way.
Also, if you have some sum with coefficients: [imath]\sum_{n=0}^{N} c_n f(n)[/imath], the normal order of operations just flows naturally.
The way it's done seems to just work nicely. And if you really have to group things in a certain way, that's what we have parenthesis for.
Like imagine doing a + b + c. Then imagine you have scaling factors for a, b, c: s1 * a + s2 * b + s3 * c.
What would you define this as in your different order of operations? s1 * (a + s2) * (b + s3) * c? Perhaps something else? It seems
unnatural to do it that way.
Also, if you have some sum with coefficients: [imath]\sum_{n=0}^{N} c_n f(n)[/imath], the normal order of operations just flows naturally.
The way it's done seems to just work nicely. And if you really have to group things in a certain way, that's what we have parenthesis for.
http://en.wikipedia.org/wiki/DSV_Alvin#Sinking wrote:Researchers found a cheese sandwich which exhibited no visible signs of decomposition, and was in fact eaten.
 gmalivuk
 GNU Terry Pratchett
 Posts: 26820
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Order of Operations
Multiplication is distributive over addition, and not the other way around. Seems that might have something to do with it.
Re: Order of Operations
a*b + c*d + e*f + g*h is just a more usual operation (e.g. multiply a price with the quantity and sum over all products to get the total cost) than (a+b)*(c+d)*(e+f)*(g+h). I really don't know any application where you need the latter one with 2 or more summands everywhere.
>> Multiplication is distributive over addition, and not the other way around. Seems that might have something to do with it.
Well, it just changes the brackets you have to use.
With reverse order:
a * b + c = (a*b)+(a*c)
Edit: Factors of polynomials: Ok, nice example. But I think the notation was already fixed when mathematics looked at them.
>> Multiplication is distributive over addition, and not the other way around. Seems that might have something to do with it.
Well, it just changes the brackets you have to use.
With reverse order:
a * b + c = (a*b)+(a*c)
Edit: Factors of polynomials: Ok, nice example. But I think the notation was already fixed when mathematics looked at them.
Last edited by mfb on Sun Aug 14, 2011 12:12 pm UTC, edited 1 time in total.
 jestingrabbit
 Factoids are just Datas that haven't grown up yet
 Posts: 5967
 Joined: Tue Nov 28, 2006 9:50 pm UTC
 Location: Sydney
Re: Order of Operations
mfb wrote:a*b + c*d + e*f + g*h is just a more usual operation (e.g. multiply a price with the quantity and sum over all products to get the total cost) than (a+b)*(c+d)*(e+f)*(g+h). I really don't know any application where you need the latter one with 2 or more summands everywhere.
What about when you factorise a polynomial?
That said, I think that our current convention makes a little more sense, but I'm not sure why I think that. It might have to do with language. "Three fish and two dogs" is easily translated into 3f + 2d (with f and d being cost or upkeep or space needed or what have you). So, from out language we get our mathematical convention perhaps?
ameretrifle wrote:Magic space feudalism is therefore a viable idea.
Re: Order of Operations
gmalivuk wrote:Multiplication is distributive over addition, and not the other way around. Seems that might have something to do with it.
Yeah, you're not wrong, but… tone much? It feels like you're using your knowledge of math as a blunt weapon to try and make him feel stupid, when really he has a legitimate question which is about what he feels is meaningless convention.
So, in the interest of elaborating on gmal's comment, here goes! (I should preface this by saying I'm not an expert, just a high school grad saying it as I see it. I believe my perspective to be reasonable, but if anyone would like to correct me, I'd rather know now than when I might really make a fool of myself )
From the philosophy that math evolved as a way to explain the natural world  a precursor and tool in the sciences  I think the economic argument someone mentioned earlier is pretty sound. Since we often find ourselves faced with multiple collections of identical objects, each with a distinct "cost" (money, or time, or something less quantifiable like social status or happiness), we save time by choosing this method that uses fewer parentheses in this relatively common problem.
Example: You're buying two oranges, twelve bananas, and seven apples; they cost 69¢, 29¢, and 59¢ respectively. What is the total cost?
PEMDAS equation: 2 * 69 + 12 * 29 + 7 * 59
PESADM equation: (2 * 69) + (12 * 29) + (7 * 59)
So we saved 6 parentheses. It's not much, but it's something.
However, most modern mathematicians favor the philosophy called axiomatic approach, which means (roughly) that though we've built up a theory of numbers that is particularly useful for the purposes of explaining our world, math is really about a system of formal rules, and the consequences of following those rules out to their total extremes. It's often compared to a game: Inside one set of assumptions (rules), you can only do suchandsuch, and soandso is impossible. But if you want to play a different game, you can. Just use different rules!
Under the axiomatic approach, a common rule is this: The real numbers  as a whole set, not the individual numbers  are an object called a field. Look it up if you're interested, but basically it means that on this set we have an operation "like" addition and an operation "like" multiplication. I'll write (a /\ b) for the first and (a \/ b) for the second, just so we don't drag in our preconceived notions about what "+" and "x" can do which might not be true in general. (I'm going to ignore the E part of PEMDAS, that's a bit more complicated and not really what you were asking about anyway)
In a general field, we first build up all the rules about how /\ and \/ work by themselves and then we explain how they work with each other, and the way they work with each other is under the distributive law:
a \/ (b /\ c) = (a \/ b) /\ (a \/ c)
Although this law doesn't say anything directly about an order of operations, it certainly is suggestive: All the \/ stuff is done before you start to look at the /\ side of things. So it implies that \/ has some sort of "dominance" over /\. And in fact, the nature of this dominance is exactly what we expect from an order of operationsstyle list.
Now, there's no "good reason" in this abstract approach that suggests that \/ "should be" multiplication. But if you define it to be multiplication as we know it, you'll find a system that looks remarkably like things which are useful in the real world. If you define it to be addition as we know it, things get a bit confusing, but if you're very, very careful about not making assumptions, you can get something coherent out of the whole thing. I'm not sure you can wrap multiplication as we know it into /\; actually I'm pretty sure that's not possible but I haven't investigated it much. Certainly you have to give ground somewhere  or else you will still have the standard distributive property!
Or, you can go further. You might notice that the fieldyness of the reals has nothing to do with the numbers themselves, just the operations. So if you say "fields be damned!" then you're not getting rid of the set of reals, you're just changing the rules*. Then you could create some different way of combining the two operations. Now, you'd have to make sure that what you created actually made sense, but  and this is important  only in the abstract sense. By that I mean you don't care about whether the "Nineteener Nondistributive Law" makes sense on the reals, just that it makes sense with the way the operations interact with themselves. Once you take care of that, then you can just impose that structure, wordofGod style, onto the reals.
* [I'm aware this is not the most perfect use of this analogy, but it's not too damaging of a simplification, I think]
Now, you may pay a really heavy "structural" price for this mywayorthehighway approach: you might lose inequalities (i.e. it may be that neither 1<2 nor 2<1 makes sense), you might lose the concept of a prime, you might lose Archemedianness (i.e. there may be a real which is greater than every integer: this assumes "greater than" still has any meaning!), you might lose the standard method for long division, you might even lose a good chunk of the numbers themselves. But it can be done, and if the Law is clever enough, you may be able to reverse the roles of + and x. That said, there are some pretty good reasons why people think fields are pretty interesting and so you'd have to convince people that there was something interesting in "Nineteener Pseudofields" if you wanted anyone else to care.
So this is a long way of saying: You can buck tradition, yeah, but you have to be really careful. And not like a "I can't be late to this dentist appointment" careful, more like "Avoiding moving laser tripwires over a minefield" or a "Hostage negotiation while you're one of the hostages" kind of careful
Though I'm not sure exactly what gorcee means, I'm going see if I can't guess. I think he's saying that addbeforemultiply comes up in situations like "I am selling two grapefruits and three apples, and everything I sell costs 45¢ each. What is the price for all my stuff?" That would be an obvious example of fewerparenthees PESADM superiority.
However, I think that the question sentence explains neatly why this should be a nonissue. If we arrange the problem in terms of a set of grapefruits and a set of apples, you have (size+size)*cost. But if you arrange the problem in terms of a set of stuff, you get size*cost. Now, since we're not given the size of the set of stuff, of course we still have to do the same work in the end. However, by looking at the problem in the broadest strokes possible, we remove the need for parentheses entirely. So there may be examples where PESADM is more efficient, but these aren't them.
(Incidentally, painting the problem I presented closer to the beginning in its broad strokes [ ∑(size*cost) ] does not have a similar difficulty, unless you start allowing matrix products, which I'm not since we're not talking about matrices. Interestingly, you might argue it makes PEMDAS less efficient, but not less so than its counterpart.)
Approximately 100% of my forum contribution is in Nomic threads! In fact, if you're reading this signature, you probably knew that because you're reading a Nomic thread! But did you know that I've participated in both Nomic 16.0 AND Nomic 15.0? Woah!
 gmalivuk
 GNU Terry Pratchett
 Posts: 26820
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Order of Operations
What? No, that's not it at all, so I'm sorry if it came across that way.Turiski wrote:Yeah, you're not wrong, but… tone much? It feels like you're using your knowledge of math as a blunt weapon to try and make him feel stupidgmalivuk wrote:Multiplication is distributive over addition, and not the other way around. Seems that might have something to do with it.
I really have no idea, but was just commenting that there is an actual fundamental difference in how addition and multiplication relate to each other, which might be part of why the convention is what it is.
Re: Order of Operations
Turiski wrote: when really he has a legitimate question which is about what he feels is meaningless convention.
In some sense it kinda is just a meaningless convention.... But we need some convention so that we can communicate our thoughts with each other. Whether or not the accepted order of operations is the "best" doesn't really mater. What matters is that everyone that writes and reads math can do so in exactly the same way as everyone else so each person doesn't have to "reinvent the wheel" and resolve the work of others just to understand it, instead they can just read what others have done.
All language (and math is a language) is full of meaningless conventions. We put the verb here and the noun there and make sure to modify the tense and plurality of each item correctly...Until you move down the river to where the same language but a different dialect is spoken... now your doing everything backasswards. They all understand each other so their conventions are "correct" but likewise so are yours.
Spoiler:
The fact that our order of operations has some nice properties is really second to the fact that we all need to have the same conventions or we can't communicate.

 Posts: 11
 Joined: Tue Jul 19, 2011 5:41 pm UTC
 Location: Richmond BC Canada
 Contact:
Re: Order of Operations
I think it is the standard adapted by mathematicians, to avoid confusion. If everybody follow the standard, the answer is 7 for all otherwise it can be 7 or 9, which is confusion without standard. It is same as if I ask why a handful of steel is 1 Kg, why it isn't the whole truck load of steel is 1 Kg.
Who is online
Users browsing this forum: No registered users and 10 guests