Write the equation of a line given points, slope, or a graph.
Find a slope and a point, then use point-slope form to write the equation.
Core Idea
To write a line's equation, you need a slope and a point. Two points give you the slope via
Understanding
The fastest path to an equation depends on what you're given. If you have the slope and a point, plug straight into point-slope form
From a graph, pick two clear lattice points (where the line crosses grid intersections), calculate the slope from rise over run, and read the y-intercept if the line crosses the y-axis at a grid point.
The most common mistake is mixing up the order of subtraction in the slope formula — just be consistent:
Step by Step
- If given two points, compute slope:
.𝑚 = 𝑦 2 − 𝑦 1 𝑥 2 − 𝑥 1 - Pick one of the points (or the given point) and substitute into
.𝑦 − 𝑦 1 = 𝑚 ( 𝑥 − 𝑥 1 ) - Distribute and simplify to slope-intercept or standard form as needed.
- Verify by substituting the other point into your equation.
Misconceptions
- Subtracting coordinates in different orders — using
in the numerator but𝑦 2 − 𝑦 1 in the denominator flips the sign of the slope.𝑥 1 − 𝑥 2 - Reading rise/run from a graph as run/rise — rise is the vertical change (y), run is the horizontal change (x).
- Forgetting to distribute the slope through the parentheses in point-slope form before simplifying.
Worked Example
A line passes through the points
Select an answer to see the explanation