# Order of operations

1. Jan 30, 2005

### C0nfused

Hi everybody,
I want to ask some things about the order of operation. Of course I have heard and used PEMDAS! First of all i want to make this clear: we say that first we should calculate the parentheses: in order to do so we also use PEMDAS in each parenthesis to calculate it's value? I am almost sure about the answer but just want to confirm it. And the most important thing: how was the "right" order of operations decided? Is it just a convention that always gives right results in connection with the axioms that we have set for addition and multiplication? Can it be proved?
Thank you

2. Jan 30, 2005

### dextercioby

Yes,it's a direct result of the axioms.Distributivity of the multiplication towards addition is very important...Defining the division as the multiplication with the inverse,too...Defining subtraction as the addition with the oppose,too...

Daniel.

3. Jan 30, 2005

### C0nfused

Thanks for your answer. One thing that i think was not cleared: have we defined that parentheses should be calculated before anything else and that in order to calculate them ,we treat them as separate arithmetical expressions and we apply the "right"order of operations inside them too(and if they also contain parentheses we continue doing the same thing)? (Is this right? i think it is)

4. Jan 30, 2005

### HallsofIvy

Staff Emeritus
Also know as "Please Excuse My Dear Aunt Sarah".
Do what ever is in (P)arentheses first (and,as was the point of this question apply "PEDMAS" inside those parentheses), the evaluate exponentials, then multiplications, then divisions. After those, evaluate addition, then subtraction.

Actually, after the parentheses, these group into two simple blocks. It really doesn't matter in which order you evaluate exponentials, multiplications, and divisions and it really doesn't matter in which order you do the additions and subtractions: as long as you do ALL of the first group before ANY of the second group. Of course, that doesn't give a cute acronym.

5. Jan 31, 2005

### C0nfused

6. Jan 31, 2005

### Hurkyl

Staff Emeritus
Exponentials do have to go first:

2^(3*4) is certainly different than (2^3)*4...

And you have to remember that most of the operations are left associative, meaning you're supposed to do them from left to right. It matters, for example, with:

1/2*3, because this means (1/2)*3, and that's different than 1/(2*3).

Similarly for subtraction:

1-2-3 means (1-2)-3 which is different than 1-(2-3)

A gotcha is that exponents are right associative: 3^4^5 means 3^(4^5), not (3^4)^5.

7. Jan 31, 2005

### Hurkyl

Staff Emeritus
Exponentials do have to go first:

2^(3*4) is certainly different than (2^3)*4...

And you have to remember that most of the operations are left associative, meaning you're supposed to do them from left to right. It matters, for example, with:

1/2*3, because this means (1/2)*3, and that's different than 1/(2*3).

Similarly for subtraction:

1-2-3 means (1-2)-3 which is different than 1-(2-3)

A gotcha is that exponents are right associative: 3^4^5 means 3^(4^5), not (3^4)^5.