PlanetMath (more info)
 Math for the people, by the people.
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Low Entry average rating: No information on entry rating
order of operations (Definition)

The order of operations is a convention that tells us how to evaluate mathematical expressions (these could be purely numerical). The problem arises because expressions consist of operators applied to variables or values (or other expressions) that each demand individual evaluation, yet the order in which these individual evaluations are done leads to different outcomes.

A conventional order of operations solves this. One could technically do without memorizing this convention, but the only alternative is to use parentheses to group every single term of an expression and evaluate the innermost operations first.

For example, in the expression $ a\cdot b + c$, how do we know whether to apply multiplication or addition first? We could interpret even this simple expression two drastically different ways:

  1. Add $ b$ and $ c$,
  2. Multiply the sum from (1) with $ a$.

or

  1. Multiply $ a$ and $ b$,
  2. Add to the product in (1) the value of $ c$.

One can see the different outcomes for the two cases by selecting some different values for $ a$, $ b$, and $ c$. The issue is resolved by convention in order of operations: the correct evaluation would be the second one.

The nearly universal mathematical convention dictates the following order of operations (in order of which operators should be evaluated first):

  1. Factorial.
  2. Exponentiation.
  3. Multiplication.
  4. Division.
  5. Addition.

Any parenthesized expressions are automatically higher “priority” than anything on the above list.

There is also the problem of what order to evaluate repeated operators of the same type, as in:

$\displaystyle a / b / c / d $

The solution in this problem is typically to assume the left-to-right interpretation. For the above, this would lead to the following evaluation:

$\displaystyle (((a/b)/c)/d) $

In other words,

  1. Evaluate $ a / b$.
  2. Evaluate (1)/$ c$.
  3. Evaluate (2)/$ d$.

Note that this isn't a problem for associative operators such as multiplication or addition in the reals. One must still proceed with caution, however, as associativity is a notion bound up with the concept of groups rather than just operators. Hence, context is extremely important.

Exponentiation is an exception to the left-to-right assumption, as it is evaluated right-to-left. That is, $ a$ˆ$ b$ˆ$ c$ is computed as

  1. Evaluate $ b$ˆ$ c$.
  2. Evaluate $ a$ˆ(1).

Of course, this could also have been written as $ a^{b^c}$, and in this form can be thought of as evaluated “highest to lowest”.

For more obscure operations than the ones listed above, parentheses should be used to remove ambiguity. Completely new operations are typically assumed to have the highest priority, but the definition of the operation should be accompanied by some sort of explanation of how it is evaluated in relation to itself. For example, Conway's chained arrow notation explicitly defines what order repeated applications of itself should be evaluated in (it is right-to-left rather than left-to-right)!



"order of operations" is owned by akrowne.
(view preamble)

View style:

Other names:  operator precedence, precedence of operations
Log in to rate this entry.
(view current ratings)

Cross-references: Conway's chained arrow notation, relation, sort, bound, reals, associative, interpretation, solution, type, division, factorial, universal, product, sum, simple, even, addition, multiplication, operations, term, group, outcomes, order, variables, operators, expressions
There are 9 references to this entry.

This is version 4 of order of operations, born on 2003-01-31, modified 2006-12-04.
Object id is 3951, canonical name is OrderOfOperations.
Accessed 14463 times total.

Classification:
AMS MSC00A99 (General :: General and miscellaneous specific topics :: Miscellaneous topics)

Pending Errata and Addenda
None.
[ View all 2 ]
Discussion
Style: Expand: Order:
forum policy
Summation & operator precedence by WizzyWig on 2007-02-17 08:11:18
How does sigma notation affect operator precedence in an expression?

[ reply | up ]
Operators on groups by kidburla2003 on 2003-01-31 14:31:22
"Note that this isn't a problem for associative operators such as multiplication or addition in the reals. One must still proceed with caution, however, as associativity is a notion bound up with the concept of groups rather than just operators. Hence, context is extremely important."

But surely when you are talking about associativity in the context of a group, you are talking about a binary operation being associative ON a group. Hence isnt it just the same thing? You give as an example above, multiplication and addition in the reals, well the reals are a group under addition and multiplication (the fact that they are a field under both is a stronger result than they are a group under either). So the fact that we are talking about sets DOES matter - for example, you could say "the operation of multiplication is not commutative on the set of matrices".
[ reply | up ]

Interact
post | correct | update request | add derivation | add example | add (any)