Sub topic 6
Checking your answer by substitution
This chapter assumes you can solve one-step and two-step linear equations and evaluate expressions using the order of operations. It also assumes you know that a solution is a value of the variable that makes the equation true. Here you will learn to confirm an answer, to locate the mistake when a check fails, and to see what a passing check does and does not prove.
What substitution proves
To check a candidate answer, replace the variable with it in the original equation. Then evaluate the left side and the right side separately. If the two values are equal, the candidate is a solution. If they differ, it is not.
This works because of the definition of a solution. A value is a solution exactly when substituting it makes the equation true. Checking therefore applies the definition directly. It does not repeat your solving steps, so it can catch errors that rereading your work would miss.
Take 3(x - 2) + 4 = 2x + 5 with the candidate x = 7:
- Left side:
3(7 - 2) + 4 = 3(5) + 4 = 15 + 4 = 19 - Right side:
2(7) + 5 = 14 + 5 = 19 - Both sides are 19, so
x = 7is a solution.
Keep the two sides separate. Do not write a chain such as 3(7 - 2) + 4 = 19 = 2(7) + 5. Before you have checked, you do not yet know the sides are equal, so a chain asserts the conclusion you are trying to test. Compute each side on its own, then compare.
The procedure
- Copy the original equation. Use the problem as it was given, not a line from the middle of your work.
- Replace every occurrence of the variable with the candidate, written in parentheses. Parentheses prevent sign errors with negative values, as in
3(-2)instead of3-2. - Evaluate the left side by the order of operations.
- Evaluate the right side the same way.
- Compare. Equal values confirm the answer. Unequal values reject it.
Always check against the original equation
The most common mistake is checking against a line you derived yourself. Suppose you solve 2(x + 3) = 14 and forget to distribute the 2 to the 3:
2(x + 3) = 14
2x + 3 = 14 wrong: the 2 was not distributed to the 3
2x = 11
x = 11/2Substituting x = 11/2 into the derived line 2x + 3 = 14 gives 2(11/2) + 3 = 11 + 3 = 14. It passes, because the bad line is the one that produced the answer. Substituting into the original gives:
- Left side:
2(11/2 + 3) = 2(17/2) = 17 - Right side:
14 17 ≠ 14, so the candidate fails.
A check is only as independent as the equation you test against. The original problem is the one thing your own mistakes could not have altered.
Finding the mistake after a failed check
A failed check tells you the answer is wrong but not where the error is. You can locate it by substituting the bad candidate into each line of your work and noting the truth value.
For the example above, with candidate x = 11/2:
| Line | Left value | Right value | True for the candidate? |
|---|---|---|---|
| `2(x + 3) = 14` | 17 | 14 | No |
| `2x + 3 = 14` | 14 | 14 | Yes |
| `2x = 11` | 11 | 11 | Yes |
| `x = 11/2` | 11/2 | 11/2 | Yes |
The first line is false and the second is true. A correct step never changes which values satisfy an equation, so the error is in the step between those two lines. That is the step where 2(x + 3) became 2x + 3. Fix that step and redo everything after it.
This works because of equivalent equations. A legal step produces an equation with the same solutions, so a candidate that is false before the step and true after it cannot come from a legal step.
Checking with fractions and decimals
When the answer is a fraction, substitute it as a fraction. Take 3x - 5 = 2, which gives x = 7/3:
- Left side:
3(7/3) - 5 = 7 - 5 = 2 - Right side:
2
The sides match. Converting 7/3 to a rounded decimal such as 2.33 would give 3(2.33) - 5 = 1.99, which looks like a failure. That is rounding error, not a wrong answer. Check with the exact fraction whenever you can.
Computers have the same problem. Binary floating-point numbers cannot represent most decimals exactly, so equality tests can fail on correct answers:
print(0.1 * 3 == 0.3) # False, because 0.1 * 3 is 0.30000000000000004Python's fractions.Fraction does exact rational arithmetic. The following program solves an equation of the form ax + b = c and then checks the result by substitution. It evaluates both sides separately, like the hand procedure:
from fractions import Fraction
def solve_linear(a, b, c):
"""Solve a*x + b = c exactly for x."""
a, b, c = Fraction(a), Fraction(b), Fraction(c)
if a == 0:
return "infinitely many solutions" if b == c else "no solution"
return (c - b) / a
def check(left, right, x):
"""Substitute x into both sides of the original equation."""
x = Fraction(x)
lhs, rhs = left(x), right(x)
return lhs, rhs, lhs == rhs
# 3(x - 2) + 4 = 2x + 5, candidate x = 7
print(check(lambda x: 3 * (x - 2) + 4, lambda x: 2 * x + 5, 7)) # (Fraction(19, 1), Fraction(19, 1), True)
# 3x - 5 = 2 solved exactly, then checked
x = solve_linear(3, -5, 2)
print(x) # 7/3
print(check(lambda x: 3 * x - 5, lambda x: Fraction(2), x)) # (Fraction(2, 1), Fraction(2, 1), True)
# The wrong answer from the distribution mistake
print(check(lambda x: 2 * (x + 3), lambda x: Fraction(14), Fraction(11, 2))) # (Fraction(17, 1), Fraction(14, 1), False)
# Decimals: build them from strings so they are exact
tenth = Fraction("0.1")
print(tenth * 3 == Fraction("0.3")) # TrueThe check function takes the two sides as separate functions. This matches the rule of evaluating each side on its own, and it means the function tests whatever equation you pass in, not one derived from your steps.
What a passing check does and does not prove
A passing check proves that the candidate satisfies the equation. For a linear equation with one solution, that is enough to confirm your answer. It does not tell you how many solutions there are.
- If the equation reduces to
x = 7, there is exactly one solution, and a passing check confirms it is the right one. - If the equation reduces to a false statement such as
4 = 5, there is no value to check. Substituting any number fails, which is consistent with having no solution. - If the equation reduces to a true statement such as
4 = 4, every value passes. A single successful check cannot tell you that all values work. The algebra shows it, and the check is consistent with it.
The chapter on solution types covers these cases in detail. For now, remember that a check verifies a specific value. It does not count solutions.
Substitution also matters beyond linear equations. In some equation types, such as absolute value equations, the solving steps can produce candidates that fail in the original equation. For those, the check is a required step, not a safeguard. Building the habit now carries over.
Checking word problems
Substitution also applies to word problems, with one extra requirement. Substituting into the equation you wrote confirms your algebra. It does not confirm that the equation matches the story, because a wrong model can pass its own check.
Suppose a plumber charges a $45 call-out fee plus $30 per hour, and the bill is $135. You write 30h + 45 = 135 and get h = 3.
- Algebra check:
30(3) + 45 = 90 + 45 = 135. Both sides match. - Story check: three hours at $30 is $90, plus the $45 fee is $135, which matches the bill. The answer also makes sense as a number of hours, since it is positive.
Suppose you had mistakenly written 30h = 135 + 45. The algebra would still solve cleanly, to h = 6, and substitution into that wrong equation would pass. Only the story check, six hours costing $180 plus the fee, exposes the error. Always run the second check in word problems.
Common errors
- Checking a derived line instead of the original equation.
- Substituting without parentheses, so
-3in2xbecomes2-3instead of2(-3). - Writing a chain of equalities across both sides instead of evaluating each side on its own.
- Rounding a fraction before substituting.
- Declaring success because one side simplifies to the number you expected, without evaluating the other side.
- In word problems, checking only the equation and not the story.
Exercise
A student solves 4(x - 1) = 2x + 6 and gets x = 4 by writing 4x - 1 = 2x + 6, then 2x = 7... and then makes a second slip, reporting x = 4. First, check x = 4 in the original equation and say whether it is a solution. Second, find the correct solution.
Show answer
Substituting x = 4: left side 4(4 - 1) = 12, right side 2(4) + 6 = 14. Since 12 ≠ 14, x = 4 is not a solution. Correct solving: distribute to get 4x - 4 = 2x + 6, subtract 2x to get 2x - 4 = 6, add 4 to get 2x = 10, so x = 5. Check: left 4(5 - 1) = 16, right 2(5) + 6 = 16. They match, so x = 5.
Exercise
You solve 5 - 2x = 11 and obtain x = -3 by working through several lines. Describe the check against the original equation, and explain why checking only your last line, x = -3, would prove nothing.
Show answer
Substitute with parentheses: left side 5 - 2(-3) = 5 + 6 = 11, right side 11. They match, so x = -3 is a solution. Checking the last line x = -3 only tests that -3 equals -3, which is true for any answer you could have reached. It cannot reveal an error made earlier, so the check must use the original equation.