Order of operations
An expression has grammar. Grouping defines scope, powers bind to a base, and equal-priority operations are compiled from left to right.
Grouping changes the parse
The same numbers and operations can describe different structures. Grouping tells every reader which structure is intended.
Multiplication binds first.
16The sum becomes one factor.
40Resolve high-priority structure first
Grouping is more than parentheses
Parentheses or brackets
With nested groups, simplify the innermost pair first.
────
c
Fraction bar
The numerator and denominator are separate groups.
Radical
The radicand stays grouped beneath the radical symbol.
Absolute value
Simplify inside before measuring distance from zero.
Which base does the power own?
Equal-priority operations compile left to right
- Division and multiplication tie.
- The division appears first: \(18\div3=6\).
- Continue right: \(6\cdot2=12\).
Evaluate \(4[12-(3+2)^2]\)
Change one part per line and preserve everything else. That makes every structural decision visible.
Compile numerator and denominator separately
Four common parse errors
“Do everything from left to right.”
Grouping and powers must resolve before lower-priority operations.“Multiplication always comes before division.”
They share a level; use left-to-right position.Ignoring a fraction bar or radical as grouping.
Compile the numerator, denominator, or radicand as its own group.Changing several unrelated parts at once.
Rewrite unchanged structure on each new line.Verify the compiler
Evaluate \(4+3^2\).
Expected output
13
Evaluate \((4+3)^2\).
Expected output
49
Evaluate \(\frac{18-6}{2+4}\).
Expected output
2