Guides / Equations
Solving literal equations: how to solve a formula for one variable
Short answer
Treat every letter except the one you want as if it were a number. Undo what's been done to your variable in reverse order: addition and subtraction first, then multiplication and division, then powers. When you divide, divide every term on the other side. If the variable appears in two places, move both to one side, factor it out, and divide by what's left: yx − 2x = 3y + 1 becomes x(y − 2) = 3y + 1, so x = 3y + 1y − 2.
Why it works
Every step you'd take with numbers is legal with letters, because the letters are numbers; you just don't know which ones yet. Subtracting 2l from both sides of P = 2l + 2w is the same move as subtracting 6 from both sides of 14 = 6 + 2w. The result, w = P − 2l2, is a formula that works for every P and l at once.
That also gives you a free check. Pick easy numbers that satisfy the original formula, say l = 3, w = 4, P = 14, and put them into your rearranged version. If it doesn't give w = 4, something went wrong.
Example 1: a two-term formula
Solve P = 2l + 2w for w.
- P − 2l = 2wSubtract 2l from both sides. Everything that isn't the w-term moves away.
- P − 2l2 = wDivide both sides by 2. The whole left side is divided, not just the P.
- w = P2 − lOptional: split the fraction. Both forms are correct. Check with l = 3, w = 4, P = 14: (14 − 6)/2 = 4.
Example 2: a fraction and a parenthesis
Solve A = 12h(b1 + b2) for b1.
- 2A = h(b1 + b2)Multiply both sides by 2 to clear the ½. Don't distribute the h yet; the parenthesis is doing you a favor.
- 2Ah = b1 + b2Divide both sides by h.
- b1 = 2Ah − b2Subtract b₂. Check with h = 4, b₁ = 3, b₂ = 5: A = ½ · 4 · 8 = 16, and 32/4 − 5 = 3.
Working from the outside in, the way you'd peel an onion, keeps the number of terms small. The target b1 is inside a parenthesis that's multiplied by h and then by ½; undo the ½, then the h, then the + b2.
Example 3: Celsius to Fahrenheit
Solve C = 59(F − 32) for F.
- 95C = F − 32Multiply both sides by 9/5, the reciprocal of 5/9. This undoes the multiplication first because, on the right, the parenthesis was multiplied last.
- F = 95C + 32Add 32. Check with C = 100: 180 + 32 = 212, and 5/9 of (212 − 32) is 100.
Example 4: the variable on both sides
Solve y = 2x + 1x − 3 for x.
- y(x − 3) = 2x + 1Multiply both sides by the denominator. (This assumes x ≠ 3, which the original already required.)
- yx − 3y = 2x + 1Distribute. Now x shows up in two terms, yx and 2x.
- yx − 2x = 3y + 1Collect: every x-term on the left, everything else on the right. Subtract 2x from both sides and add 3y to both sides.
- x(y − 2) = 3y + 1Factor out x. This is the step the whole problem is about: it turns two x's into one.
- x = 3y + 1y − 2Divide by (y − 2). Check with x = 5: y = 11/2, and (33/2 + 1) ÷ (11/2 − 2) = (35/2) ÷ (7/2) = 5.
This is also how you find an inverse function: the answer, with x and y swapped, is f−1.
Common mistakes, and the exact line they happen on
1. Dividing only one term
Solve P = 2l + 2w for w (Example 1).
- P − 2l = 2wFine so far.
- w = P − lThis is the mistake. Only the 2l got divided by 2. Both terms on the left are being divided, so the P has to be halved too. Check: P = 14, l = 3 gives w = 11, but the rectangle with those sides has width 4.
Write the whole side over 2, P − 2l2, before you simplify anything. If you then split it, each term gets its own denominator.
2. Undoing in the wrong order
Solve C = 59(F − 32) for F (Example 3).
- C + 32 = 59FThis is the mistake. The 32 was added to the left as if it were a separate term, but on the right it's inside a parenthesis that is multiplied by 5/9. You can't add 32 to the left and remove it from inside the parenthesis on the right; those aren't the same amount.
- F = 95(C + 32)Where it ends up. C = 100 gives 9/5 · 132 = 237.6, not 212.
Ask what was done to F last. The 32 was subtracted first, then the result was multiplied by 5/9. Undo the multiplication first (multiply by 9/5), then the subtraction (add 32). Or distribute first, C = 59F − 1609, and then the 32 is no longer hiding inside anything.
3. Stopping with the variable on both sides
Solve y = 2x + 1x − 3 for x (Example 4).
- yx − 3y = 2x + 1Fine so far.
- x = 2x + 1 + 3yyThis is the mistake. It's a true equation, but it isn't solved: there's still an x on the right. "Solve for x" means x alone on one side and no x on the other.
When the variable appears twice, collecting and factoring is not optional. Get every term with x on one side first; if you see x on both sides at the end, go back to that step.
4. Distributing partway
Solve A = 12h(b1 + b2) for b1 (Example 2), starting by distributing.
- A = 12hb1 + 12hb2Legal, if longer than it needs to be.
- 2A = hb1 + 12hb2This is the mistake. Multiplying by 2 has to hit every term. The second ½ survived, so this line isn't equivalent to the one above.
- 2A = hb1 + hb2Every term doubled. From here, subtract hb₂ and divide by h: b₁ = (2A − hb₂)/h, the same answer as Example 2 in a different form.
Practice
Solve V = lwh for h.
Show answer
h = Vlw. Check: l = 3, w = 4, h = 5 gives V = 60, and 60/12 = 5.
Solve y = mx + b for m.
Show answer
m = y − bx. Check: m = 2, x = 4, b = 3 gives y = 11, and (11 − 3)/4 = 2.
Solve S = 2πr2 + 2πrh for h.
Show answer
S − 2πr2 = 2πrh, so h = S − 2πr22πr. Both terms of the numerator are divided by 2πr.
Solve 3x − 2y = 12 for y.
Show answer
−2y = 12 − 3x, so y = 3x − 122 = 32x − 6. Check: x = 6 gives y = 3, and 18 − 6 = 12.
Solve xa + xb = 1 for x.
Show answer
Multiply by ab: bx + ax = ab, so x(a + b) = ab and x = aba + b. Check: a = 2, b = 3 gives x = 6/5, and 6/5 ÷ 2 + 6/5 ÷ 3 = 3/5 + 2/5 = 1.