How to Write an Equation from a Graph?
Write an Equation from a Graph
Given a line on a graph, you can recover its equation by reading two things off the grid: the y-intercept and the slope. Drop them into \(y = mx + b\) and you’ve captured the line. We’ll read several together, with a solver, practice, and a worksheet maker a tap away.
Write an Equation from a Graph: what to notice and how to work it
What to notice first
Common student mistake
Key formulas and cues
A reliable path
- Simplify each sideDistribute and combine like terms before moving variables.
- Collect variablesUse inverse operations to get variable terms on one side and constants on the other.
- Check in the originalSubstitute the solution into the original equation, not only the simplified line.
Worked examples
Two-step equation
- Subtract 5 from both sides.
- Divide both sides by 3.
- Check 3(5) + 5 = 20.
Variables on both sides
- Subtract 2x from both sides.
- Add 7 to both sides.
- Divide by 2.
Try one before moving on
Write an Equation from a Graph: pop-up practice

When a line is drawn on a coordinate grid, you can recover its equation just by reading the picture. Two features do it: where the line crosses the y-axis (that’s \(b\)) and how steeply it climbs or falls (that’s \(m\)). Put them into \(y = mx + b\) and you’ve turned a graph back into algebra.
In short: read the y-intercept off the graph, count the slope as rise over run between two clear points, then write \(y = mx + b\). A line crossing at \((0,1)\) that rises 2 for every 1 across is \(y = 2x + 1\).
Read Two Things Off the Grid
The y-intercept is the spot where the line meets the vertical axis — read its y-value directly. For the slope, pick two points the line passes through cleanly (lattice points), then count the vertical change over the horizontal change between them.
How to do it (3 steps):
- Find the y-intercept \(b\) where the line crosses the y-axis.
- Count the slope \(m\) (rise over run) between two grid points.
- Write \(y = mx + b\).
From graph to \(y = 2x + 1\)
This line crosses the y-axis at \((0,1)\), so \(b = 1\). From \((0,1)\) to \((2,5)\) it rises 4 and runs 2, so \(m = 2\). The equation is \(y = 2x + 1\).
⚡ Read a line’s equationWorked Examples
Read the intercept, count the slope — the line below shows each one on the grid.
Example A — Positive slope
A line crosses at \((0,1)\) and passes \((2,5)\).
- Read the y-intercept: \(b = 1\).
- Count the slope: \(m = \dfrac{5 – 1}{2 – 0} = 2\).
- Write it: \(y = 2x + 1\).
Answer: \(y = 2x + 1\)
Example B — Negative slope
A line crosses at \((0,3)\) and passes \((1,1)\).
- Read the y-intercept: \(b = 3\).
- Count the slope: \(m = \dfrac{1 – 3}{1 – 0} = -2\) (falls to the right).
- Write it: \(y = -2x + 3\).
Answer: \(y = -2x + 3\)
Example C — Through the origin
A line crosses at \((0,0)\) and passes \((2,6)\).
- The line crosses at the origin, so \(b = 0\).
- Count the slope: \(m = \dfrac{6 – 0}{2 – 0} = 3\).
- Write it: \(y = 3x\).
Answer: \(y = 3x\)
Example D — A gentle slope
A line crosses at \((0,2)\) and passes \((4,4)\).
- Read the y-intercept: \(b = 2\).
- Count the slope: \(m = \dfrac{4 – 2}{4 – 0} = \tfrac12\).
- Write it: \(y = \tfrac12 x + 2\).
Answer: \(y = \tfrac12 x + 2\)
Where You’ll Use It
Reading a line off a graph is how you turn a chart into a usable formula — a trend line on a scatter plot, a distance-time graph, a supply curve. Once you have \(y = mx + b\), you can predict values the graph doesn’t directly show.
Slip-Ups That Cost Easy Points
- Reading run over rise. Slope is vertical change over horizontal change — count up/down first.
- Missing a negative slope. If the line falls to the right, \(m\) is negative.
- Guessing between gridlines. Use points where the line hits exact lattice corners.
- Stopping at the slope. Include the y-intercept; the equation needs both \(m\) and \(b\).
Your Turn: Write the Equation
Each line crosses at the first point and passes through the second. Write \(y = mx + b\). Reveal to check.
- \((0,0)\) and \((2,6)\)
- \((0,5)\) and \((5,0)\)
- \((0,-4)\) and \((2,2)\)
- \((0,2)\) and \((4,4)\)
Show answers
- \(\color{blue}{y = 3x}\)
- \(\color{blue}{y = -x + 5}\)
- \(\color{blue}{y = 3x – 4}\)
- \(\color{blue}{y = \tfrac12 x + 2}\)
Make Your Own Worksheet
Generate fresh read-the-graph problems with a full answer key — print or save as a PDF.
Frequently Asked Questions
How do I write a line’s equation from a graph?
Read the y-intercept where the line crosses the y-axis, count the slope as rise over run between two grid points, then write \(y = mx + b\).
Which two points should I pick for the slope?
Choose points where the line passes exactly through grid intersections, so the rise and run are whole numbers you can count confidently.
How do I know if the slope is negative?
If the line goes down as you move to the right, the slope is negative; if it goes up, it’s positive.
What if the line is horizontal or vertical?
A horizontal line is \(y = b\) (slope 0); a vertical line is \(x = a\) (undefined slope) and can’t be written as \(y = mx + b\).
Related Topics
Continue Your Study
Ready for the next step? Pick up right where this lesson leaves off:
Related to This Article
More math articles
- A Complete Exploration of Integration by Parts
- The Ultimate 6th Grade Common Core Math Course (+FREE Worksheets)
- How to Find Discontinuities of Rational Functions?
- Free Grade 8 English Worksheets for Arkansas Students
- What does PSAT Stand for?
- The Ultimate KAP Algebra 1 Course (+FREE Worksheets)
- Factoring Calculator (Trinomials, Free)
- 6th Grade PARCC Math FREE Sample Practice Questions
- Analyzing the Mikki Mase Gambling Strategy Using Math
- Matching a Model with a Ratio

















What people say about "How to Write an Equation from a Graph? - Effortless Math"?
No one replied yet.