M
Math Coach Amy
Amy Ferguson Moncure

Algebra 1 · Unit 2

Write the Equation of a Line

Write a linear equation from a graph, two points, a slope and a point, or as x = a or y = c.

Jump to section:

What to Remember

From slope and a point

Use y − y₁ = m(x − x₁), then rewrite as y = mx + b if you need to.

From two points

First find the slope: m = y₂ − y₁x₂ − x₁. Then use either point in point-slope form.

From a graph

Read two clear points, or read the y-intercept and count slope. Then write y = mx + b.

Horizontal and vertical

Horizontal: y = c (slope 0). Vertical: x = a (undefined slope). These do not use y = mx + b when the line is vertical.

Level 1

Easy

One point and a slope, or a horizontal or vertical line.

Example
Write the equation of the line through (1, 4) with slope 3.

y − y₁ = m(x − x₁)

y − 4 = 3(x − 1)

y − 4 = 3x − 3

y = 3x + 1

Answer: y = 3x + 1

1
Write the equation of the horizontal line through (2, −5).
Show Answer

Horizontal lines have slope 0.

Every point has y = −5.

y = −5

Answer: y = −5

2
Write the equation of the vertical line through (−3, 7).
Show Answer

Vertical lines are x = a.

Every point has x = −3.

x = −3

Answer: x = −3

3
A line has slope 12 and y-intercept (0, 6). Write its equation.
Show Answer

y = mx + b

y = 12x + 6

Answer: y = 12x + 6

4
Write the equation of the line through (0, 2) with slope −4.
Show Answer

The given point is the y-intercept.

y = −4x + 2

Answer: y = −4x + 2

5
The graph is a horizontal line through (0, 0). Write its equation.
Show Answer

This is the x-axis.

y = 0

Answer: y = 0

Level 2

Medium

Two points, or a graph with a clear intercept.

Example
Write the equation of the line through (2, 3) and (6, 11).

m = y₂ − y₁x₂ − x₁

m = 11 − 36 − 2

m = 84

m = 2

y − 3 = 2(x − 2)

y − 3 = 2x − 4

y = 2x − 1

Answer: y = 2x − 1

1
Write the equation of the line through (−2, 5) and (4, 5).
Show Answer

m = 5 − 54 − (−2)

m = 06

m = 0

y = 5

Answer: y = 5

2
Write the equation of the line through (3, 1) and (3, 8).
Show Answer

m = 8 − 13 − 3

m = 70

Slope is undefined.

x = 3

Answer: x = 3

3
The graph passes through (0, 1) and (2, 5). Write y = mx + b.
Show Answer

m = 5 − 12 − 0

m = 42

m = 2

b = 1

y = 2x + 1

Answer: y = 2x + 1

4
Write the equation of the line through (−4, −1) with slope 34.
Show Answer

y − (−1) = 34(x − (−4))

y + 1 = 34(x + 4)

y + 1 = 34x + 3

y = 34x + 2

Answer: y = 34x + 2

5
A printer charges $6 plus $0.25 per page. Write a linear equation for the cost C after p pages.
Show Answer

C = 0.25p + 6

Slope 0.25 is dollars per page. Intercept 6 is the starting fee.

Answer: C = 0.25p + 6

Level 3

Hard

Less obvious points, standard form, and a story with two data pairs.

Example
Write the equation, in standard form with integer coefficients, of the line through (−1, 4) and (5, −2).

m = −2 − 45 − (−1)

m = −66

m = −1

y − 4 = −1(x + 1)

y − 4 = −1x − 1

y = −1x + 3

x + y = 3

Answer: x + y = 3

1
A line has x-intercept 8 and y-intercept −2. Write slope-intercept form.
Show Answer

Points (8, 0) and (0, −2)

m = 0 − (−2)8 − 0

m = 28

m = 14

y = 14x − 2

Answer: y = 14x − 2

2
The graph of a line is shown. It crosses the y-axis at (0, 3) and goes down 1, right 4. Write its equation.
Show Answer

m = −14

b = 3

y = −14x + 3

Answer: y = −14x + 3

3
After 2 hours a tank has 28 gallons. After 6 hours it has 16 gallons. Write V = mt + b for the volume after t hours.
Show Answer

Points (2, 28) and (6, 16)

m = 16 − 286 − 2

m = −124

m = −3

28 = −3(2) + b

28 = −6 + b

b = 34

V = −3t + 34

Check: −3(6) + 34 = 16

Answer: V = −3t + 34

4
Write the equation of the line through (0, 0) and (−5, 2) in slope-intercept form.
Show Answer

m = 2 − 0−5 − 0

m = 2−5

b = 0

y = −25x

Answer: y = −25x

5
Is there a unique line through (4, 1) that is vertical? Horizontal? With slope 2? Write each equation that exists.
Show Answer

Vertical: yes, x = 4.

Horizontal: yes, y = 1.

Slope 2: yes, y − 1 = 2(x − 4), so y = 2x − 7.

Each description names exactly one line.

Answer: x = 4; y = 1; y = 2x − 7

Super Challenge

Super Challenge

1
A line through (3, 2) has integer intercepts. Find one such line that is not horizontal or vertical, and write it in standard form.
Show Answer

Try y-intercept 5: then m = 2 − 53 − 0 = −1.

y = −1x + 5

x + y = 5

x-intercept (5, 0) is an integer. Check (3, 2): 3 + 2 = 5.

Answer: one answer: x + y = 5

2
Three points are (0, 4), (2, 1), and (6, −5). Are they on one line? If yes, write the equation. If not, say which pair determines a different slope.
Show Answer

Slope from (0, 4) to (2, 1): 1 − 42 − 0 = −32

Slope from (0, 4) to (6, −5): −5 − 46 − 0 = −96 = −32

Same slope and a shared point, so all three lie on y = −32x + 4.

Answer: yes; y = −32x + 4

3
You know a line’s slope and one point. Why does that determine the line, while “a slope” alone does not? Why does “two points” fail when the two points are the same point written twice?
Show Answer

A slope is a direction. Through one point there is exactly one line with that direction.

A slope with no point is a whole family of parallel lines.

Two copies of the same point do not determine a run, so the slope formula has 0 in the denominator and numerator. Infinitely many lines go through a single point.

Answer: one point + slope is unique; slope only is parallel family; same point twice is not two points

Need help writing the equation of a line?

Book a Session with Amy