Order of operations
From Why start at x, y, z
There are quite a few mnemonics for the order of operations. A common one in the UK is BODMAS:
- Brackets
- Orders
- Division
- Multiplication
- Addition
- Subtraction
Elsewhere, PEMDAS is popular.
But division and multiplication have equal precedence, and so do addition and subtraction. A common convention is that operations with equal precedence are evaluated from left to right.
This leads to all sorts of misunderstandings.
\( 8 \div 2(1+3) = 16 \) or \( 1 \)