---
title: "Order of Operations | FiveStudy"
description: "Compile complex expressions in four passes while keeping grouping, exponent scope, and fraction bars under control."
url: https://fivestudy.com/guides/algebra-1-01-02-order-of-operations
---

[Algebra 1](https://fivestudy.com/algebra-1) · Study guide

# Order of Operations

01 02 03 04 05

Chapter 1 · Expression compiler

# 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.

compile one valid step

Syntax changes meaning

## Grouping changes the parse

The same numbers and operations can describe different structures. Grouping tells every reader which structure is intended.

No grouping

**6 + 2 · 5**

Multiplication binds first.

16

Grouped base

**(6 + 2) · 5**

The sum becomes one factor.

40

Compiler pass order

## Resolve high-priority structure first

Swipe through parse ↔

Scope library

## Grouping is more than parentheses

( ) [ ]

### Parentheses or brackets

With nested groups, simplify the innermost pair first.

a + b
────
c

### Fraction bar

The numerator and denominator are separate groups.

√(a + b)

### Radical

The radicand stays grouped beneath the radical symbol.

|a − b|

### Absolute value

Simplify inside before measuring distance from zero.

Exponent scope

## Which base does the power own?

Narrow scope

−3²

base: 3 →\(-(3^2)=-9\)

Grouped scope

(−3)²

base: −3 →\((-3)^2=9\)

Swipe through scope ↔

Shared priority

## Equal-priority operations compile left to right

18 ÷ 3 · 2

1. Division and multiplication tie.
2. The division appears first: \(18\div3=6\).
3. Continue right: \(6\cdot2=12\).

Trace output

## Evaluate \(4[12-(3+2)^2]\)

Change one part per line and preserve everything else. That makes every structural decision visible.

01 4[12 − (3 + 2)²]innermost group

02 4[12 − 5²]power

03 4[12 − 25]bracket

04 4(−13) multiply

05 −52 output

Parallel groups

## Compile numerator and denominator separately

Swipe through fraction ↔

Diagnostics

## Four common parse errors

**Error**

“Do everything from left to right.”

**Grouping and powers must resolve before lower-priority operations.**

**Error**

“Multiplication always comes before division.”

**They share a level; use left-to-right position.**

**Error**

Ignoring a fraction bar or radical as grouping.

**Compile the numerator, denominator, or radicand as its own group.**

**Error**

Changing several unrelated parts at once.

**Rewrite unchanged structure on each new line.**

Unit tests

## 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

Successful output

## Hierarchy decides the level. Position decides the order inside a tie.

✓
