Linear equation word problems

A farmer counts 3535 heads and 9494 legs among his horses and hens in the yard. How many of each animal does he have? No ruler, no scale — just a sentence describing a real situation, and yet it pins down two exact numbers. That is the quiet power of algebra: any situation that can be described in words, where one unknown quantity relates to known totals or comparisons, can be translated into a linear equation, solved by the ordinary rules of balancing both sides, and then checked against the story itself. This article is about that translation step, because it is usually the hardest part — not the solving. Students who can solve 4x+70−2x=944x+70-2x=94 in seconds still freeze when handed "a farmer has horses and hens," because the equation is hidden inside a sentence. We will build a fixed four-step method for uncovering it, apply it to an age problem and to the horses-and-hens problem, and end with the traps that turn an easy problem into a wrong answer.

The core insight

Translate the unknown and every stated relationship into algebraic expressions in one variable, form the equation ax+b=cax+b=c from the problem's "total" or "is equal to" statement, solve by keeping both sides balanced, and check the solution against the original story, not just the equation.

The core idea

Every word problem that reduces to one linear equation follows the same four moves, in the same order.

1. Identify the unknown. Read the question sentence — usually the last one — and decide exactly what single quantity to call xx. In an ages problem this is normally the younger or more basic person's present age, because everything else ("4 times as old," "in 5 years") is easiest to state relative to it.

2. Translate every phrase. Convert English relationships into algebra: "5 more than the number" becomes x+5x+5; "twice the number" becomes 2x2x; "the age three years ago" becomes x−3x-3; "kk times as much as" becomes kxkx. Precision here matters more than speed — a single misread phrase produces a wrong equation that still "solves" cleanly.

3. Form the equation. Connect the translated expressions using whatever the problem states as equal — a total (heads, legs, cost), a comparison ("mother will be 3 times as old"), or a stated equality. The general shape, after collecting like terms, is a one-variable linear equation:

ax+b=cax + b = c

where: xx is the unknown quantity, aa is the combined coefficient of xx after simplification, bb is the combined constant term, and cc is the value the expression is set equal to.

4. Solve and check. Isolate xx by performing the same inverse operation on both sides — subtract bb, then divide by aa:

x=c−bax = \frac{c-b}{a}

Then substitute this value back into the original word problem's description (not merely into the equation) to confirm every stated condition actually holds. When a phrase like "three times the sum of a number and 4" appears, expand the bracket first using the distributive law a(b+c)=ab+aca(b+c) = ab + ac before collecting like terms; when xx appears on both sides, move all xx-terms to one side and all constants to the other before dividing.

Figure
Four boxes in a row labelled identify unknown, translate phrases, form the equation, solve and check, connected by arrows, illustrating the fixed method for turning a word problem into a linear equation
The four-step method Identify the unknown let it be x Translate every phrase x+5, 2x, x-3 Form the equation ax+b=c Solve and check against the story Step 4 is not finished until you check against the ORIGINAL problem, not the equation alone
Derivation ASolving the general linear word-problem equation ax + b = c

Show that any word problem which reduces to the linear form ax+b=cax+b=c, with a≠0a \ne 0, has exactly one solution x=c−bax = \dfrac{c-b}{a}, and that this solution follows from doing the same operation to both sides at every step, so the equation remains balanced throughout.

Step 1. Start from the equation formed in step 3 of the method: ax+b=cax + b = c. Here aa, bb, cc are the known numbers that came from translating the problem, and xx is the single unknown.

Step 2. Subtract bb from both sides. Because both sides of a true equation must remain equal after the same operation is applied to each, ax+b−b=c−bax + b - b = c - b, which simplifies to ax=c−bax = c - b.

Step 3. Divide both sides by aa (valid since a≠0a \ne 0, which holds whenever the problem genuinely involves the unknown after simplification). This gives axa=c−ba\dfrac{ax}{a} = \dfrac{c-b}{a}, so x=c−bax = \dfrac{c-b}{a}.

Step 4. This is the unique solution, because each step (subtracting bb, dividing by aa) is reversible: adding bb back and multiplying by aa returns exactly ax+b=cax+b=c. No other value of xx can satisfy the equation, since a linear equation in one variable has at most one root. The final, essential move is to substitute this numeric xx back into the word problem's own conditions — heads and legs, present and future ages — to confirm the translation in step 2 was correct, since an arithmetic check of the equation alone cannot catch a wrong translation.

Worked example

Problem (horses and hens). A farmer has horses and hens in his yard. Together they have 3535 heads and 9494 legs. Each animal has exactly 11 head; a horse has 44 legs and a hen has 22 legs. How many horses and how many hens does he have?

Step 1. Identify the unknown: let the number of horses be xx. Since every animal contributes exactly one head and the total is 3535, the number of hens is 35−x35 - x.

Step 2. Translate the leg count. Horses contribute 4x4x legs; hens contribute 2(35−x)2(35-x) legs. The problem states the total is 9494, so:

4x+2(35−x)=944x + 2(35-x) = 94

Step 3. Expand the bracket using the distributive law, then collect like terms:

4x+70−2x=94  ⟹  2x+70=944x + 70 - 2x = 94 \implies 2x + 70 = 94

Step 4. Solve by balancing both sides: subtract 7070 from each side to get 2x=242x = 24, then divide both sides by 22 to get x=12x = 12. So there are 12 horses\mathbf{12\ horses}, and 35−12=23 hens35 - 12 = \mathbf{23\ hens}.

Check. Heads: 12+23=3512 + 23 = 35 ✓. Legs: 12×4+23×2=48+46=9412 \times 4 + 23 \times 2 = 48 + 46 = 94 ✓. Both conditions of the original story hold, confirming the translation in Step 2 was correct — not just that the equation balances.

Competitive stretch

The same method scales up: if a farmer instead had horses, hens, and a fixed number of goats (3 legs is impossible for a real animal, but 4-legged goats work identically to horses), you would introduce a second variable only if a second independent total were given — otherwise, express goats too in terms of the leg and head totals already used, keeping the problem to one unknown wherever the given information allows it.

Common traps

  • Assigning the variable to the wrong quantity. Letting xx be the mother's age when every other clue is more naturally stated in terms of Reena's age doesn't make the problem unsolvable, but it makes the translation far harder to get right without errors.
  • Mixing up time-shift phrases. "5 years ago" means subtracting 5, i.e. x−5x-5; "in 5 years" means adding 5, i.e. x+5x+5. Swapping these is one of the most frequent sources of a wrong equation.
  • Forgetting to expand brackets before collecting like terms. In the horses-and-hens example, 2(35−x)2(35-x) must become 70−2x70 - 2x, not 70−x70 - x — dropping the sign or the multiplication changes the whole answer.
  • Solving the equation but not answering the question. Finding x=12x = 12 (horses) and stopping, without also stating the number of hens (2323) that the problem asked for.

Ask the tutor: Stuck on translating a tricky sentence like "6 years ago, he was twice as old as his brother" into an equation? Ask the AI tutor to walk through your own word problem step by step.

How do I know which quantity to make x when a problem gives several unknowns

Pick the quantity every other quantity is most naturally described in terms of — usually the smallest, simplest, or "base" one. In an ages problem this is often the younger person's present age, since older ages are described as multiples or additions of it. In counting problems (like horses and hens), pick the item whose count directly matches the simpler condition (one head each) so the other item's count follows by subtraction from the total.

Why does the check need to use the original problem and not just the equation

Because a wrong translation can still produce an equation that balances correctly. If you mistakenly wrote 2(35−x)2(35-x) as 2(35+x)2(35+x), the equation you solved would still have a valid numeric solution — it would just not be the answer to the actual farmer's problem. Substituting your numbers back into the story's own conditions (heads add to 35, legs add to 94) catches translation errors that a purely algebraic check of the equation cannot.

What if the variable appears with brackets on both sides of the equation

Expand every bracket first, on both sides, using the distributive law a(b+c)=ab+aca(b+c) = ab+ac, before you try to move terms across the equals sign. Only after every bracket is expanded should you collect all xx-terms onto one side and all constant terms onto the other, then divide by the coefficient of xx. Expanding too early or too late is a common source of sign errors.

Before this

Where this leads