Reading an expression left-to-right like a sentence is how you get 3 + 4 \times 2^2 = 14 \times 1 = 14 through guesswork and 28 through panic. Neither reading is how a computer, a calculator, or a working mathematician sees the expression. They see a tree. The top of the tree is the last operation to perform. The bottom of the tree is the first. BODMAS is not a priority list you memorise — it is the rule that tells you which operator sits higher and which sits lower. Once you can draw the tree, you never misread an expression again.

Build the tree for 3 + 4 \times 2^2

The operators in this expression are +, \times, and the exponent. Their precedence, from lowest to highest, is + < \times < \;\wedge (where \wedge means "raise to the power").

That means the exponent binds tightest, so it sits at the bottom. \times sits above it. + sits on top. Each internal node has two children — its left and right operands.

Expression tree for three plus four times two squaredA binary tree with four levels. The root node is a plus sign with two children: a leaf node three on the left, and a times node on the right. The times node has two children: a leaf node four on the left, and an exponent caret node on the right. The exponent node has two children: a leaf node two on the left, and a leaf node two on the right. Leaves are drawn as squares; internal operator nodes are drawn as circles. + 3 × 4 ^ 2 2 root: lowest precedence middle: × leaves: operands
The tree for $3 + 4 \times 2^2$. The $+$ sits at the top because it is the *last* thing to compute. The $\times$ is deeper. The exponent $\wedge$ is the deepest operator, sitting just above the two $2$s. Every operand — $3$, $4$, $2$, $2$ — is a leaf.

Read it aloud: "take 3, plus (take 4 times (take 2 to the power 2))." Every pair of parentheses in that sentence is an internal node of the tree.

The collapse: bottom-up evaluation

To evaluate, you do not start at the top. You start at the leaves and work your way up. Each internal node waits until both of its children are numbers, then collapses itself into one number. The tree shrinks, one node at a time.

The interactive below walks through all four collapse stages. Drag the slider to advance. At step 0 you see the full tree. At step 1 the exponent \wedge has eaten its two children and become 4. At step 2 the \times node has eaten 4 and 4 and become 16. At step 3 the + has eaten 3 and 16 and become 19.

Slider controlling four collapse stages of the expression treeA horizontal slider ranging from zero to three. A draggable marker selects the collapse stage. A readout shows the current remaining expression: at stage zero it reads three plus four times two to the power two, at stage one it reads three plus four times four, at stage two it reads three plus sixteen, and at stage three it reads nineteen. A label below each stage names the operator that just collapsed.stage 0stage 1stage 2stage 3startexponent fires× fires+ fires↔ drag stage
Drag the blue marker along the track. The stage counter and the "what fires next" label update live. The tree in your head should collapse one node at a time: exponent first, then multiplication, then addition.

The text rendering of each stage:

stage remaining expression just collapsed
0 3 + 4 \times 2^2 (start)
1 3 + 4 \times 4 2^2 \to 4
2 3 + 16 4 \times 4 \to 16
3 19 3 + 16 \to 19

Each stage is a real arithmetic step your hand could write on paper. There is no invisible algebra. All that changed between stage 0 and stage 3 is that three nodes of the tree collapsed, in order of depth.

Why deepest-first? Because an operator needs its operands to be numbers before it can fire. The deepest operator is the one whose operands are already numbers (leaves). Higher operators have to wait.

Why left-to-right reading fails

If you read 3 + 4 \times 2^2 left-to-right as a sentence, you get

3 + 4 = 7, \; 7 \times 2 = 14, \; 14^2 = 196.

That is not an arithmetic answer — it is the grammar of English applied to a non-English object. The expression is not a sentence. It is a tree, and trees evaluate bottom-up.

The reason BODMAS exists as a convention is precisely to tell you how to build the tree from the written line. The "B" puts brackets at the bottom. The "O" puts powers next. "DM" goes above that. "AS" goes on top. Once the tree is built, the evaluation order is forced — there is nothing to decide.

A more tangled example

Consider 24 \div 4 + 2 \times (5 - 3)^2. Same idea, bigger tree.

Collapse sequence:

  1. 5 - 3 \to 2.
  2. 2^2 \to 4.
  3. 2 \times 4 \to 8 (right branch done) and simultaneously 24 \div 4 \to 6 (left branch done).
  4. 6 + 8 \to 14.

You can run the two branches in either order at step 3 — they are independent. That is another thing the tree view makes obvious: two nodes at the same depth on different branches do not care about each other.

The reflex, in one line

When an expression looks ambiguous, draw the tree — or imagine it. The operator you write last is the operator that fires last. The operator you write deepest is the one that fires first. BODMAS is the manual for building the tree; evaluation is then automatic.

Related: Operations and Properties · Number Systems · Algebraic Expressions · Exponents and Powers