Equation of a Line with Two Points- Tutorial

What You're Getting Into

This tutorial shows you how to find the equation of a line when you know two points on that line. No theory lectures. Just the steps.

What you need: Two points with coordinates like (x₁, y₁) and (x₂, y₂). That's it.

The Slope-Intercept Form

Most people use y = mx + b to write line equations. Here's what each part means:

Your job is to find m first, then find b.

Step 1: Find the Slope

The slope formula is:

m = (y₂ - y₁) / (x₂ - x₁)

Take the difference in y-coordinates and divide by the difference in x-coordinates. Order matters, but stay consistent.

Example

Points: (2, 3) and (6, 11)

m = (11 - 3) / (6 - 2) = 8 / 4 = 2

Step 2: Find the Y-Intercept

Once you have the slope, plug it into y = mx + b. Then substitute one of your points to solve for b.

Using the slope (2) and point (2, 3):

3 = 2(2) + b
3 = 4 + b

Step 3: Write the Equation

Put it together: y = 2x - 1

Done. That's your answer.

The Point-Slope Form (Alternative)

Sometimes the point-slope form is faster, especially if you don't need to solve for the y-intercept:

y - y₁ = m(x - x₁)

Using point (2, 3) and slope 2:

y - 3 = 2(x - 2)

This is valid. You can leave it like this or expand it to slope-intercept form.

How To: Finding the Equation of a Line

  1. Identify your two points. Label them (x₁, y₁) and (x₂, y₂).
  2. Calculate the slope. Use m = (y₂ - y₁) / (x₂ - x₁).
  3. Pick one point and plug the slope into the point-slope equation: y - y₁ = m(x - x₁).
  4. Solve for y if you need slope-intercept form.

Common Mistakes

Quick Comparison

Method Best When Formula
Slope-Intercept You need y = mx + b format y = mx + b
Point-Slope You have slope and one point y - y₁ = m(x - x₁)
Two-Point Formula Skip the middle step (y - y₁) / (x - x₁) = (y₂ - y₁) / (x₂ - x₁)

Worked Example

Problem: Find the equation of the line passing through (1, 5) and (4, 14).

Step 1: Slope
m = (14 - 5) / (4 - 1) = 9 / 3 = 3

Step 2: Y-intercept
5 = 3(1) + b
5 = 3 + b

Step 3: Equation
y = 3x + 2

Verify with the second point: 3(4) + 2 = 14 ✓