In short
PEMDAS — Parentheses, Exponents, Multiplication, Division, Addition, Subtraction — is the order in which the equation was BUILT on top of x. To get back to x, you have to UNDO that build, which means going through PEMDAS backwards. Call it SADMEP: undo Subtraction and Addition first (the outermost layer), then undo Division and Multiplication, then Exponents, and finally Parentheses (the innermost). The reason is the same one that makes you take off your shoes before your socks: the operation that was applied last is wrapped around everything else, so it has to come off first.
When you read a numerical expression like 3 + 4 \times 2^2, your maths teacher trained you to evaluate it in PEMDAS order. Brackets first, then exponents, then multiplication and division, then finally the addition. That gives 3 + 4 \times 4 = 3 + 16 = 19. PEMDAS is the order in which a built expression collapses down to a single number.
But what happens when you flip the situation around? Instead of evaluating an expression that already has a number sitting where x would be, you have an equation — say \frac{2(x+3)}{5} - 7 = 1 — and your job is to find the value of x that makes both sides equal. The right side is already a single number. The left side is a tower of operations that were applied to x. Your job is to dismantle that tower.
And here is the headline: the order in which you dismantle is the exact reverse of the order in which the tower was built. PEMDAS, run backwards, is the recipe for solving.
This article is about that recipe — what order to peel, and why the reverse order is the only one that works.
The build order vs. the peel order
Take the equation \frac{2(x+3)}{5} - 7 = 1.
Imagine you wanted to construct the left side starting from x. What would you do, in what order? Read the operations from the inside out, the same way PEMDAS reads from highest precedence to lowest:
- Start with x.
- Inside the parentheses: add 3 → (x + 3).
- Multiply by 2 (the parenthesised group times 2) → 2(x + 3).
- Divide by 5 → \dfrac{2(x+3)}{5}.
- Subtract 7 → \dfrac{2(x+3)}{5} - 7.
That is the build order. Notice how it tracks PEMDAS: the Parenthesised addition came first (innermost), then the Multiplication and Division, then finally the Subtraction (outermost).
To find x, you reverse the construction. Start from the outermost layer — the subtraction — and peel inwards. This is SADMEP: Subtraction-Addition, Division-Multiplication, Exponents, Parentheses, in that order.
- Undo the subtract 7 → add 7 to both sides. \dfrac{2(x+3)}{5} = 1 + 7 = 8.
- Undo the divide by 5 → multiply both sides by 5. 2(x+3) = 8 \cdot 5 = 40.
- Undo the multiply by 2 → divide both sides by 2. x + 3 = 40 / 2 = 20.
- Undo the add 3 (inside the now-bare parentheses) → subtract 3 from both sides. x = 20 - 3 = 17.
So x = 17. Check: \dfrac{2(17 + 3)}{5} - 7 = \dfrac{2 \cdot 20}{5} - 7 = \dfrac{40}{5} - 7 = 8 - 7 = 1. The right side. Good.
Why reverse order is required: this is a Last-In-First-Out (LIFO) situation. When you built the left side, the very last thing you did was the subtraction of 7. That means the subtraction is sitting on top of everything else — it is wrapped around the whole expression \frac{2(x+3)}{5}. There is no way to reach the inner add-3 without first removing the layers that surround it. Try it: if you tried to "subtract 3 from both sides" first, the left side would become \frac{2(x+3)}{5} - 7 - 3 = \frac{2(x+3)}{5} - 10. The 3 you removed did NOT cancel the inner 3, because the inner 3 is buried under multiplication, division, and subtraction. You have to clear those first. Outermost is "most recently applied," and most recently applied has to come off first — like un-nesting a stack of Russian dolls.
SADMEP — the peel order, visualised
Why "reverse" and not "any old order"
Suppose you tried to be clever with \frac{2(x+3)}{5} - 7 = 1 and decided to "deal with the multiplication by 2 first." What would that even look like? You would want to divide both sides by 2. But the left side is not "2 times something" — it is "(2 times something) divided by 5, minus 7." Dividing the whole left side by 2 gives \frac{(x+3)}{5} - \frac{7}{2}. Yes, that did make the multiplication-by-2 disappear, but it also fractured the constant -7 into -\tfrac{7}{2}. The equation got uglier, not simpler.
The mathematical reason is function composition. Building the left side is composing functions:
applied to x. The composition reads right to left: innermost first. To undo a composition of functions, you compose the inverses in the opposite order:
applied to the right side. Inverses of a composition reverse — that is a theorem you will meet again in calculus (the chain rule, where (f \circ g)' = f'(g(x)) \cdot g'(x) peels the outer derivative first), in linear algebra ((AB)^{-1} = B^{-1}A^{-1}, again reversed), and in any setting where operations can be chained. The peel-in-reverse rule is not a quirk of school algebra. It is a structural fact about composition.
Why this is universal: any time you "do A, then B" to something, undoing requires "undo B, then undo A." Put on socks then shoes — to remove, take off shoes first, then socks. Lock the front gate then the front door — to enter, unlock the door first only if you came in from the inside, but if you came from outside, you unlock the gate first. The general rule: the LAST thing applied is the FIRST thing in your way when you try to walk back. Equations are no different.
Worked examples
$\dfrac{2(x + 3)}{5} - 7 = 1$ — the four-layer headline example
PEMDAS-style build order on x (innermost to outermost):
- Add 3 (inside the parentheses).
- Multiply by 2.
- Divide by 5.
- Subtract 7.
SADMEP-style peel order (outermost to innermost):
Step 1. Undo the subtract 7. Add 7 to both sides.
Why this first: the subtraction sits on the outside of everything. Nothing can be done about the inner stuff while it is still being subtracted from. Peel the wrapper before opening the box.
Step 2. Undo the divide by 5. Multiply both sides by 5.
Why this next: now the outermost operation is the division. Multiplying by 5 cancels it. The parenthesised quantity 2(x+3) is now standing exposed.
Step 3. Undo the multiply by 2. Divide both sides by 2.
Why this next: the multiplication is now the outermost surviving operation. Divide it out. The parentheses become unnecessary because there is no longer anything multiplied with them.
Step 4. Undo the add 3. Subtract 3 from both sides.
Result. x = 17. Check: \frac{2(17+3)}{5} - 7 = \frac{40}{5} - 7 = 1. Correct.
$3(x + 4) = 21$ — divide before subtract
PEMDAS build order: add 4 (inside parentheses), then multiply by 3.
SADMEP peel order: undo multiply by 3 first (outermost), then undo add 4 (inside parentheses).
Step 1. Divide both sides by 3.
Why divide first, not subtract first: the +4 is inside the parentheses, wrapped under the multiplication by 3. If you "subtracted 4 from both sides" right away, the left side would become 3(x+4) - 4, which still has the +4 trapped inside. The 4 you subtracted on the outside did NOT touch the 4 on the inside — they are at different layers. You must clear the multiplication first, which then exposes the +4 for you to subtract.
Step 2. Subtract 4 from both sides.
Result. x = 3. Check: 3(3 + 4) = 3 \cdot 7 = 21. Correct.
The lesson: when there are explicit parentheses with a coefficient outside, divide by the coefficient first, then peel into the parentheses. SADMEP enforces this automatically — D before P — without you having to remember a rule.
$\sqrt{x + 4} = 5$ — square root means you square first
PEMDAS build order: add 4, then take the square root. (Square root is a fractional exponent, x^{1/2}, so it lives at the E level.)
SADMEP peel order: undo the exponent first (outermost), then undo the add 4 (innermost, inside the implicit grouping under the radical).
Step 1. Square both sides to undo the square root.
Why square first: the square root is wrapped around x + 4 — the entire expression sits under the radical. The radical is the outermost operation. Squaring is the inverse of square-rooting, and applying it to both sides removes the radical cleanly. Trying to "subtract 4" first would not work: \sqrt{x+4} - 4 = 1 gives you a more complicated equation, not a simpler one, because the 4 you subtracted is on the outside while the +4 you wanted to cancel is inside the radical.
Step 2. Subtract 4 from both sides.
Result. x = 21. Check: \sqrt{21 + 4} = \sqrt{25} = 5. Correct.
This example shows that E in SADMEP is genuinely earlier than P: the radical (an exponent of 1/2) is undone before whatever is inside the radical. The "implicit parentheses" of the radical sign form the P layer, and they get cracked open last.
When the equation has x on both sides
SADMEP applies to one side at a time. If x appears on both sides of the equation, your first move is to collect all the x-terms onto one side and all the constants onto the other (using the transposition rules). Once you have the equation in the form "(stack of operations on x) = (a number)," then SADMEP takes over and tells you the peel order.
Take 5(x - 1) + 3 = 2x + 12. The right side has its own x, so the SADMEP picture does not yet apply. Subtract 2x from both sides to gather: 5(x - 1) + 3 - 2x = 12. Distribute: 5x - 5 + 3 - 2x = 12, which is 3x - 2 = 12. Now the left side is a clean PEMDAS stack on x — multiply by 3, then subtract 2. Peel: add 2 (3x = 14), then divide by 3 (x = 14/3). The SADMEP rule kicks in only once the equation looks like "function-of-x equals a number."
Where this generalises
The peel-in-reverse principle is everywhere in mathematics:
- Function inverses. If f(x) = g(h(x)) — first apply h, then g — then f^{-1}(y) = h^{-1}(g^{-1}(y)). The inverses chain in the opposite order. SADMEP is just this rule applied to PEMDAS-style expressions.
- The chain rule in calculus. \frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x). You differentiate the outermost function first, then move inward — SADMEP for derivatives.
- Solving trigonometric equations. \sin(2x + 30°) = \tfrac{1}{2}: undo the \sin (outermost) first by \sin^{-1}, then undo the +30°, then divide by 2.
- Solving exponential and logarithmic equations. \log_2(3x - 1) = 4: undo the \log_2 first by raising 2 to the power, then peel the rest in SADMEP order.
The PEMDAS-built-it / SADMEP-peels-it principle is the single most reliable thinking move in equation-solving. Once you internalise it, you stop searching for "the next step" and start seeing the next step the moment you read the equation. The outermost operation tells you what to do; the rest follows automatically.
References
- NCERT Class 7 Mathematics, Chapter 4: Simple Equations — CBSE introduction to balance-method solving.
- NCERT Class 8 Mathematics, Chapter 2: Linear Equations in One Variable — extends the algorithm to brackets.
- Wikipedia: Order of operations — the formal statement of PEMDAS/BODMAS conventions.
- Wikipedia: Inverse function — Compositional inverse — the formal reason inverses compose in reverse order.
- Paul's Online Math Notes: Solving Linear Equations — concise self-study reference.