order of operations
Imagine three people read the expression 2 + 3 × 4 out loud. If one adds first and another multiplies first, they get different answers (20 versus 14). To keep mathematics from being a guessing game, the world agrees on one fixed sequence for evaluating operations. That agreed sequence is the order of operations.
The standard order is: first do anything inside grouping symbols (parentheses, brackets, fraction bars); then evaluate exponents and roots; then multiplication and division, working left to right as equals; and finally addition and subtraction, also left to right. So 2 + 3 × 4 means 2 + 12 = 14, not 5 × 4.
A common trap: multiplication does not always come before division, nor addition before subtraction. They sit at the same level and are done in left-to-right order. For example 8 − 3 + 2 equals (8 − 3) + 2 = 7, not 8 − (3 + 2) = 3. The mnemonic PEMDAS is a memory aid but can mislead you here, so think of it as two tiers, not six steps.
Evaluate 3 + 4 × 2^2 − (5 − 1). Parentheses: 5 − 1 = 4. Exponent: 2^2 = 4. Multiply: 4 × 4 = 16. Then 3 + 16 − 4 = 15.
Work outward from grouping symbols, then exponents, then multiply/divide, then add/subtract.
The order of operations is a convention, not a theorem — it was chosen so that we can write fewer parentheses. When in doubt, add your own parentheses to make the meaning unambiguous; they are always legal.