Sub topic 6
Grouping Symbols Come First
Prerequisites
Assume you can add, subtract, multiply, and divide integers. You should also know that an exponent tells how many times a number is used as a factor. For example, \(3^2 = 3 \times 3\).
Grouping symbols tell you which parts of an expression belong together. Common grouping symbols include parentheses ( ), brackets [ ], and braces { }. They make one part of an expression act like a single unit.
Why grouping matters
Without grouping, the usual order of operations applies. Multiplication is performed before addition:
print(2 + 3 * 4) # 14The multiplication happens first, giving \(2 + 12 = 14\).
Parentheses override that order:
print((2 + 3) * 4) # 20The expression inside the parentheses is evaluated first. The result is \(5 \times 4 = 20\).
A useful model is to replace each completed group with its value:
| Expression | First group | Result |
|---|---|---|
| `(2 + 3) * 4` | `2 + 3 = 5` | `5 * 4 = 20` |
| `18 / (3 + 3)` | `3 + 3 = 6` | `18 / 6 = 3` |
| `(10 - 4) ** 2` | `10 - 4 = 6` | `6 ** 2 = 36` |
Nested grouping
A group can contain another group. Evaluate the innermost group first, then move outward.
Consider:
\[ 2\left[3 + (4 - 1)\right] \]
First evaluate (4 - 1):
\[ 2[3 + 3] \]
Then evaluate the brackets:
\[ 2 \times 6 = 12 \]
Different symbols often make the levels easier to read, but parentheses, brackets, and braces all perform the same basic job.
value = 2 * (3 + (4 - 1))
print(value) # 12A grouping symbol must have a matching partner. An unmatched parenthesis makes the expression incomplete or changes how it is interpreted.
Grouping and exponents
Grouping also determines the base of an exponent. Compare these expressions:
\[ 2 \times 3^2 = 2 \times 9 = 18 \]
and
\[ (2 \times 3)^2 = 6^2 = 36 \]
The exponent applies only to \(3\) in the first expression. In the second expression, the parentheses make \(2 \times 3\) the base.
Common errors
- Multiplying before completing a parenthesized sum, as in treating
(2 + 3) * 4like2 + 3 * 4. - Evaluating an outer group before an inner group.
- Forgetting that an exponent outside parentheses applies to the entire group.
- Removing parentheses without checking whether the operation order changes.
Exercise
Evaluate 5 * [2 + (8 - 3)].
Show answer
Evaluate the inner group first: 8 - 3 = 5. Then the brackets give 2 + 5 = 7. Finally, 5 * 7 = 35.