HomeFind the Slope-Intercept Equation from a Graphed Line Free original lessons
Find the Slope-Intercept Equation from a Graphed Line
Learn to read slope and y-intercept from a line on a coordinate grid and write its equation in y = mx + b form, with clear steps and practice.
Free lesson
Four exercises
Worked answers
Algebra and Function Practice
A straight line on a coordinate grid carries two key numbers: where it crosses the y-axis (the y-intercept, b) and how steeply it rises or falls (the slope, m). Once you identify both, you can write the line's equation as y = mx + b. This lesson shows how to read those values directly from a graph, handle positive and negative slopes, and check your equation against the picture.
Practice materials: Printable downloads are not available for this lesson yet. Use the instructions and four exercises below.
Reading the y-intercept from the graph
The y-intercept is the point where the line crosses the vertical y-axis. On the graph, find the y-axis and look for the single point where the line passes through it. The y-coordinate of that point is b. If the line crosses at (0, 3), then b = 3. If it crosses below the origin at (0, -2), then b = -2.
Be careful: a line may cross the x-axis at some point, but that is not the y-intercept. Only the crossing on the y-axis gives b. If the line passes through the origin (0, 0), then b = 0 and the equation has no added constant, though you may still write + 0.
- Locate the y-axis on the grid.
- Find the point where the graphed line intersects the y-axis.
- Read the y-coordinate of that point; this number is b.
- Record b with its sign (positive if above the origin, negative if below).
Finding slope with a slope triangle
Slope measures rise over run: how many units the line goes up or down for each unit it goes right. Pick two points on the line that land exactly on grid intersections. Count the vertical change (rise) and the horizontal change (run) from one point to the other. Slope m = rise / run.
If the line goes up from left to right, the rise is positive and m is positive. If it goes down from left to right, the rise is negative and m is negative. A horizontal line has rise 0, so m = 0. A vertical line has run 0, so its slope is undefined and it cannot be written as y = mx + b.
Simplify the fraction if possible. For example, rise 4 and run 2 gives m = 4/2 = 2. Rise -3 and run 6 gives m = -3/6 = -1/2.
- Choose two clear points on the line at grid intersections.
- Count the vertical change from the first point to the second (up is positive, down is negative).
- Count the horizontal change from the first point to the second (right is positive).
- Write m = rise / run and simplify the fraction.
- Check the sign: rising left-to-right means positive m; falling means negative m.
Writing and checking y = mx + b
Once you have m and b, substitute them into y = mx + b. For example, if m = 2 and b = -1, the equation is y = 2x - 1. Use the sign of b correctly: b = -1 means subtract 1, while b = 1 means add 1.
Always check by testing a point from the graph. Pick any clear point on the line, substitute its x and y into your equation, and confirm both sides match. If the point is (3, 5) and your equation is y = 2x - 1, then 2(3) - 1 = 5, which matches. A second check is to confirm the y-intercept: substituting x = 0 should give y = b.
- Write y = mx + b with your values for m and b.
- Substitute x = 0 and confirm the result is b.
- Pick one other point on the line and substitute its coordinates.
- Verify that the equation produces the correct y for that x.
- If the check fails, re-read the slope triangle or the y-intercept.
Worked example
A line on a coordinate grid crosses the y-axis at (0, -2). It also passes through (3, 4). Find the slope-intercept equation.
Worked answer
y = 2x - 2
Why: The y-intercept is -2, so b = -2. Using points (0, -2) and (3, 4): rise = 4 - (-2) = 6, run = 3 - 0 = 3, so m = 6/3 = 2. Substitute into y = mx + b: y = 2x - 2. Check with (3, 4): 2(3) - 2 = 4, which matches.
Four practice exercises
Exercise 1
A line crosses the y-axis at (0, 1) and passes through (2, 5). Write its slope-intercept equation.
Show answer and check
y = 2x + 1
Why: b = 1 from the y-intercept. Rise from (0,1) to (2,5) is 4; run is 2; m = 4/2 = 2. Equation: y = 2x + 1. Check (2,5): 2(2)+1 = 5.
Check: Substitute x = 0 to get y = 1, and substitute (2, 5) to confirm 5 = 2(2) + 1.
Exercise 2
A line crosses the y-axis at (0, -3) and passes through (4, -1). Write its slope-intercept equation.
Show answer and check
y = (1/2)x - 3
Why: b = -3. Rise from (0,-3) to (4,-1) is 2; run is 4; m = 2/4 = 1/2. Equation: y = (1/2)x - 3. Check (4,-1): (1/2)(4) - 3 = 2 - 3 = -1.
Check: Confirm x = 0 gives y = -3 and that (4, -1) satisfies the equation.
Exercise 3
A line crosses the y-axis at (0, 4) and passes through (2, 0). Write its slope-intercept equation.
Show answer and check
y = -2x + 4
Why: b = 4. From (0,4) to (2,0): rise = 0 - 4 = -4; run = 2; m = -4/2 = -2. Equation: y = -2x + 4. Check (2,0): -2(2)+4 = 0.
Check: Substitute x = 0 for y = 4 and (2, 0) for 0 = -2(2) + 4.
Exercise 4
A horizontal line passes through (0, -5) and (3, -5). Write its slope-intercept equation.
Show answer and check
y = -5
Why: The line is horizontal, so rise = 0 and m = 0. The y-intercept is -5, so b = -5. Equation: y = 0x - 5, simplified to y = -5. Check: any x gives y = -5.
Check: Confirm both given points have y = -5 and that substituting x = 0 gives y = -5.
Common mistakes
- Using the x-intercept as b. The y-intercept is where the line crosses the y-axis, at x = 0. Read the crossing on the vertical axis, not the horizontal one.
- Counting run left-to-right but rise in the wrong direction. Move consistently from one point to the other. If you go right, count the vertical change in the same trip. Rising gives positive rise; falling gives negative rise.
- Forgetting to simplify the slope fraction. Reduce rise/run to lowest terms, such as 4/2 to 2 or 6/3 to 2, so the equation is in simplest form.
- Dropping the negative sign on b or m. Write the sign explicitly before substituting. A crossing below the origin means negative b; a falling line means negative m.
Self-check rubric
- Correctly identifies b from the y-axis crossing, including its sign.
- Correctly computes slope as rise/run using two clear points.
- Simplifies the slope fraction to lowest terms.
- Writes the equation in y = mx + b form with correct signs.
- Checks the equation against at least one point from the graph.
- Explains the slope triangle or counting method used.
Questions and answers
What if the line crosses the y-axis at a fraction?
Read the grid carefully. If the crossing is halfway between two grid marks, b is a fraction such as 1/2 or -3/2. Use the same fraction in your equation.
Can slope be zero?
Yes. A horizontal line has rise 0, so m = 0 and the equation is y = b. For example, a horizontal line through (0, 4) is y = 4.
What if the line is vertical?
A vertical line has run 0, so slope is undefined. It cannot be written as y = mx + b; its equation is x = a constant.
How do I know my equation is correct?
Test at least two points from the graph. Substitute each point's x and y into y = mx + b and confirm the equation is true. Also confirm that x = 0 gives y = b.