alt.algebra.help FAQ << Q&A about Math
 

What's the order of operations?

(Copyright © 2000-2001 -- this item revised 4 Dec 2000)
 

Glad you asked!

Mini-TOC: The basic 3 ...  Built-in grouping ...  Grouping symbols ...  Calculators
 

The basic 3

There are only three operations in ordinary algebra:

  1. exponentiation, which is powers and roots. (Taking the nth root of a quantity is the same as taking the (1/n)th power.) For multiple exponents, see below.

  2. multiplication, including division. (Dividing by q is the same as multiplying by 1/q. Negation or "unary minus" can be treated like multiplying by -1.) If you have several multiplications and/or divisions, work from left to right.

  3. addition, including subtraction. (Subtracting s is the same as adding -s.) If you have several additions and/or subtractions, work from left to right.

Unless there is grouping, and within any particular grouping, always follow this order of operations: (1) powers/roots, (2) multiply/divide, (3) add/subtract. Try to think of this as three operations, not six; it will help you in other work.

Example:

        11 - 3^2 * 2^3 / 4 / 2 + 1
        11 -  9  *  8  / 4 / 2 + 1   powers and roots first
        11 -           9       + 1   multiply and divide left to right
        3                            add and subtract left to right

The acronym PEMDAS is sometimes given as a mnemonic, but it is misleading in several respects. Better just to learn the order of operations directly.

Though the basic principle is clear and simple, there are a lot of wrinkles in practical terms, and you need to bear them in mind.


Built-in grouping

The basic order of operations is modified by grouping, which may be indicated by special grouping symbols or by the way the operation is written. However grouping is indicated, you always work from the inside out, applying the basic order 1-2-3 at each level.

Here are some ways that grouping arises from just how an operation is written.


Grouping symbols

The basic order of operations is modified by special grouping symbols, in addition to the ways of writing mentioned above.

The commonly used grouping symbols are

Evaluate the innermost layer of grouping first, by performing the three basic operations in order inside that innermost group. When the inner group is reduced to a single quantity, repeat at the next-level group, which is now innermost. Continue the process, working from the inside out, until you have finished the evaluation.

Most people use parentheses for the innermost group, then square brackets and braces working outward. But which symbols are used doesn't matter: you always work from the inside out.

Example, using (...[...]...) to illustrate that you do innermost first, not necessarily parentheses first:

        ( [4-1]*3 - 6 ) / [5 - 2]
        (     3*3 - 6 ) / [5 - 2]    innermost grouping first
        (       9 - 6 ) / [5 - 2]    no powers/roots, so multiply
                      3 / 3          next layer of grouping
                      1

Calculators

Some calculators observe a different order of operations. Check yours to see whether you must insert extra parentheses in order to get the right answer. Be careful! I'm told some calculators interpret 1/4x and 1/4*x differently.


See also


Contributors (in alphabetical order)


<< What is 2^3^2?  What was that proof that 1 = 2? >>
^^ a.a.h FAQ

Validated HTML 4.0 -- follow link for details.  this page: http://oakroadsystems.com/aah/yorder.htm

comments? Web space courtesy of Oak Road Systems