  ## Encyclopedia > Order of operations

Article Content

# Order of operations

In arithmetic and elementary algebra, certain rules are used for the order in which the operations in algebraic expressions are to be evaluated. These precedence rules (which are mere notational conventions, not mathematical facts) are also used in many programming languages and by most modern calculators. In computing the standard algebraic notation is known as infix notation. This article assumes the reader is familiar with addition, division, exponential powers, multiplication, and subtraction.

The standard order of operations: Because of the order Parentheses, Powers, Multiplication/Division, Addition/Subtraction, the mnemonic "Please Punch My Dear Aunt Sally" is sometimes used as an aid in learning this sequence.

• 1. Evaluate subexpressions contained within brackets, bars, or parentheses, starting with the innermost expressions.
• [itex](4+[10/2])/9=[4+5]/9=1[/itex]

• 2. Evaluate powers; for iterated powers, start from the right:
• [itex]2^{[3^2]}=[2^9]=512[/itex]

• 3. Evaluate multiplications and divisions, starting from the left:
• [itex][8/2]*3=[4*3]=12[/itex]

• 4. Evaluate additions and subtractions, starting from the left:
• [itex][7-2]-4+1=[5-4]+1=[1+1]=2[/itex]

The expression: [itex]2+3*4[/itex] is evaluated to 14, and not 20, because multiplication precedes addition. If the intention is to perform the addition first, parentheses must be used: [itex](2+3)*4=20[/itex]

### Example

• Given:
• [itex]3-(5-(7+1))^2*(-5)+2[/itex]

• Evaluate the innermost subexpression (7 + 1):
• [itex]3-(5-8)^2*(-5)+2[/itex]

• Evalaute the subexpression within the remaining parenthesis (5 - 8):
• [itex]3-(-3)^2*(-5)+2[/itex]

• Evaluate the power of (-3)2:
• [itex]3-9*(-5)+2[/itex]

• Evaluate the multiplication 9*(-5):
• [itex]3-(-45)+2[/itex]

• Evaluate the subtraction 3-(-45):
• [itex]48+2[/itex]

• [itex]48+2=50[/itex]

All Wikipedia text is available under the terms of the GNU Free Documentation License

Search Encyclopedia
 Search over one million articles, find something about almost anything!

Featured Article
 Michael Barrymore ... Barrymore Michael Barrymore, born 4 May 1952, is a British comedian famous for his variety shows. This article is a stub. You can help Wikipedia by fixing ...  