Ctrl+k

Write the equation of a line through two points

Given two distinct points in the Cartesian plane, the learner determines the line’s slope as the change in yy divided by the change in xx, then uses that relationship to write and interpret an equation in point-slope, slope-intercept, or an equivalent form. This includes recognizing horizontal lines as having zero slope and vertical lines as having undefined slope, and checking that both points satisfy the equation; parametric, vector, three-dimensional, and other advanced line representations are not included.

Detailed Explanation: Write the equation of a line through two points

To write the equation of a line through two points:

  1. Find the slope:
m=y2y1x2x1m=\frac{y_2-y_1}{x_2-x_1}
  1. Use the slope and either point in point-slope form:
yy1=m(xx1)y-y_1=m(x-x_1)
  1. Simplify if desired into slope-intercept form:
y=mx+by=mx+b
  1. Check that both points satisfy the equation.

Example

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

Step 1: Find the slope.

Let (x1,y1)=(2,3)(x_1,y_1)=(2,3) and (x2,y2)=(6,11)(x_2,y_2)=(6,11).

m=11362=84=2m=\frac{11-3}{6-2} =\frac{8}{4} =2

The slope is 22, meaning yy increases by 22 for every increase of 11 in xx.

Step 2: Use point-slope form.

Use the point (2,3)(2,3):

y3=2(x2)y-3=2(x-2)

This is a correct equation of the line.

Step 3: Rewrite in slope-intercept form.

Distribute and simplify:

y3=2x4y-3=2x-4 y=2x1y=2x-1

So the equation is

y=2x1\boxed{y=2x-1}

Step 4: Check both points.

For (2,3)(2,3):

y=2(2)1=3y=2(2)-1=3

For (6,11)(6,11):

y=2(6)1=11y=2(6)-1=11

Both points satisfy the equation, so the equation is correct.

Remember: A horizontal line has slope 00 and can be written as y=cy=c. A vertical line has an undefined slope and can be written as x=cx=c.

Learn by doing: Write the equation of a line through two points

Click a topic below to practice the foundational skills you'll need, learn the steps, or master this skill

Practice with unlimited practice problems

Equation of a Line from Coordinates of Points


    ?