Slope-intercept form: write an equation from a graph
Key Notes:
Understanding Slope-Intercept Form
The slope-intercept form of a linear equation is:
y = mx + b
where:
- m = slope (rate of change)
- b = y-intercept (where the line crosses the y-axis)
Identifying the Slope (m) from a Graph
Slope formula:
m=rise / runm
- Rise = vertical change (difference in y-values)
- Run = horizontal change (difference in x-values)
Steps to find slope:
- Pick two points on the line (make sure they are exact grid points).
- Count how many units you move up/down (rise) and left/right (run).
- Divide rise by run.
- Positive slope → line goes up from left to right.
- Negative slope → line goes down from left to right.
Finding the y-Intercept (b)
- Locate the point where the line crosses the y – axis.
- The y-coordinate of this point is b.
- Example: If the line crosses at (0, 4), then b = 4.
Writing the Equation
- Write the general slope-intercept form: y = mx + b.
- Substitute m and b with the values from the graph.
- Simplify if needed.
Example
From the graph:
- Line passes through points (0, 2) and (3, 5).
- Slope:
m=5−2 / 3−0 = 3 / 3=1
- y-intercept: b = 2
Equation:
y = 1x + 2 or y = x + 2
Tips
- Always choose points where the grid lines meet exactly.
- Check the slope sign carefully (positive or negative).
- If the line is horizontal: m=0 → equation is y=b.
- If the line is vertical: slope is undefined → equation is x=a (not in slope-intercept form).
Learn with an example
Look at this graph

What is the equation of the line in slope-intercept form?
solution:
First, find the slope m. Pick two points on the line, such as (0, 3) and (7, 4). Plug those points into the slope formula.
m= change in y/change in x
m = 4-3/7-0
m = 1/7
The slope is =1/7
Now find the y-intercept. Since the line crosses the y-axis at 3, the y-intercept is 3.
Finally, use the slope m =1/7 and the y-intercept b = 3 to write the equation in slope-intercept form.
y = mx + b
y =1/7x + 3
Look at this graph.

What is the equation of the line in slope-intercept form?
First find the slope m. Pick two points on the line, such as (0, -2) and (1, 0). Plug those points into the slope formula.
m = change in y / change in x
m = 0 – -2 / 1 – 0 Plugin (0, -2) and (1, 0)
m = 2/1 Simplify
m = 2 Simplify
The slope is 2.
Now find the y-intercept. Since the line crosses the y-axis at -2, the y-intercept is -2.
Finally, use the slope m = 2 and the y-intercept b = 2 to write the equation in slope-intercept form.
y = mx + b
y = 2x + –2 Plugin m=2 and b = –2
y = 2x − 2 Rewrite as subtraction
Look at this graph.

What is the equation of the line in slope-intercept form?
First find the slope m. Pick two points on the line, such as (0, 10) and (1, 5). Plug those points into the slope formula.
m =change in y/ change in x
m =5 − 10 /1 − 0 Plugin (0, 10) and (1, 5)
m =–5/1 Simplify
m = –5 Simplify
Theslopeis–5.
Now find the y-intercept. Since the line crosses the y-axis at 10, the y-intercept is 10.
Finally,usetheslopem = –5andthey-interceptb = 10towritetheequationinslope-interceptform.
y = mx + b
y = –5x + 10 Plugin m = –5 and b = 10
Let’s Practice!