Sub topic 11
Parallel and Perpendicular Lines
This chapter assumes you can write a line in point-slope form, convert between point-slope, slope-intercept and standard forms, and handle horizontal and vertical lines. Those topics come from earlier chapters. Here you use them to build new lines from a given line and a point.
The two slope rules
Two lines in the same plane are related in one of three ways: they cross at an angle, they never meet (parallel), or they cross at a right angle (perpendicular). Slope tells you which.
- Parallel lines have equal slopes: m₁ = m₂. They have different y-intercepts. If the intercepts also match, the two equations describe the same line.
- Perpendicular lines have slopes whose product is −1: m₁ · m₂ = −1. Equivalently, each slope is the negative reciprocal of the other. To get a negative reciprocal, flip the fraction and change its sign. The slope 2/3 becomes −3/2, and the slope −4 becomes 1/4.
The perpendicular rule has a geometric reason. A line with slope m/n moves n units right for every m units up. Rotating that direction by 90° swaps the roles of the two moves and reverses one direction. The new direction is m units right for every n units down, or −n/m.
| Relationship | Slope condition | Example slopes |
|---|---|---|
| Parallel | m₁ = m₂ | 3 and 3 |
| Perpendicular | m₁ · m₂ = −1 | 3 and −1/3 |
| Neither | anything else | 3 and 2 |
Reading slope from standard form
For a line Ax + By = C with B ≠ 0, solving for y gives y = (−A/B)x + C/B, so the slope is −A/B. You can then compare slopes without converting to slope-intercept form each time.
Standard form also gives a shortcut that avoids fractions:
- A line parallel to Ax + By = C has the form Ax + By = D. Only the constant changes.
- A line perpendicular to Ax + By = C has the form Bx − Ay = D. Swap the coefficients and negate one of them.
Check the perpendicular shortcut. The line Ax + By = C has slope −A/B. The line Bx − Ay = D has slope −B/(−A) = B/A. The product is (−A/B)(B/A) = −1, as required.
Once you choose a point (x₀, y₀) the new line must pass through, find D by substituting that point into the new left side.
Worked example: a parallel line
Find the line through (3, −2) that is parallel to 2x + 3y = 6.
- The new line has the form 2x + 3y = D.
- Substitute the point: D = 2(3) + 3(−2) = 0.
- The answer is 2x + 3y = 0.
Check by the slow route. The slope of 2x + 3y = 6 is −2/3. Point-slope form gives y + 2 = −(2/3)(x − 3). Multiplying by 3 gives 3y + 6 = −2x + 6, which simplifies to 2x + 3y = 0. The two routes agree.
Worked example: a perpendicular line
Find the line through the same point (3, −2) that is perpendicular to 2x + 3y = 6.
- The new line has the form 3x − 2y = D.
- Substitute the point: D = 3(3) − 2(−2) = 9 + 4 = 13.
- The answer is 3x − 2y = 13.
Check using slopes. The original slope is −2/3, and the negative reciprocal is 3/2. Point-slope form gives y + 2 = (3/2)(x − 3). Multiply by 2 to get 2y + 4 = 3x − 9. Rearranging gives 3x − 2y = 13. This matches.
Horizontal and vertical lines
The slope rules break down when a slope is 0 or undefined, but the standard-form shortcut still works.
- A horizontal line is y = k, which is 0x + 1y = k. Its slope is 0, and 0 has no reciprocal.
- A vertical line is x = h, which is 1x + 0y = h. Its slope is undefined, and the slope formula −A/B would divide by zero.
These two kinds of line are perpendicular to each other. Every horizontal line is perpendicular to every vertical line, even though the product rule m₁ · m₂ = −1 cannot be applied to them.
Apply the shortcut to the vertical line x = 4, written as (A, B) = (1, 0). A perpendicular line has the form 0x − 1y = D, which is y = −D. So the perpendicular through (1, 5) is y = 5, which is horizontal as expected. A parallel to x = 4 through (1, 5) keeps the form 1x + 0y = D with D = 1, giving x = 1.
Testing two lines without dividing
You can classify two lines directly from their standard-form coefficients, which avoids division and handles vertical lines. For lines (A₁, B₁, C₁) and (A₂, B₂, C₂):
- The lines are parallel (or identical) when A₁B₂ − A₂B₁ = 0.
- The lines are perpendicular when A₁A₂ + B₁B₂ = 0.
- Parallel lines are identical when A₁C₂ = A₂C₁ and B₁C₂ = B₂C₁.
The first test says the slope −A/B is equal for both lines after cross-multiplying. The second says the product (−A₁/B₁)(−A₂/B₂) equals −1 after clearing denominators.
The program below builds parallel and perpendicular lines and classifies pairs of lines using these tests. Integer arithmetic keeps every result exact.
from math import gcd
def normalize(a, b, c):
"""Reduce to lowest integer terms with A >= 0 (and B > 0 when A == 0)."""
g = gcd(gcd(a, b), c)
a, b, c = a // g, b // g, c // g
if a < 0 or (a == 0 and b < 0):
a, b, c = -a, -b, -c
return a, b, c
def parallel_through(line, point):
a, b, _ = line
x, y = point
return normalize(a, b, a * x + b * y)
def perpendicular_through(line, point):
a, b, _ = line
x, y = point
return normalize(b, -a, b * x - a * y)
def relation(l1, l2):
a1, b1, c1 = l1
a2, b2, c2 = l2
if a1 * b2 - a2 * b1 == 0:
if a1 * c2 == a2 * c1 and b1 * c2 == b2 * c1:
return "same line"
return "parallel"
if a1 * a2 + b1 * b2 == 0:
return "perpendicular"
return "neither"
given = (2, 3, 6)
print(parallel_through(given, (3, -2))) # (2, 3, 0)
print(perpendicular_through(given, (3, -2))) # (3, -2, 13)
print(perpendicular_through((1, 0, 4), (1, 5))) # (0, 1, 5)
print(relation((2, 3, 6), (3, -2, 13))) # perpendicular
print(relation((2, 3, 6), (4, 6, 5))) # parallel
print(relation((2, 3, 6), (4, 6, 12))) # same line
print(relation((2, 3, 6), (1, 1, 1))) # neitherThe helper normalize follows the standard-form convention from earlier in the tutorial: integer coefficients with no common factor, and A non-negative.
Common mistakes
- Flipping but not negating. The slope 2/5 has the negative reciprocal −5/2. Writing 5/2 gives a line that is not perpendicular. Verify with the product: it must be −1, not +1.
- Negating but not flipping. The slope 2/5 paired with −2/5 gives a mirror image, not a perpendicular.
- Copying the old constant. A parallel line through a new point needs a new C. Reusing the original C gives the original line or a line through the wrong point.
- Reading the slope as A/B. In Ax + By = C the slope is −A/B. The sign matters when you test parallelism by hand.
- Skipping the check. Always substitute the given point into the final equation. Then confirm the slope relationship with the original line.
Exercises
Exercise
Write the line through (−1, 4) that is parallel to 5x − 2y = 7. Give the answer in standard form with A non-negative.
Show answer
The new line has the form 5x − 2y = D. Substituting the point gives D = 5(−1) − 2(4) = −13. The line is 5x − 2y = −13.
Exercise
Write the line through (6, 1) that is perpendicular to y = −(3/4)x + 2. Give the answer in standard form.
Show answer
The given slope is −3/4, so the perpendicular slope is 4/3. Point-slope form gives y − 1 = (4/3)(x − 6). Multiplying by 3 gives 3y − 3 = 4x − 24, which rearranges to 4x − 3y = 21. Check the point: 4(6) − 3(1) = 21.
Exercise
Are the lines 6x + 9y = 4 and 2x − 3y = 8 parallel, perpendicular, or neither? Use the coefficient tests.
Show answer
Parallel test: A₁B₂ − A₂B₁ = 6(−3) − 2(9) = −36, which is not 0. Perpendicular test: A₁A₂ + B₁B₂ = 6(2) + 9(−3) = 12 − 27 = −15, which is not 0. The lines are neither parallel nor perpendicular.
Exercise
Find the line through (−2, 7) that is perpendicular to the horizontal line y = 3, and explain why point-slope form cannot be used.
Show answer
A line perpendicular to a horizontal line is vertical. Through (−2, 7) it is x = −2. Its slope is undefined, so there is no value of m to use in y − y₁ = m(x − x₁).