# Why does the order of operations work?

1. Sep 19, 2015

### Cash Fulton

I have had this question bugging me for a while. I know how to use it, but why and how does it work? I heard it was for convention and you do the most complicated to the simplest operations to get the lowest terms but it still confuses me. Can anyone give me a clear and easy to understand explanation.

Thanks.

2. Sep 19, 2015

### Staff: Mentor

That's not really the question to ask. Order of operations is a convention that has been developed to enable people to evaluate complicated expressions. Without an established convention on the order, one person might evaluate 3 + 4 * 5 as 7 * 5 = 35, and another might evaluate this as 3 + 20 = 23.

In this fairly simple expression, the convention is that multiplications are to be performed before additions, so 3 + (4 * 5) = 23 is the agreed-upon answer.

When I was in Jr. High, and was first exposed to this concept, the acronym was MDAS, with a mnemonic of "My dear Aunt Sally." The idea was that multiplications and divisions were to be performed before additions and subtractions. Since then the acronym has be expanded to PEMDAS and possibly another that I don't remember. The acronym stands for Parentheses, Exponents, Multiplies, Divisions, Additions, Subtractions.

For example, $3 + 2^4$ would be evaluated as 3 + 16 = 19, and not as 3 + 2 raised to the 4th power. The exponent operation is higher order than the addition. To force the addition to be done first, parentheses need to be added, as $(3 + 2)^4$, or 625.

3. Sep 19, 2015

### Fancypen

Mark44 has a great reply, but I just wanted to add one thought about the order of operation. Perhaps you've been taught PEMDAS, parenthesis, exponents, etc from left to right (as alluded to above).

I would suggest GEMDAS... G= grouping = parenthesis, brackets, bracers, absolute value, radicals, and fraction bars (also called vinculums). Yes, fraction bars. if you have something like:

3+2/3+7 , it's implied that the top and bottom are grouped together. I tutor middle/school students and sometimes this trips them up.

4. Sep 19, 2015

### Staff: Mentor

If the above were written like this: $\frac{3 + 2}{3 + 7}$, I would agree with you on the grouping. However, when it's written like 3 + 2/3 + 7, most would say this is the same as 3 + (2/3) + 7, with the division being higher priority than the two additions.

5. Sep 19, 2015

### Fancypen

Right again Mark. I keep forgetting the formatting.

6. Sep 19, 2015

### Cash Fulton

but... why does it work?

7. Sep 19, 2015

### DaveC426913

What do you mean? It is a convention for writing the formulae.

We could change the convention to be whatever we want, then we would rearrange the order of the values, so that we get the correct answer.

PEMDAS:
2+2/4*3 gives the answer of 2 1/6.

We could decide that the order is PSADME.
Then, to tell others how to get the right answer we would write it as
2+(2/(4*3)) ,which would still give the correct answer.

8. Sep 19, 2015

### Cash Fulton

But what if you were seeing the cost of whatever like this for example 2x + 4 = 8

Another order of operations wouldn't work for solving x. Damn! why is it so difficult for my mind to comprehend this?

9. Sep 19, 2015

### DaveC426913

It would work if you wrote the formula based on the alternate order of operations.

If we decided to change the convention to PSADME, then we would write it as

(2x)+4 = 8.

Without the parentheses, our new OoO would cause us to do the addition first, followed by the multiplication.

10. Sep 19, 2015

### Cash Fulton

I think you did it with that one Dave. Thank you oh mighty one!

11. Sep 19, 2015

### FactChecker

You can use parentheses to force any specific order of operation that you need. So any time it doesn't work, it is your fault. Parentheses are your friends.

12. Sep 20, 2015

### bhillyard

It might be worth your while investigating post operator notation (sometimes called polish) in which the operator precedes the operands. No brackets are needed at all. (A variant is reverse polish in which the operator follows the operands. Hewlett Packard calculators used to use this). Compilers in computing usually convert mathematical expressions to reverse polish.

13. Sep 20, 2015

### Cash Fulton

Interesting, I'll check it out.

14. Sep 20, 2015

### bhillyard

Sometimes polish notation is called prefix, reverse polish is post fix and traditional is infix.
I.e. the operator is before, after or between the operands.
Incidentally polish in this context is pronounced as in a person from Poland not as in the stuff to make furniture shine.

15. Sep 20, 2015

### Staff: Mentor

And since it refers to Polish, the ethnic group, and not polish, the word is capitalized.