Algebra 1
Unit 5 · Lesson 5.5

Writing equations of lines

So far you've been handed an equation and asked to read or graph it. Now you'll run it the other way: given a couple of facts that pin a line down, write its equation. This is modeling with lines, building the equation to match a situation instead of reading one off.

A slope by itself doesn't pick out one line: there are infinitely many lines with slope 2, all parallel, sliding up and down the plane. But a slope plus one point the line passes through nails down exactly one line. Point-slope form is the tool built for precisely those two facts: y − y₁ = m(x − x₁), where (x₁, y₁) is your known point and m is the slope. Plug the two facts in, then tidy up into y = mx + b if you want the familiar form.

Two relationships between lines come up constantly, and both are just facts about slope. Parallel lines never meet. They have the same tilt, so equal slopes, just different intercepts.

Perpendicular lines cross at a right angle, and their slopes are negative reciprocals: flip the slope over and change its sign. The negative reciprocal of 2 is −1/2 (flip 2 to 1/2, make it negative), and a quick way to confirm a perpendicular pair is that the two slopes multiply to −1.

When you build a line from two points, do it in two stages: first find the slope with the formula from Lesson 5.3, then feed that slope and either one of the points into point-slope. Once m is known, there's a clean shortcut to the intercept: b = y₁ − m·x₁. Either way, finish by checking. Substitute the given point back into your equation and make sure it lands, the same checking habit from before.

New words

  • 5.5.d1 Point-slope form: y - y₁ = m(x - x₁), to build a line from one point (x₁,y₁) and a slope m. (Then tidy into y = mx + b if desired.)
  • 5.5.d2 Parallel lines: never meet; equal slopes (m₁ = m₂), different intercepts. (Same slope but a different y-intercept → parallel; same slope and same y-intercept → they're the same line (coincident), not two parallel lines. You'll meet this case again in Unit 7 systems.)
  • 5.5.d3 Perpendicular lines: cross at a right angle; slopes are negative reciprocals (m₂ = -1/m₁), so their product is -1. (This negative-reciprocal rule is for nonvertical lines; separately, any horizontal line and any vertical line are perpendicular, one with slope 0, the other undefined, so the "product = -1" test doesn't apply to that pair.)

Worked example

  1. 5.5.w1 Through (2,3) with slope 4: $$\begin{aligned} &y - 3 = 4(x - 2) \\ &\Rightarrow\; y - 3 = 4x - 8 \\ &\Rightarrow\; y = 4x - 5 \end{aligned}$$ We started from point-slope, distributed the 4 to both terms inside (4x and −8, not just the x), then added 3 to both sides. Check: at x = 2, 4(2) − 5 = 3, the point we were given 5.5.f1.
x y (0, -5) (2, 3) y = 4x - 5 through (2, 3)
Figure 5.5.f1
  1. 5.5.w2 Through (1,2) and (3,8): first find the slope, m = (8-2)/(3-1) = 3. Then feed m = 3 and the point (1,2) into point-slope: $$y - 2 = 3(x - 1) \;\Rightarrow\; y = 3x - 1$$ Check: at x = 3, 3(3) − 1 = 8, the other given point, so it passes through both.

  2. 5.5.w3 Parallel to y = 2x + 1 through (0,4): parallel means the same slope, so m = 2. The line crosses the y-axis at (0, 4), so b = 4: $$y = 2x + 4$$

  3. 5.5.w4 Perpendicular to y = 2x through (0,0): perpendicular means the negative reciprocal of 2. Flip to 1/2, make it negative, giving −1/2. The line goes through the origin, so b = 0: $$y = -\tfrac12 x$$

A clean case to settle the method before practice: write the line through (1, 5) with slope -2. Point-slope gives y − 5 = −2(x − 1), so y = −2x + 2 + 5 = −2x + 7. Check: at x = 1, −2(1) + 7 = 5. One point, one slope, one line.

When you expand point-slope, the slope greets both terms in the parentheses, so y − 3 = 4(x − 2) becomes y − 3 = 4x − 8, not 4x − 2; that's the distributing-to-everyone habit from Unit 2. And for perpendicular slopes, do both steps: flip and change the sign. Taking just the reciprocal (1/2) or just the negative (−2) is half the move; the negative reciprocal of 2 is −1/2, and the check is that 2 · (−1/2) = −1. If that product isn't −1, you've done only half the flip; go back and do the other half.

Check yourself

  1. 5.5.c1 Write the equation of the line through (1, 5) with slope -2. Then verify it actually passes through that point. (y − 5 = −2(x − 1) → y = −2x + 7; check x = 1: −2(1) + 7 = 5, so it does pass through (1, 5).)
  2. 5.5.c2 A line is perpendicular to y = (1/3)x + 2. What's its slope, and how did you get it? (Take the negative reciprocal of 1/3: flip to 3, make it negative, so the slope is −3; check: (1/3)(−3) = −1.)
  3. 5.5.c3 Two lines: y = 5x - 1 and y = 5x + 4. Parallel, perpendicular, or neither? How can you tell without graphing? (Both have slope 5: equal slopes, different intercepts, so they're parallel.)

You can now write a line from a point and a slope, from two points (slope first, then point-slope), and recognize parallel lines by equal slopes and perpendicular lines by negative-reciprocal slopes.

This set covers point-and-slope problems, two-point ones, and parallel/perpendicular ones. Answers are at the end, and the worked examples cover each kind.

Practice

Write the equation (point + slope):

5.5.1 Through (3,1), slope 2.
Reveal answerHide to problem 1y - 1 = 2(x-3) ⇒ y = 2x - 5
5.5.2 Through (-1,4), slope -3.
Reveal answerHide to problem 2y - 4 = -3(x+1) ⇒ y = -3x + 1

Write the equation (two points, find m first):

5.5.3 Find the slope through (2,5) and (4,11).
Reveal answerHide to problem 3m = (11-5)/(4-2) = 3
5.5.4 Then write the line's equation.
Reveal answerHide to problem 4y - 5 = 3(x-2) ⇒ y = 3x - 1
5.5.5 Find the slope through (0,-2) and (3,7).
Reveal answerHide to problem 5m = (7-(-2))/(3-0) = 3
5.5.6 Then write the line's equation.
Reveal answerHide to problem 6b = -2, so y = 3x - 2

Parallel & perpendicular:

5.5.7 What is the slope of any line parallel to y = 3x - 2?
Reveal answerHide to problem 7slope 3 (equal slopes)
5.5.8 What is the slope of any line perpendicular to y = 2x + 1?
Reveal answerHide to problem 8slope -1/2 (negative reciprocal of 2)
5.5.9 Write the line perpendicular to y = 2x passing through (4, 0).
Reveal answerHide to problem 9slope -1/2, through (4,0): b = 0 - (-1/2)(4) = 2, so y = -(1/2)x + 2
5.5.10 Are y = 4x + 3 and y = 4x - 7 parallel, perpendicular, or neither? What about y = 4x + 3 and y = -(1/4)x?
Reveal answerHide to problem 10y=4x+3 and y=4x-7 are parallel (both slope 4); y=4x+3 and y=-(1/4)x are perpendicular (4 · -1/4 = -1).