Sub topic 1
What makes lines parallel
Prerequisites
This chapter assumes you can plot points on a coordinate plane, solve linear equations in one variable, and add and multiply fractions. You should also know the angle terms right, supplementary, and congruent.
Parallel lines have equal slopes
Two lines in a plane are parallel when they never meet. For non-vertical lines, this happens exactly when their slopes are equal. The slope of a line through (x1, y1) and (x2, y2) is m = (y2 - y1) / (x2 - x1), provided x1 differs from x2.
For example, the line through (0, 1) and (2, 5) has slope 4/2 = 2. The line through (0, -3) and (1, -1) also has slope 2, so the two lines are parallel.
What makes lines perpendicular
Two lines are perpendicular when they meet at a right angle. For non-vertical, non-horizontal lines with slopes m1 and m2, perpendicularity means m1 * m2 = -1. Each slope is the negative reciprocal of the other, so a slope of 2 pairs with -1/2.
Reviewing slope
Slope measures rise over run. A horizontal line has slope 0. A vertical line has no defined slope because its run is zero.
from fractions import Fraction
def slope(p, q):
(x1, y1), (x2, y2) = p, q
if x1 == x2:
return None # vertical line, slope undefined
return Fraction(y2 - y1, x2 - x1)
print(slope((0, 1), (2, 5))) # 2Using Fraction keeps the result exact instead of rounding a decimal.
> Callout placeholder
Slope-intercept, point-slope, and standard form
Three common forms describe the same line:
| Form | Equation | Best use |
|---|---|---|
| Slope-intercept | y = mx + b | Reading the slope and y-intercept |
| Point-slope | y - y1 = m(x - x1) | Writing a line through a known point |
| Standard | Ax + By = C | Integer coefficients and intercepts |
Rearranging point-slope form into slope-intercept form gives the slope directly.
Exercise
Exercise
Are the line through (0, 0) and (1, 3) and the line through (2, 1) and (3, 4) parallel?
Show answer
Yes. The first slope is (3 - 0) / (1 - 0) = 3, and the second slope is (4 - 1) / (3 - 2) = 3. Equal slopes mean the lines are parallel.