1 Arithmetic operation
The equation that broke the internet
A few years ago, there was an intense debate on several social media platforms about a simple calculation
8 ÷ 2 (2 + 2) = ?
One camp argues that the answer is one, while the other is convinced that it is sixteen. The problem has all the ingredients for a viral online debate: a simple statement that the average person can understand and a formulation that fosters confusion. It also has a binary answer that further divides opinions and illustrates how confidently people assert that they are right on social media.
Yet this is still a simple arithmetic problem that primary-school pupils should be able to solve. So, what is the correct answer? The section below reviews the basic rules of arithmetic, as ecologists and scientist alike should be have more mathematical literacy than the average person on the internet.
Formal
1 The order of operations, that is, the order in which the operations in an expression are usually performed, results from a convention adopted throughout mathematics, science, technology, and many computer programming languages. It is summarized as:
- Parentheses
- Exponentiation
- Multiplication and division
- Addition and subtraction
This means that to evaluate an expression, one first evaluates any sub-expression inside parentheses, working from inside to outside if there is more than one set. Whether inside parentheses or not, the operation that is higher in the above list should be applied first. Operations of the same precedence are conventionally evaluated from left to right.
Parentheses and alternate symbols of grouping can be used to override the usual order of operations or to make the intended order explicit. Grouped symbols can be treated as a single expression
Examples
Exponentiation first, then multiplication, then addition
\(1 + 2 \times 3^4 = 1 + 2 \times 81 = 1 + 162 = 163\)
Always compute the expression within parentheses first \((1 + 2) \times 3^4 \neq 1 + (2 \times 3)^4 \neq (1 + 2 \times 3)^4\)
The length of the division bar used to dictate priority
\(\dfrac{1}{\frac{2}{3}} \neq \dfrac{\frac{1}{2}}{3}\)Uncessary use of parenthesis
\((1 + 1) + 1 = 1 + (1 + 1)\) and \((1 \times 2) \times 3 = 1 \times (2 \times 3),\)
because of addition (and multiplication) is called associative. In case of doubt, it is always recommended to include parenthesisNecessary use parentheses when non-communtative
\(1 - 2 + 3 = (1 - 2) + 3 \neq 1 - (2 + 3)\)
Tips and warning
The solution to the problem above is \(8 \div 2 \, (2 + 2)\):
- First, include the multiplication symbol: \(8 \div 2 \times (2 + 2)\).
- Then, perform the operation within parentheses: \(8 \div 2 \times 4\)
- Operations have equal priority, so proceed from left to right: \(4 \times 4 = 16\).2
The rule of performing exponentiation before multiplication and multiplication before addition should feel natural. Multiplication by definition is a notation for repeated addition: \(2 + 2 + 2 + 2 = 2 \times 4\)3. If the multiplication is unwrapped, then \(2 \times 4 + 3 = 2 + 2 + 2 + 2 + 3\). It should be clear that performing \(4 + 3\) first and then multiplying by 2 makes no sense.
The same applies to powers: \(2^3 = 2 \times 2 \times 2\). Thus, when unwrapped, \(2^3 \times 3 = 2 \times 2 \times 2 \times 3\) and \(2^3 + 3 = 2 \times 2 \times 2 + 3\).
Add parentheses when in doubt, even if unnecessary—this can be important, especially when coding. Also, do not skip calculation steps.
Semantic/Terminology/Notation
Semantics: power vs. exponentiation. They are almost used interchangeably, although exponentiation is the precise mathematical term.
Three notations exist for multiplication: \(a \times b\), \(a \cdot b\), and \(ab\). While the latter makes notation compact, it is also a source of confusion.4
There are also three notations for division: \(a \div b\), \(a / b\), and \(\frac{a}{b}\). The latter can clarify priority and avoid the usage of parentheses. \(\frac{1}{2} \times 3 \neq \frac{1}{2 \times 3}\).5
If unconvinced, imagine calculating \(2 - 2 + 3\); nobody would calculate \(2 + 3\) first.↩︎
With that notation, \(2 \times 4\) and \(4 \times 2\) have different meanings.↩︎
One classic error in coding is forgetting to explicitly add a multiplication symbol (Chapter 37).↩︎
Only one of these symbols represents a division in R Chapter 31↩︎