Sub topic 3
Graphing a line from each form
This chapter assumes you can plot points, find slope as rise over run, read slope-intercept form y = mx + b, and solve linear equations for one variable.
Graphing from each form
- Slope-intercept form (y = mx + b): plot the y-intercept b, then move up or down by the rise and across by the run.
- Point-slope form (y - y1 = m(x - x1)): plot the known point (x1, y1), then use the slope the same way.
- Standard form (Ax + By = C): find both intercepts and draw the line through them.
def intercepts(a, b, c):
"""Return the (x, y) intercepts of ax + by = c. Requires a != 0 and b != 0."""
if a == 0 or b == 0:
raise ValueError("a and b must both be nonzero")
return c / a, c / b
print(intercepts(2, -1, -1)) # (-0.5, 1.0)Horizontal and vertical lines
A horizontal line has slope 0, so y = k. In standard form it is 0x + 1y = k. A vertical line has an undefined slope, so it is x = k. It cannot be written in point-slope form because that form needs a slope.
Parallel and perpendicular lines
Parallel lines have equal slopes. Perpendicular lines have slopes that are negative reciprocals. For example, the line through (4, -1) parallel to y - 3 = 2(x - 1) is y + 1 = 2(x - 4). The perpendicular line through the same point has slope -1/2, which gives x + 2y = 2.
Choosing the right form
Common mistakes and checking by substitution
Sign errors are the most common problem. Check each answer by substituting a known point. For 2x - y = -1, the point (1, 3) gives 2(1) - 3 = -1, which is correct.
Applying the forms to real situations
A phone plan charges $20 plus $5 per gigabyte. Point-slope form gives C - 20 = 5(g - 0), which is the same as C = 5g + 20. Standard form, 5g - C = -20, shows the same relationship and is useful when you need the intercepts.
Exercise
Write the line through (1, 3) with slope 2 in standard form.
Show answer
y - 3 = 2(x - 1) gives y = 2x + 1, so 2x - y = -1.