Solving Linear Equations With Letter Coefficients
Solve equations like ax + b = cx + d by collecting the unknown, factoring it out and stating exactly when you may divide.
Key takeaways
- Decide which letter is the unknown first, then treat every other letter as a fixed but unspecified number.
- Collect the terms with the unknown on one side and factor it out before you divide.
- Dividing by an expression such as a − c requires the condition a ≠ c, and that condition is part of the answer.
- When the multiplier is zero, go back to the equation and check whether it has no solution or every number as a solution.
- Substituting easy numbers for the letters is a fast way to test a letter answer.
To solve a linear equation whose coefficients are letters, do what you would do with numbers: get every term containing the unknown on one side, factor the unknown out, and divide by whatever multiplies it. The one extra duty is to say when that division is allowed, because a letter might secretly be zero.
The answer will be a formula instead of a single number. That formula solves a whole family of equations at once.
Which letter are you solving for?
In 5x + 3 = 18 there is no doubt about the unknown. In ax + b = c there are four letters, and the problem has to tell you which one to find. By convention, letters near the end of the alphabet (x, y, z) are unknowns and letters near the start (a, b, c) are constants, but a clear instruction beats the convention.
The constants are often called parameters. A parameter is a number that stays fixed while you solve one equation but may differ from one equation in the family to another.
Compare the two solutions side by side.
5x + 3 = 18 ax + b = c
5x = 18 − 3 ax = c − b (subtract the constant term)
x = 15/5 = 3 x = (c − b)/a (divide, if a ≠ 0) The moves are identical. With numbers you can simplify 18 − 3 to 15. With letters, c − b stays as it is, and that unfinished look is normal.
When you feel stuck, solve a numeric twin of the equation next to the letter version and copy each step across.
The same recipe, every time
Most letter equations yield to four moves in a fixed order.
- Remove brackets and fractions.
- Move every term containing the unknown to one side and every other term to the other.
- Factor the unknown out, so it appears only once.
- Divide by its multiplier and record the condition that makes the division legal.
The third step is the one that feels new. With numbers, 7x − 3x combines into 4x on its own. With letters, ax − 3x cannot be combined into a single coefficient you can compute, but it can be written as (a − 3)x. That is factoring out a common factor, and it plays the role that combining like terms plays in a numeric problem.
Unknowns on both sides
Take the general equation ax + b = cx + d and solve for x.
ax + b = cx + d
ax − cx = d − b (gather x terms left, constants right)
(a − c)x = d − b (factor out x)
x = (d − b)/(a − c) (divide, given a ≠ c) This one line covers every equation of that shape. For 7x + 2 = 4x + 14, put in a = 7, b = 2, c = 4, d = 14 and get x = 12/3 = 4. Both sides then equal 30.
You might instead gather the x terms on the right. That gives x = (b − d)/(c − a). The two answers look different but are equal, because the numerator and denominator have both changed sign. If your answer disagrees with an answer key only in this way, you are both right.
The condition a ≠ c has a meaning: the two sides must grow at different rates for there to be exactly one value of x where they meet.
A worked example with brackets
Solve a(x − 2) = 3x + b for x.
a(x − 2) = 3x + b
ax − 2a = 3x + b (distribute a)
ax − 3x = 2a + b (gather x terms)
(a − 3)x = 2a + b (factor)
x = (2a + b)/(a − 3) (a ≠ 3) Check it with chosen numbers. Let a = 5 and b = 2. The formula gives x = 12/2 = 6. In the original, the left side is 5(6 − 2) = 20 and the right side is 3·6 + 2 = 20.
Pick test values that are not 0 or 1 where you can, since those often hide errors. Multiplying by 1 or adding 0 can make a wrong formula agree by accident.
Notice also that you may not cancel anything between 2a + b and a − 3. The a in the numerator is part of a sum, and only common factors cancel.
Fractions with letters below the line
Solve x/a + x/b = 1, where a and b are nonzero.
x/a + x/b = 1
bx + ax = ab (multiply every term by ab)
(a + b)x = ab (factor)
x = ab/(a + b) (a + b ≠ 0) With a = 3 and b = 6, x = 18/9 = 2, and indeed 2/3 + 2/6 = 1.
There are two kinds of condition here. The first, a ≠ 0 and b ≠ 0, comes from the original equation, which makes no sense otherwise. The second, a + b ≠ 0, appears during the solving. If b = −a, the line (a + b)x = ab reads 0 = −a². Since a is not zero, that is false, so there is no solution.
Multiplying every term by the common denominator is the same technique as clearing numeric fractions. The term on the right, 1, needs the multiplication too. Forgetting it is the most frequent slip.
When the multiplier is zero
Once you reach (multiplier)·x = (right side), there are only three possibilities.
| Multiplier | Right side | Solutions |
|---|---|---|
| not zero | anything | exactly one |
| zero | not zero | none |
| zero | zero | every number |
Here is an example where all three occur. Solve (k² − 4)x = k − 2.
The multiplier factors as (k − 2)(k + 2), so it is zero when k = 2 or k = −2.
- If k is neither 2 nor −2, then x = (k − 2)/((k − 2)(k + 2)) = 1/(k + 2).
- If k = 2, the equation is 0·x = 0, so every real x works.
- If k = −2, the equation is 0·x = −4, so nothing works.
The tidy formula 1/(k + 2) gives 1/4 when k = 2, and that is a solution, but only one of infinitely many. Cancelling k − 2 quietly assumed it was not zero. This case analysis is sometimes called discussing the equation, and it belongs to the full answer.
Surprising simplifications
Sometimes letters disappear. Solve p(x + q) = q(x + p) for x.
px + pq = qx + pq
px − qx = 0 (subtract qx and pq)
(p − q)x = 0 If p ≠ q, then x = 0, whatever p and q are. If p = q, the original two sides are the same expression and every x works.
A student who divides both sides by p − q without a second thought gets the first case and misses the second. The habit of asking "could this be zero?" is the heart of why dividing by a variable can lose solutions, and it applies just as much to expressions in parameters.
Reading what the answer tells you
A letter solution is more than a final line. It shows how the answer responds when a constant changes, which a single numeric solution cannot do.
Look at x = (c − b)/a, the solution of ax + b = c, with a positive. Raising c raises x, because c sits in the numerator with a plus sign. Raising b lowers x by the same kind of step. Raising a shrinks the size of x, since the same difference c − b is being shared out among more copies of x.
The sign of the answer is readable too. When a is positive, x is positive exactly when c is greater than b. In words, if the left side starts at b and only grows as x increases, you need a positive x to climb up to a larger target.
For x = (d − b)/(a − c), watch the denominator. When the two coefficients a and c are close together, the denominator is small, and unless the numerator is small as well, x is large. Say the constants differ by 6. If the coefficients differ by 2, then x has size 3. If they differ by only 0.01, x has size 600.
This habit of interrogating a formula is a good error check. If common sense says the answer should rise when d rises, and your formula says it falls, look for a sign that flipped.
Checking an answer made of letters
You have three practical checks.
- Substitute numbers for the parameters, compute your x, and test it in the original equation.
- Substitute the formula for x back in symbolically and simplify both sides until they match.
- Test an extreme case you understand. In x/a + x/b = 1 with a = b = 2, the equation says x = 1, and ab/(a + b) = 4/4 agrees.
A units check helps in science formulas. If a and b are times, then ab/(a + b) is time squared over time, which is a time, so x/a is a pure number as it should be.
The same skill appears whenever you rearrange a formula. Look at solving a formula for a different variable for physical examples, and solving for a variable that appears twice for more practice with the factoring step.
Mistakes that are special to letters
The first is leaving the unknown on both sides. An answer such as x = (d − b + cx)/a is a true statement, but x has not been isolated, because you cannot compute the right side without already knowing x. A solved equation has the unknown alone on one side and nowhere on the other.
The second is treating different letters as like terms. The expression 2a + b cannot be written as 2ab or 3ab. Only terms with exactly the same letter part combine.
The third is dividing only part of a side. From ax = c − b, the quotient is (c − b)/a, with the whole difference over a. Writing c − b/a divides b alone.
The fourth is confusing capital and small letters, or letters with subscripts. In science formulas r and R, or v₁ and v₂, usually stand for different quantities. Copy them carefully and never merge them.
Practice with answers
Solve each for x and state the condition.
- mx − n = p
- 4x + a = ax + 10
- (x + c)/d = x, with d ≠ 0
1. x = (p + n)/m, m ≠ 0
2. (4 − a)x = 10 − a → x = (10 − a)/(4 − a), a ≠ 4
3. x + c = dx → c = (d − 1)x → x = c/(d − 1), d ≠ 1 In the second, a = 4 gives 0 = 6, so there is no solution. In the third, d = 1 leaves c = 0·x, which holds for every x if c = 0 and for none otherwise.