Order of Operations
From Teach And Discover Wiki
(Back to Pre-Algebra)
In arithmetic and algebra, when a number or expression is both preceded and followed by a binary operation, a rule is required for which operation should be applied first. From the earliest use of mathematical notation, multiplication took precedence over addition, whichever side of a number it appeared on. Thus 3 + 4 × 5 = 5 × 4 + 3 = 23. When exponents were first introduced, in the 16th and 17th centuries, exponents took precedence over both addition and multiplication, and could be placed only as a superscript to the right of their base. Thus 3 + 5 2 = 28 and 3 × 5 2 = 75. To change the order of operations, a vinculum (an overline or underline) was originally used. Today we use parentheses (). Thus, if we want to force addition to precede multiplication, we write (3 + 4) × 5 = 35.
The standard order of operations
The order of operations is expressed in the following chart.
- exponents and roots
- multiplication and division
- addition and subtraction
In the absence of parentheses, horizontal fraction lines, a bar over a radicand, or other symbols of grouping, do all exponents and roots first. Stacked exponents must be done from the top down. After taking all exponents and roots, then do all multiplication and division. Finally, do all addition and subtraction.
It is helpful to treat division as multiplication by the reciprocal and subtraction as addition of the opposite. Thus 3/4 = 3 ÷ 4 = 3 • ¼ and −4 + 3 is the sum of negative four and positive three.
If an expression involves parentheses, then do the arithmetic inside the innermost pair of parentheses first and work outward, or use the distributive law to remove parentheses. Root symbols have a bar (called vinculum) over the radicand which acts as a symbol of grouping:
.
A horizontal fractional line also acts as a symbol of grouping:
.
The order in which the unary operator − (usually read "minus") acts is often problematical. In written or printed mathematics, , but in some applications and programming languages, notably the application Microsoft Office Excel and the programming language bc, unary operators have a higher priority than binary operators, that is, the unary minus (negation) has higher precedence than exponentiation, so in those languages
.
Examples from arithmetic
- 1. Evaluate subexpressions contained within parentheses, starting with the innermost expressions. (Brackets [ ] are used here to indicate what is evaluated next.)
- 2. Evaluate exponential powers; for iterated powers, start from the right:
- 3. Evaluate multiplications and divisions, starting from the left:
- 4. Evaluate additions and subtractions, starting from the left:
Acronyms
In the United States, the acronym PEMDAS (for Parentheses, Exponentiation, Multiplication/Division, Addition/Subtraction) is used, sometimes expressed as the mnemonic "Please Excuse My Dear Aunt Sally" or one of many other variations.
Warning: Multiplication and division are of equal precedence, and addition and subtraction are of equal precedence. Using any of the above rules in the order addition first, subtraction afterward would give the wrong answer to
The correct answer is 9, which is best understood by thinking of the problem as the sum of positive ten, negative three, and positive two.
It is usual, wherever you need to calculate operations of equal precedence to work from left to right. The following rules of thumb are useful:
First: perform any calculations inside parentheses (brackets)
Second: Next perform all multiplication and division, working from left to right
Third: Lastly perform all addition and subtraction, working from left to right
Test:
