1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Why does the order of operations work?

  1. Sep 19, 2015 #1
    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.

  2. jcsd
  3. Sep 19, 2015 #2


    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.
  4. Sep 19, 2015 #3
    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.
  5. Sep 19, 2015 #4


    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.
  6. Sep 19, 2015 #5
    Right again Mark. I keep forgetting the formatting.
  7. Sep 19, 2015 #6
    but... why does it work?
  8. Sep 19, 2015 #7


    User Avatar
    Gold Member

    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.

    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.
  9. Sep 19, 2015 #8
    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?
  10. Sep 19, 2015 #9


    User Avatar
    Gold Member

    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.
  11. Sep 19, 2015 #10
    I think you did it with that one Dave. Thank you oh mighty one!
  12. Sep 19, 2015 #11


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    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.
  13. Sep 20, 2015 #12
    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.
  14. Sep 20, 2015 #13
    Interesting, I'll check it out.
  15. Sep 20, 2015 #14
    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.
  16. Sep 20, 2015 #15


    Staff: Mentor

    And since it refers to Polish, the ethnic group, and not polish, the word is capitalized.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook