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 2 + 3 × 4 is interpreted to have the value 2 + (3 × 4) = 14, and not (2 + 3) × 4 = 20. With the introduction of exponents 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 + 5^{2} = 28 and 3 × 5^{2} = 75.

These conventions exist to eliminate 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 to indicate an alternative order of operations (or to simply reinforce the default order of operations). 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.wikipedia

More premium learning materials at Education PH, your reliable partner for learning and success. Sa halagang P499/year, makakadownload ka na ng mga premium learning materials para sa iyong anak o estudyante.