# Order of operations

The **order of operations** is a notational convention employed in arithmetical expressions to disambiguate the order in which operations should be performed.

It is also referred to PEMDAS, BEDMAS, BODMAS, or other such acronyms depending on where you live. The acronym is always 6 letters, and refers to the following things in order:

parentheses (or Brackets), in order of inside-most parentheses first

Exponents (or Orders or Indices), in order of inside-most (or rightmost) exponents first

multiplication and division, in order from left to right

addition and subtraction, in order from left to right

## Motivation

The infix notation we use to write expressions of mathematical operators is inherently ambiguous. Only in some very special examples where the expression consists of only a single associative operation do all possible orders of evaluation evaluate to the same thing. When considering the expression \(2 - 4 + 3\), do we do the \(2 - 4\) first or the \(4 + 3\) first? The result is either \(1\) or \(-5\) depending on which you choose. When considering the expression \(7 + 8 \times 9 - 6\), which operation do we do first? The result could be anywhere from \(31\) to \(129\) depending on the order you do them in.

Therefore, to relieve mathematicians of placing brackets around every expression, there are some standard, intuitive conventions put in place.

## Example expressions

Consider the expression \(3 + 7 \times 2^{(6 + 8)}\). We do parentheses first: \($3 + 7 \times 2^{14}\)$ Then exponents: \($3 + 7 \times 16384\)$ Then multiplication and division: \($3 + 114688\)$ And finally addition and subtraction: \($114691\)$

## Notable ambiguous cases

The expression \(48 \div 2 (9 + 3)\) is a controversial ambiguity in the order of operations that results from an ambiguity in multiplication by juxtaposition — which is, the convention that numbers next to each other in brackets should be multiplied together. For example, \(2(3+5)\) is equal to \(2 \times (3 + 5)\) or \(16\).

If multiplication by juxtaposition is taken as a *parenthetical* operation due to the parentheses in the operands, then the result is 2:

However, if multiplication by juxtaposition is taken as simply a regular *multiplication* operation, the result is 288:

The second step is different because the 48 and 2 are operated on first, as the left most division or multiplication operation in the expression.

Children:

- Order of rational operations (Math 0)
Our shorthand for all the operations on rationals is very useful, but full of brackets; this is how to get rid of some of the brackets.

Parents:

- Mathematics
Mathematics is the study of numbers and other ideal objects that can be described by axioms.