Summary
In mathematics and computer programming, the order of operations (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression. For example, in mathematics and most computer languages, multiplication is granted a higher precedence than addition, and it has been this way since the introduction of modern algebraic notation. Thus, the expression 1 + 2 × 3 is interpreted to have the value 1 + (2 × 3) = 7, and not (1 + 2) × 3 = 9. When exponents were introduced in the 16th and 17th centuries, they were given precedence over both addition and multiplication, and could be placed only as a superscript to the right of their base. Thus 3 + 52 = 28 and 3 × 52 = 75. These conventions exist to avoid notational ambiguity while allowing notation to be as brief as possible. Where it is desired to override the precedence conventions, or even simply to emphasize them, parentheses ( ) can be used. For example, (2 + 3) × 4 = 20 forces addition to precede multiplication, while (3 + 5)2 = 64 forces addition to precede exponentiation. If multiple pairs of parentheses are required in a mathematical expression (such as in the case of nested parentheses), the parentheses may be replaced by brackets or braces to avoid confusion, as in [2 × (3 + 4)] − 5 = 9. Internet memes sometimes present ambiguous expressions that cause disputes and increase web traffic. Most of these ambiguous expressions involve mixed division and multiplication, where there is no general agreement about the order of operations. The order of operations, that is, the order in which the operations in a formula must be performed is used throughout mathematics, science, technology and many computer programming languages. It is expressed here: Parentheses Exponentiation Multiplication and Division Addition and Subtraction This means that to evaluate an expression, one first evaluates any sub-expression inside parentheses, working inside to outside if there is more than one set.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.