Sub topic 13
Common Mistakes and Checking by Substitution
What this chapter assumes
You should already be able to find a slope from two points, write a line in point-slope form y - y1 = m(x - x1), and rewrite it as y = mx + b or Ax + By = C. You should also be comfortable with fractions and negative numbers. This chapter covers where those steps usually go wrong and a quick test that catches most errors before you hand in an answer.
Why a check belongs in every problem
Writing the equation of a line takes several steps: find a slope, pick a point, substitute, distribute, move terms. An error in any step still produces a clean-looking equation. Nothing about x + y = 7 looks wrong, but it may describe the wrong line.
Substitution gives you an independent test. A point lies on a line exactly when its coordinates make the equation true. If you know points that must be on your line, plug them in. A single failure proves the equation is wrong.
Mistakes in point-slope form
Sign errors on the point
In y - y1 = m(x - x1), the minus signs are part of the template. When a coordinate is negative, subtracting it gives a plus sign.
For the point (-2, 5) and slope -1:
- Correct:
y - 5 = -1(x + 2), becausex - (-2)isx + 2. - Common error:
y - 5 = -1(x - 2). This copies the 2 without its sign, so the line passes through (2, 5) instead.
The same thing happens with y. For the point (3, -2), the setup is y + 2 = m(x - 3).
Forgetting to distribute
Start with y - 3 = 2(x - 1). The slope multiplies both terms in the parentheses:
- Correct:
y - 3 = 2x - 2, soy = 2x + 1. - Common error:
y - 3 = 2x - 1, which givesy = 2x + 2. This multiplies only thex.
Using the point's coordinates in the wrong places
Writing y - x1 = m(x - y1) swaps the roles. The y coordinate always goes with y, and the x coordinate with x.
Mistakes in finding the slope
The slope is (y2 - y1) / (x2 - x1). Two errors are common:
- Mixed order. Computing
y2 - y1on top butx1 - x2on the bottom flips the sign of the slope. Subtract in the same order in the numerator and denominator. - Run over rise. Dividing the change in
xby the change inygives the reciprocal. A line that rises steeply should have a slope with large absolute value.
Negative coordinates cause most arithmetic slips here. For (-2, 5) and (4, -1), the run is 4 - (-2) = 6, and the rise is -1 - 5 = -6. The slope is -1.
Mistakes in standard form
The convention in this tutorial is Ax + By = C with integer coefficients and A non-negative. Three errors come up:
- Leaving fractions in.
x/2 + y/3 = 1is not yet in standard form. Multiply every term by 6 to get3x + 2y = 6. - Not clearing the sign of
A.-2x + y = 1should become2x - y = -1. Multiply the whole equation by -1, not just one side or one term. - Moving a term without changing its sign. Going from
y = 2x + 1to2x + y = 1is wrong. Subtracting2xfrom both sides gives-2x + y = 1, and then you flip the signs.
Also check that the coefficients share no common factor. 4x - 2y = 6 describes the same line as 2x - y = 3, and the second is the reduced form.
Mistakes with special lines
- Treating a vertical line as having a slope. A vertical line such as
x = 4has an undefined slope, because the run is 0 and division by zero is not allowed. It has no point-slope form and no slope-intercept form. Its standard form is1x + 0y = 4. - Mixing up horizontal and vertical.
y = 3is horizontal with slope 0, andx = 3is vertical. Both pass through (3, 3), but they are different lines. - Dividing by zero in code or by hand. If two points have the same
x, stop. Writex = that value.
Mistakes with parallel and perpendicular lines
- Parallel lines have equal slopes. Perpendicular lines have slopes whose product is -1, which means a negative reciprocal.
- A frequent error is flipping the fraction but keeping the sign, or changing the sign but not flipping.
- Read the slope from the correct form. In
3x + 2y = 6, the slope is not 3 or 2. Solve foryto gety = -(3/2)x + 3, so the slope is -3/2. In general, the slope is-A/B.
Checking by substitution
Which check you run depends on what the problem gave you.
| What the problem gave | What to check |
|---|---|
| A point and a slope | The point satisfies the final equation, and the slope of the final equation equals the given slope |
| Two points | Both points satisfy the final equation |
| A point and a parallel line | The point satisfies the equation, and the slopes are equal |
| A point and a perpendicular line | The point satisfies the equation, and the product of the slopes is -1 |
Checking only one of two given points is a common shortcut that fails. A wrong slope can still pass through one point. For example, x + y = 3 and 2x + y = 1 both pass through (-2, 5), but only the first passes through (4, -1).
Worked example: two points
Find the line through (-2, 5) and (4, -1) in standard form.
- Slope:
(-1 - 5) / (4 - (-2)) = -6 / 6 = -1. - Point-slope with (-2, 5):
y - 5 = -1(x + 2). - Distribute:
y - 5 = -x - 2. - Solve for
y:y = -x + 3. - Standard form:
x + y = 3.
Check both points:
- (-2, 5):
-2 + 5 = 3. True. - (4, -1):
4 + (-1) = 3. True.
Now suppose the sign error from earlier slipped in, giving y - 5 = -1(x - 2). That leads to y = -x + 7 and x + y = 7. Substituting (-2, 5) gives 3, not 7, so the check fails and you know to go back to step 2.
Worked example: perpendicular line
Find the line through (3, 1) that is perpendicular to 3x + 2y = 6.
- The given slope is
-A/B = -3/2. - The perpendicular slope is the negative reciprocal,
2/3. - Point-slope:
y - 1 = (2/3)(x - 3). - Multiply by 3:
3y - 3 = 2x - 6. - Rearrange:
2x - 3y = 3.
Checks: (3, 1) gives 6 - 3 = 3, which is true. The slope of the new line is -2/-3 = 2/3, and (-3/2)(2/3) = -1, so the lines are perpendicular.
Automating the check
The function below tests an equation Ax + By = C against a list of points and, optionally, a required slope. It uses Fraction so there is no rounding error.
from fractions import Fraction
def check_line(coeffs, points, slope=None):
"""Return True if Ax + By = C passes through every point
and, when slope is given, has exactly that slope."""
a, b, c = coeffs
for x, y in points:
if a * x + b * y != c:
return False
if slope is not None:
if b == 0: # vertical line: slope is undefined
return False
return Fraction(-a, b) == Fraction(slope)
return True
two_points = [(-2, 5), (4, -1)]
print(check_line((1, 1, 3), two_points)) # True
print(check_line((1, 1, 7), two_points)) # False: sign error on the point
print(check_line((2, -3, 3), [(3, 1)], slope=Fraction(2, 3))) # True
print(check_line((2, -3, 3), [(3, 1)], slope=Fraction(-3, 2))) # False
print(check_line((1, 0, 4), [(4, 0), (4, 7)])) # True: x = 4A passing check is strong evidence but depends on the points you test. If you test only one point on a two-point problem, the check can pass for a wrong line. Always use every piece of given information.
A short list to run before submitting
- Did every negative coordinate turn into a plus sign inside its parentheses?
- Did the slope multiply every term inside the parentheses?
- Is the slope
rise / run, with both subtractions in the same order? - Is
Anon-negative, with integers that share no common factor? - Do all given points satisfy the final equation?
- If a slope was given or required, does the equation have it?
Exercise
A student writes the line through (3, -2) with slope 4 as y - 2 = 4(x - 3). Find the error, write the correct point-slope form, and give the standard form. Verify with the point.
Show answer
The point's y-coordinate is -2, so y - (-2) becomes y + 2; the student dropped the sign. Correct point-slope form: y + 2 = 4(x - 3). Distribute: y + 2 = 4x - 12, so y = 4x - 14. Standard form: 4x - y = 14. Check (3, -2): 4(3) - (-2) = 12 + 2 = 14. True. The slope is -A/B = -4/-1 = 4, as required.
Exercise
A student claims the line through (0, -2) and (4, 1) is 3x - 4y = 8. Check the claim by substitution, and state the slope of the line.
Show answer
Substitute (0, -2): 3(0) - 4(-2) = 8. True. Substitute (4, 1): 3(4) - 4(1) = 12 - 4 = 8. True. Both points satisfy the equation, so the claim is correct. The slope is -A/B = -3/-4 = 3/4, which matches (1 - (-2)) / (4 - 0) = 3/4.