In mathematics, operations refer to actions like addition, subtraction, multiplication, division, and exponentiation. The same expression can produce different results depending on the order in which these operations are performed. The order of operations is a set of conventions that specifies a single, unambiguous evaluation order, ensuring that every mathematician and every calculator reads an expression the same way.
Quick Reference: The Rules
Priority Operation Notes
- Parentheses (brackets) Innermost first
- Exponentiation Right to left for stacked powers
- Multiplication and Division Left to right, equal priority
- Addition and Subtraction Left to right, equal priority
The Four Rules (PEMDAS)
The order of operations is captured by the mnemonic PEMDAS:
PEMDAS:
- Parentheses
- Exponents
- Multiplication & Division
- Addition & Subtraction
A common memory phrase is "Please Excuse My Dear Aunt Sally." The four levels, in order of priority, are explained below.
Rule 1: Parentheses
Evaluate all expressions inside grouping symbols first, starting with the innermost group and working outward. Grouping symbols are the override mechanism: they always take priority, regardless of any other rule.
The P in PEMDAS stands for parentheses ( ), but the same rule applies to all three types of grouping symbol:
Symbol
Name
Typical use
( )
Parentheses
Primary grouping
[ ]
Brackets (square brackets)
Grouping inside parentheses to improve readability
{ }
Curly braces (braces)
Outermost grouping when brackets are already in use
When expressions are nested, the convention in textbooks and handwriting is to alternate symbols from inside out (parentheses innermost, then brackets, then curly braces) so that the eye can easily match each opening symbol to its closing partner:
Mathematically all three symbols mean exactly the same thing: evaluate the enclosed expression first. The alternation is a readability convention, not a rule that changes priority.
A basic example without nesting:
Rule 2: Exponentiation
Apply exponents (powers and roots) before multiplication, division, addition, or subtraction.
Rule 3: Multiplication and Division (left to right)
Multiplication and division have equal priority and are evaluated strictly left to right.
Rule 4: Addition and Subtraction (left to right)
Addition and subtraction have equal priority and are evaluated strictly left to right.
Why This Order? The Motivation Behind the Rules
The order of operations is a convention, not a mathematical law, but it is a well-motivated one. Each level of priority reflects how algebraic notation naturally groups quantities.
Why multiplication before addition? In algebra, writing
Why exponentiation before multiplication? Similarly,
Why left to right for equal-priority operations? This is a pure convention, consistent with the left-to-right direction of written language. It resolves ambiguity when two operations of equal strength appear in sequence.
Historical note. The rules were progressively formalized through the 16th–19th centuries as algebraic notation developed. The convention that multiplication precedes addition was implicit in Leibniz and Euler's notation. The explicit term "order of operations" and the classroom mnemonics (PEMDAS, BODMAS) were largely codified by textbook authors in the late 19th century, as mass-printed mathematics textbooks became widespread.
Worked Examples
Example 1. Evaluate
Multiplication before addition:
Example 2. Evaluate
Division and multiplication left to right:
Example 3. Evaluate
Parentheses → exponent → multiplication → addition/subtraction left to right:
Example 4. Evaluate
The fraction bar acts as an implicit parenthesis around the numerator and denominator:
Why Mnemonics Can Mislead
Mnemonic acronyms are useful memory aids, but they obscure two critical facts that are not spelled out by the letters themselves.
Pitfall 1: M and D are equal, not sequential. Because "M" appears before "D" in PEMDAS, many students conclude that multiplication is always performed before division. This is wrong. Multiplication and division share the same priority level and are evaluated left to right. Applying multiplication first gives incorrect results:
Pitfall 2: A and S are equal, not sequential. Similarly, "A" before "S" does not mean addition is always done first. Addition and subtraction share equal priority and run left to right:
Understanding the two-tier structure (multiplication and division together at level 3; addition and subtraction together at level 4) matters far more than remembering the letters.
Special Cases and Exceptions
Stacked Exponentiation (right to left)
When exponents are written as a tower (stacked superscripts), the convention is to evaluate from the top down, that is, right to left:
This convention is both standard and natural: evaluating left to right would give
Implied Multiplication (Juxtaposition)
When multiplication is indicated by placing two quantities side by side, without any multiplication symbol, it is called implied multiplication or multiplication by juxtaposition. In academic and scientific writing, juxtaposition is conventionally given higher priority than explicit multiplication or division, because the two factors form a visual unit.
Under this convention,
This convention is not universal, however, and is a common source of confusion:
- Many scientific calculators (TI-83, most HP models) treat
as , giving priority to left-to-right division. - The TI-82 and some others do give juxtaposition higher priority.
- Google and Wolfram Alpha follow strict left-to-right PEMDAS with no special treatment for juxtaposition.
Because of this disagreement, expressions like
Unary Minus
The minus sign can be either binary (between two numbers, meaning subtraction) or unary (in front of one number, meaning negation). The unary minus is generally treated as having lower priority than exponentiation, so:
When negating the base is intended, explicit parentheses are required.
Ambiguous Expressions: The Viral Math Problem
In 2019, the expression
- Answer 16: Treat
as , then apply left-to-right PEMDAS: . - Answer 1: Treat
as an implied-multiplication unit with higher priority: .
Both answers follow a consistent rule; they just follow different rules. The expression is genuinely ambiguous, and the disagreement it caused illustrates why professional mathematicians and scientists avoid this style of writing entirely. The American Mathematical Society commented that the problem is "ambiguous as written."
The correct takeaway is not which answer is right, but that a well-written expression leaves no room for ambiguity. The two unambiguous ways to write this problem are:
International Variants
PEMDAS is the standard mnemonic in the United States. Other English-speaking countries use different acronyms for the same rules:
Acronym Stands for Used in BODMAS Brackets, Order, Division/Multiplication, Addition/Subtraction UK, India, Australia BEDMAS Brackets, Exponents, Division/Multiplication, Addition/Subtraction Canada, New Zealand BIDMAS Brackets, Indices, Division/Multiplication, Addition/Subtraction UK (alternative)
Despite the different names, the mathematical rules are identical. The differences are purely linguistic (parentheses vs. brackets, exponents vs. orders vs. indices), reflecting regional English vocabulary rather than different mathematics.
Frequently Asked Questions