7.6 Operation Precedence
Operation Precedence defines the order in which mathematical operations are performed, ensuring clarity and consistency in expressions.
Operation Precedence is the fixed hierarchy of rules that determines the order in which the operations within a numerical expression must be carried out, ensuring that any correctly written expression evaluates to exactly one result regardless of who evaluates it.
Why a Fixed Order Is Needed
Purpose of a Common Evaluation Order
Without an agreed evaluation order, an expression containing more than one type of operation could be evaluated in different sequences and produce different results depending on which operation is performed first. A shared precedence order guarantees that every person and every computational tool arrives at the same single value for the same expression.
The Precedence Hierarchy
Grouping Symbol Priority
Expressions enclosed in grouping symbols, such as parentheses or brackets, are evaluated first, before any operation outside those symbols is applied. Grouping symbols override the natural precedence of the operations they contain relative to what surrounds them, forcing an enclosed sub-expression to be resolved into a single value before it participates in the larger expression.
Exponent and Root Priority
After grouping symbols are resolved, exponents and roots are evaluated next, before multiplication, division, addition, or subtraction are applied. This reflects that exponentiation and its inverse, root extraction, are considered a higher-level operation than the operations that follow them in the hierarchy.
Multiplication and Division Priority
Multiplication and division are evaluated next, after exponents and roots but before addition and subtraction, and the two operations share equal priority with each other rather than one taking precedence over the other.
Addition and Subtraction Priority
Addition and subtraction are evaluated last among the four basic arithmetic operations, after all grouping symbols, exponents, roots, multiplications, and divisions have been resolved, and the two operations share equal priority with each other.
Resolving Equal Precedence and Nesting
Equal-Precedence Left-to-Right Evaluation
When two operations of equal precedence appear next to each other, such as a division followed by a multiplication, or a subtraction followed by an addition, they are evaluated strictly from left to right in the order they appear, rather than in any other order.
Nested Grouping Evaluation
When grouping symbols are nested inside one another, the entire nested structure is still resolved before anything outside the outermost grouping symbol, with the evaluation proceeding according to the innermost-first rule described next.
Innermost Group Evaluation
When multiple layers of grouping symbols are nested, the innermost group is evaluated first, reducing it to a single value, after which the next surrounding layer is evaluated, continuing outward until all grouping symbols have been resolved.
Implicit Grouping Structures
Fraction Bar Grouping
A fraction bar acts as an implicit grouping symbol, meaning that the entire numerator and the entire denominator must each be fully evaluated as separate sub-expressions before the division represented by the bar is carried out.
Radical Bar Grouping
The horizontal bar extending over a radicand acts as an implicit grouping symbol as well, requiring that everything beneath the bar be fully evaluated as a single sub-expression before the root is taken of the resulting value.
Special Cases During Evaluation
Exponent Scope during Evaluation
When applying the exponent step of the hierarchy, only the base directly attached to the exponent is affected; determining exactly what counts as the base, particularly when a negative sign or a grouped expression precedes the exponent, must be settled before the exponent step is carried out.
Unary Negative Sign during Evaluation
A negative sign used to indicate the sign of a single number, rather than a subtraction between two numbers, is applied after any exponentiation that binds more tightly to the number it precedes, so that its placement relative to grouping symbols determines whether it is included in the base of a power or applied afterward to the evaluated result.