Sub topic 1
Why the Same Expression Needs One Answer
Prerequisites
This chapter assumes that you can add, subtract, multiply, and divide whole numbers. You should also know that a fraction represents a numerator divided by a denominator, and that negative integers lie to the left of zero on the number line.
The problem with mixed operations
An expression combines numbers and operations. For example:
2 + 3 × 4If you calculate from left to right, you get:
2 + 3 = 5
5 × 4 = 20If you multiply first, you get:
3 × 4 = 12
2 + 12 = 14Both methods use valid arithmetic steps, but they produce different answers. Without a shared convention, the expression does not have one clear value.
Mathematics solves this problem by assigning an order of operations. The order tells everyone how to group the operations before calculating. For the example above, multiplication has priority over addition, so the value is 14.
A convention, not a property of the symbols
The symbols themselves do not force a reader to calculate in a particular order. The order is a mathematical convention that makes written work consistent.
The standard convention is:
- Evaluate grouping symbols such as parentheses.
- Evaluate exponents.
- Evaluate multiplication and division from left to right.
- Evaluate addition and subtraction from left to right.
A common memory aid is PEMDAS: parentheses, exponents, multiplication, division, addition, subtraction. However, PEMDAS can mislead if it suggests that multiplication always comes before division. They have the same priority. The same is true for addition and subtraction.
| Expression | Correct grouping | Value |
|---|---|---|
| `2 + 3 × 4` | `2 + (3 × 4)` | 14 |
| `(2 + 3) × 4` | `(2 + 3) × 4` | 20 |
Parentheses change the grouping, so they change the value. They are not decoration.
Why this matters for later work
The same issue appears with integers, fractions, and exponents. For example, a negative sign may or may not belong to the base of an exponent. A fraction bar groups its entire numerator and denominator. A calculator or programming language also follows rules, but its notation may differ from handwritten notation.
You should therefore read an expression in two stages:
- Identify which operations belong together.
- Calculate the grouped operations in the agreed order.
Python follows the same basic convention for these operations:
print(2 + 3 * 4) # 14
print((2 + 3) * 4) # 20Use parentheses when you want to make a grouping explicit, especially when an expression could be misread.
Exercise
Why does 2 + 3 × 4 equal 14 rather than 20?
Show answer
Multiplication has priority over addition, so calculate 3 × 4 first: 2 + 12 = 14.