The order of operations is a way of evaluating expressions that involve more than one arithmetic operation. These rules tell you how you should simplify or solve an expression or equation in the way that yields the correct output.
For example, when faced with the expression
One option is:
The other option is:
Which one is the correct order of operations?
In order to be able to communicate using mathematical expressions, we must have an agreed-upon order of operations so that each expression is unambiguous. For the above expression, for example, all mathematicians would agree that the correct answer is 10.
The order of operations used throughout mathematics, science, technology, and many computer programming languages is as follows:
- Simplify terms inside parentheses or brackets
- Simplify exponents and roots
- Perform multiplication and division
- Perform addition and subtraction
These rules means that within a mathematical expression, the operation ranking highest on the list should be performed first. Multiplication and division are of equal precedence (tier 3), as are addition and subtraction (tier 4). This means that multiplication and division operations (and similarly addition and subtraction operations) can be performed in the order in which they appear in the expression.
Let's evaluate a few expressions using the order of operations.
Example 1
In this expression, the following operations are taking place: exponentiation, subtraction, multiplication, and addition. Following the order of operations, we simplify the exponent first and then perform the multiplication; next, we perform the subtraction, and then the addition:
Example 2
Here we have an expression that involves subtraction, parentheses, multiplication, addition, and exponentiation. Following the order of operations, we simplify the expression within the parentheses first and then simplify the exponent; next, we perform the subtraction and addition operations in the order in which they appear in the expression:
A Note on Equal Precedence
Since multiplication and division are of equal precedence, it may be helpful to think of dividing by a number as multiplying by the reciprocal of that number. Thus
Similarly, as addition and subtraction are of equal precedence, we can think of subtracting a number as the same as adding the negative of that number. Thus
With this understanding, think of
-
$(1−3)+7=−2+7=5$ -
$(7−3)+1=4+1=5$
The important thing is to keep the negative sign with any negative number (here, the 3).
Mnemonics
In the United States, the acronym PEMDAS is a common mnemonic for remembering the order of operations. It stands for Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction. PEMDAS is often expanded to "Please Excuse My Dear Aunt Sally."
This mnemonic can be misleading, however, because the "MD" implies that multiplication must be performed before division and the "AS" that addition must be performed before subtraction, rather than acknowledging their equal precedence. To illustrate why this is a problem, consider the following:
This expression correctly simplifies to 9. However, if you were to add together 2 and 3 first, to give 5, and then performed the subtraction, you would get 5 as your final answer, which is incorrect. To avoid this mistake, is best to think of this problem as the sum of positive ten, negative three, and positive two.
To avoid this confusion altogether, an alternative way to write the mnemonic is:
P
MD
AS
Or, simply as PEMA, where it is taught that multiplication and division inherently share the same precedence and that addition and subtraction inherently share the same precedence. This mnemonic makes the equivalence of multiplication and division and of addition and subtraction clear.