NapkinCalc

Algebra 1A — Equations & Lines

The one move: solving linear equations

Explain-it-like-I'm-5: an equation is a balanced see-saw. The two sides weigh the same. As long as you change both sides identically, it stays balanced — so you can peel operations off the unknown one at a time until it sits alone.

Solve 3x + 5 = 17, peeling from the outside in:

  1. Subtract 5 from both sides → 3x = 12
  2. Divide both sides by 3 → x = 4

The cell does both steps; the check proves it by plugging the answer back in.

xsol=1753x_{sol} = \frac{17 - 5}{3} = 44 undo +5, then ÷3
✓ pass abs(3xsol+517)<109\mathrm{abs}\left(3 \cdot x_{sol} + 5 - 17\right) < 10^{-9} plug it back in: 3·4 + 5 really is 17

Once you trust the move, let NapkinCalc rearrange for you. solve(expression, x) isolates x from expression = 0. (In the app, an equation cell's menu offers "Solve for x" to write this automatically.)

xauto=solve(3xsol+517,xsol)x_{auto} = \mathrm{solve}\left(3 \cdot x_{sol} + 5 - 17, x_{sol}\right) = 44 the engine isolates x — same answer, no hand algebra
✓ pass xauto==4x_{auto} == 4 agrees with the by-hand result

Real-world hook: every "work backwards to the input" problem is a linear equation — splitting a restaurant bill, finding the break-even number of sales, converting a tip-included total back to the pre-tip price.

Try it yourself: solve 5x − 7 = 18.

Show the steps

Add 7 → 5x = 25; divide by 5 → x = 5.

xyou=5x_{you} = 5 ✏️ Your turn: solve 5x − 7 = 18. The check plugs your answer back into the equation — so it never just hands you the number.
✓ pass abs(5xyou718)<109\mathrm{abs}\left(5 \cdot x_{you} - 7 - 18\right) < 10^{-9} green when 5x − 7 really equals 18