Flowchart Method for Solving Equations by Backtracking
Draw how an expression was built, then run the chart backward with inverse operations to solve the equation, with examples and limits.
Key takeaways
- The forward chart records the order in which operations act on the unknown.
- The backward pass replaces each operation with its inverse and visits them from last to first.
- Brackets and fraction bars decide the order of the boxes, so read the expression carefully.
- Operations such as "subtract from 10" are their own inverse and need special care.
- Backtracking needs the unknown to appear once; otherwise simplify or use balance moves.
The flowchart method solves an equation in two passes. First you draw a chain of boxes showing, in order, what happens to the unknown until you reach the other side of the equation. Then you start from that final number and travel backward, applying the inverse of each operation, until you arrive at the unknown.
It is often called backtracking. It makes the reason for "reverse order" visible, and it works well for any equation in which the unknown appears exactly once.
Building the forward chart
Take 3x + 5 = 26. Ask what you would do if someone told you the value of x and asked for 3x + 5. You would multiply by 3, then add 5.
Forward: x → [× 3] → 3x → [+ 5] → 3x + 5 = 26 Each box holds one operation, and each arrow carries the value from one box to the next. Writing the expression above or below each arrow helps you confirm that the chart matches the equation.
The order comes from the usual order of operations. Multiplication happens before addition, so the multiplication box comes first.
Running it backward
Now begin at 26 and reverse the journey. The last box added 5, so subtract 5. The first box multiplied by 3, so divide by 3.
Backward: x = 7 ← [÷ 3] ← 21 ← [− 5] ← 26 So x = 7. Running 7 forward confirms it: 7 × 3 = 21, and 21 + 5 = 26.
Each backward box holds an inverse operation. Addition pairs with subtraction, and multiplication by a nonzero number pairs with division by that number.
Longer chains
The method shines when there are several layers. Solve (2x − 3)/5 + 4 = 7.
Forward, the unknown is multiplied by 2, then 3 is subtracted, then the result is divided by 5, then 4 is added.
x → [× 2] → 2x → [− 3] → 2x − 3 → [÷ 5] → (2x − 3)/5 → [+ 4] → 7 Backward, take each box from the right.
| Step | Inverse applied | Value |
|---|---|---|
| start | none | 7 |
| undo + 4 | subtract 4 | 3 |
| undo ÷ 5 | multiply by 5 | 15 |
| undo − 3 | add 3 | 18 |
| undo × 2 | divide by 2 | 9 |
So x = 9. The check is (18 − 3)/5 + 4 = 3 + 4 = 7.
Written as a solution on paper, the same work reads as four balance steps. The values in the right column are exactly the right sides of the successive equations.
Getting the order right
Small changes in an expression rearrange the boxes. Compare these.
| Expression | Forward chain |
|---|---|
| 4x + 1 | × 4, then + 1 |
| 4(x + 1) | + 1, then × 4 |
| x/4 − 6 | ÷ 4, then − 6 |
| (x − 6)/4 | − 6, then ÷ 4 |
| 2x² + 3 | square, then × 2, then + 3 |
Parentheses force their contents to happen first. A fraction bar groups everything above it, as described in grouping symbols and fraction bars. If you are unsure about a chart, put a test number such as 10 through both the chart and the expression. The results must match.
Reading a story as a chart
Number puzzles are natural flowcharts. Say someone picks a number, triples it, subtracts 4, then halves the result, and ends with 13.
n → [× 3] → [− 4] → [÷ 2] → 13 Run it backward. Undo halving by doubling, which gives 26. Undo subtracting 4 by adding 4, which gives 30. Undo tripling by dividing by 3, which gives 10. The starting number was 10.
The matching equation is (3n − 4)/2 = 13. Seeing the sentence and the equation as the same chain helps you write equations from words.
Here is a money version. Suppose a hypothetical shopper applies a 5 dollar coupon to an item, then pays 8% sales tax on the reduced price, for a total of 48.60 dollars. The chain is subtract 5, then multiply by 1.08. Backward, 48.60 ÷ 1.08 = 45, and 45 + 5 = 50. The original price was 50 dollars. Tax and coupon rules differ from place to place, so treat this only as an arithmetic example.
The order matters. Taxing first and subtracting the coupon afterward would be a different chain with a different answer.
Subtracting from and dividing into
Consider 20 − 4x = 8. Multiplying by 4 comes first. Then the result is subtracted from 20, not the other way round.
x → [× 4] → 4x → [subtract from 20] → 8 To undo "subtract from 20", apply it again. If 20 − u = 8, then u = 20 − 8 = 12. So 4x = 12 and x = 3. This operation is its own inverse.
The same is true of "divide into". In 36/(x + 2) = 4, the chain is add 2, then divide 36 by the result. Undo the second box by computing 36/4 = 9, so x + 2 = 9 and x = 7. This works because the output, 4, is not zero. If the right side were 0, there would be no solution, since 36 divided by any number is never 0.
Writing these boxes in words prevents the common error of adding 20 when you meant to subtract the output from it.
Roots and powers
Backtracking extends beyond linear equations, with care. In √(x + 4) = 6, the chain is add 4, then take the principal square root. Squaring undoes the root, giving 36, and subtracting 4 gives x = 32. Check: √36 = 6.
If the output were −6, there would be no solution, because a principal square root cannot be negative. The backward pass alone would not warn you, so test the result forward.
For squares, the backward path forks. In (x − 1)² = 25, undoing the square gives 5 or −5. Adding 1 gives x = 6 or x = −4. A box that sends two different inputs to the same output cannot be reversed to a single value.
Where backtracking stops
The method needs a single path from the unknown to a number. In 5x − 2 = 3x + 8, the letter appears on both sides, so no chain starts at x and ends at a plain number.
You can often rearrange first. Subtract 3x from both sides to get 2x − 2 = 8. Now the unknown appears once, and backtracking gives (8 + 2)/2 = 5. This combines the balance approach of variables on both sides with the flowchart.
Similarly, 3x + 2x = 40 has two copies of x, but combining them into 5x = 40 restores a single box.
Using the method on formulas
Backtracking also rearranges formulas. To make C the subject of F = (9/5)C + 32, the temperature conversion formula, draw the chain: multiply by 9/5, then add 32, ending at F. Reverse it: subtract 32, then multiply by 5/9.
So C = (5/9)(F − 32). Testing with F = 212 gives C = (5/9)(180) = 100, which matches the boiling point of water on both scales at standard atmospheric pressure. More on this appears in solving a formula for a different variable.
Fractions and negative numbers in the boxes
Nothing changes when a box holds a fraction or a negative number. In (2/3)x − 5 = 3, the forward chain is multiply by 2/3, then subtract 5.
Backward, add 5 to the output to get 8, then undo multiplying by 2/3. You can divide by 2/3, which is the same as multiplying by 3/2, and the result is x = 12. Running forward, two thirds of 12 is 8, and 8 minus 5 is 3.
With a negative multiplier, as in −4x + 1 = 21, the chain is multiply by −4, then add 1. Backward, 21 − 1 = 20 and 20 ÷ (−4) = −5. The inverse box keeps the sign of the number: you divide by −4, not by 4.
Moving from boxes to lines
Once the idea is comfortable, you can drop the drawing and write balance steps. Each backward box becomes one operation applied to both sides.
(2x − 3)/5 + 4 = 7
(2x − 3)/5 = 3 (subtract 4)
2x − 3 = 15 (multiply by 5)
2x = 18 (add 3)
x = 9 (divide by 2) Keeping the chart in mind answers the question beginners ask most: what should I do first? Undo whatever was done last.
Troubleshooting a chart
When the answer fails its check, the fault is usually in one of a few places.
- Boxes in the wrong order. Test the forward chart with 10 and compare it with the expression. For 4(x + 1), both should give 44.
- An inverse that is not an inverse. The opposite of "multiply by 4" is "divide by 4", not "subtract 4".
- A skipped box. Count the operations in the expression and the boxes in the chart. They should match.
- A reversed subtraction. "Subtract x from 9" and "subtract 9 from x" are different boxes.
- A rounded middle value. Carry fractions exactly until the end.
A useful habit is to write the forward value above each arrow while going backward. In the chart for 3x + 5 = 26, the middle arrow carries 3x, so the number 21 placed there states that 3x = 21. Every number you write on an arrow is a small equation of its own, and each can be checked separately.
Practice charts with answers
Draw the forward chain for each, then run it backward.
- 6x − 7 = 35
- (x + 9)/2 = 11
- 3(x/4 + 1) = 15
- 50 − 2x = 18
1. × 6, − 7. Backward: 35 + 7 = 42, 42 ÷ 6 = 7
2. + 9, ÷ 2. Backward: 11 × 2 = 22, 22 − 9 = 13
3. ÷ 4, + 1, × 3. Backward: 15 ÷ 3 = 5, 5 − 1 = 4, 4 × 4 = 16
4. × 2, from 50. Backward: 50 − 18 = 32, 32 ÷ 2 = 16 Check the third one forward: 16 divided by 4 is 4, adding 1 gives 5, and three times 5 is 15.
Common questions
Is backtracking different from balancing?
They produce the same steps. Backtracking explains which inverse to use and in what order. Balancing explains why applying it to both sides keeps the equation true, and it also handles equations with the unknown on both sides.
What if the answer is not a whole number?
Backtrack exactly with fractions. In 6x + 1 = 5, subtracting 1 gives 4, and dividing by 6 gives 2/3.
How can I practice?
Start with a number, apply three operations of your choice and hand the chart and final value to a partner. Then check that running it backward recovers your starting number.