TOPICS
Search

Precedence


Consider the expression 3×7+2^2. This expression has value (3×7)+(2^2)=25 due to what is called operator precedence (or "order of operations"). Precedence of common operators is generally defined so that "higher-level" operations are performed first (i.e., advanced operations "bind more tightly")/ For simple expressions, operations are typically ordered from highest to lowest in the order:

1. Parenthesization,

2. Factorial,

3. Exponentiation,

4. Multiplication and division,

5. Addition and subtraction.

For more complex operations, the order of operations depends on the system.

A number of geographically-varying methods for remembering basic precedence rules exist, e.g., PEMDAS in the United States.


See also

Operation, Parenthesis, PEMDAS

Portions of this entry contributed by Christopher Stover

Portions of this entry contributed by Ed Pegg, Jr. (author's link)

Explore with Wolfram|Alpha

References

Wolfram Research, Inc. "§A.2.7. Operator Input Forms." http://documents.wolfram.com/mathematica/book/section-A.2.7.

Referenced on Wolfram|Alpha

Precedence

Cite this as:

Pegg, Ed Jr.; Stover, Christopher; and Weisstein, Eric W. "Precedence." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Precedence.html

Subject classifications