3.6 Writing the Equation of a Line Given Two Points
Learning Objectives
After completing this section, you should be able to:
- Find the slope of a line given two points.
- Write the equation of a line in slope-intercept form (
).
- Use slope-intercept form to find equations of parallel and perpendicular lines.
- Recognize and write equations of vertical and horizontal lines.
Two Methods for Writing a Linear Equation
There are two common ways to find the equation of a line:
- Slope-Intercept Form: Substitute the slope (m) and a known point ((x, y)) into
, then solve for b.
- Point-Slope Form: Use
, where m is the slope and (x_1, y_1) is a point on the line.
Both methods lead to the same final equation.
Example 3.6.1 — Two methods
Find the equation of the line with slope 3 through
.
Method 1: Using slope-intercept form
When you know one point and the slope, start with
. Substitute the slope for
and the point
to find
.
We know
,
, and
. Substitute into
and solve for
.
Solution (Method 1)
Equation: 

Method 2: Using point-slope form
Substitute
and
into
.
Solution (Method 2)
This matches the equation from Method 1.
Optional: Where point-slope form comes from
Start with the slope formula using points
and
on the line:
Multiply both sides by
:
Rewriting gives point-slope form:
Example 3.6.2
Find the equation of the line with slope
through
.
Solution
Start with
:
Substitute
:
Equation: 

Try It
Finding the Equation Given Two Points
When two points are given, first find the slope:
Then use one point and the slope to solve for
in
.
Example 3.6.3
Find the equation of the line through
and
.
Solution
Step 1: Find the slope
Step 2: Solve for b using one point
Equation: 

Example 3.6.4
Find the equation of the line through
and
.
Solution
Step 1: Find the slope
Step 2: Solve for b using (2, 8)
Equation: 

Try It
Writing Equations of Parallel and Perpendicular Lines
Parallel lines have the same slope.
Perpendicular lines have slopes that are negative reciprocals.
Example 3.6.5 — Parallel line
Write the equation of a line parallel to
and passing through
.
Solution
Parallel lines have the same slope, so
.

Use
with point
:
Equation: 

Example 3.6.6 — Perpendicular line
Write the equation of a line perpendicular to
and passing through
.

Solution
The perpendicular slope is the negative reciprocal of 4, so
.
Use
with point
:
Equation: 

Try It
Special Cases: Vertical and Horizontal Lines
| Line Type | Description | Example |
|---|---|---|
| Horizontal | ||
| Vertical |
Quick Reminder
Horizontal lines have slope
. Vertical lines have undefined slope.
Example 3.6.7 — Horizontal and vertical lines
a) Find the equation of the line through
and
.
Solution
Both points have the same y-value, so the line is horizontal.
Equation: 
b) Find the equation of the line through
and
.
Solution
Both points have the same x-value, so the line is vertical.
Equation: 
Note: You don’t need to plot points for these equations. Just remember that
is a horizontal line and
is a vertical line.
Quick Tip: Horizontal lines:
Vertical lines: 
Key Takeaways
- To find slope:
- To find
: substitute one point into
- Parallel lines → same slope
- Perpendicular lines → negative reciprocal slopes
- Horizontal lines →
(slope 0)
- Vertical lines →
(undefined slope)