How to Write Linear Equations from Graphs
How to Write Linear Equations From Graphs
Reading a line off a graph and writing its equation is a two-step move: find the slope (rise over run) and read the y-intercept. Put them into \(y = mx + b\) and you’re done. We’ll practice it with verified graphs, a solver, drills, and a worksheet maker a tap away.
Write Linear Equations from Graphs: what to notice and how to work it
What to notice first
Common student mistake
Key formulas and cues
A reliable path
- Find slopeUse two points, a table, or the coefficient of x in slope-intercept form.
- Find an anchorUse a point or intercept so the line is in the right location.
- Check directionPositive slope rises left to right; negative slope falls left to right.
Worked examples
Find slope from two points
- Change in y is 10 – 4 = 6.
- Change in x is 3 – 1 = 2.
- Divide rise by run.
Write slope-intercept form
- Use y = mx + b.
- Put m = 3 and b = -2.
- Write the line.
Try one before moving on
Write Linear Equations from Graphs: pop-up practice

Graphing a line turns an equation into a picture. Writing a linear equation from a graph is the reverse trip: you look at a line and figure out the \(y = mx + b\) that made it. It’s a two-part read — find the slope, find the \(y\)-intercept — and then you just assemble the equation. Once you’ve done a few, you’ll read lines like sentences.
Read the Slope, Read the Intercept
Every straight line is \(y = mx + b\). A graph hands you both pieces if you know where to look: \(b\) is where the line crosses the \(y\)-axis, and \(m\) is the rise over run between any two points you can read cleanly.
How to write a line’s equation from its graph (3 steps):
- Find the \(y\)-intercept \(b\) — read where the line crosses the \(y\)-axis.
- Find the slope \(m\) — pick two clear lattice points and count rise over run.
- Write \(y = mx + b\) with your two numbers.
Reading this line
The line crosses the \(y\)-axis at \((0,2)\), so \(b = 2\). From \((0,2)\) to \((2,6)\) it rises 4 and runs 2, so \(m = \tfrac{4}{2} = 2\). Assemble: \(y = 2x + 2\).
⚡ Find a line’s equationWorked Examples
Read the slope and intercept off each line drawn below, then assemble \(y = mx + b\).
Example A — A gentle uphill line
A line passes through \((0,1)\) and \((4,3)\).
- Read the intercept where it crosses: \(b = 1\).
- Slope: \(m = \dfrac{3 – 1}{4 – 0} = \tfrac12\).
- Write it: \(y = \tfrac12 x + 1\).
Answer: \(y = \tfrac12 x + 1\)
Example B — A downhill line
A line passes through \((0,3)\) and \((2,-1)\).
- Read the intercept: \(b = 3\).
- Slope: \(m = \dfrac{-1 – 3}{2 – 0} = -2\) (falls to the right).
- Write it: \(y = -2x + 3\).
Answer: \(y = -2x + 3\)
Example C — Intercept not given directly
A line passes through \((1,1)\) and \((3,5)\).
- Slope: \(m = \dfrac{5 – 1}{3 – 1} = 2\).
- Solve for \(b\) with a point: \(1 = 2(1) + b\), so \(b = -1\).
- Write it: \(y = 2x – 1\).
Answer: \(y = 2x – 1\)
Example D — A fractional slope
A line passes through \((0,4)\) and \((2,3)\).
- Read the intercept: \(b = 4\).
- Slope: \(m = \dfrac{3 – 4}{2 – 0} = -\tfrac12\).
- Write it: \(y = -\tfrac12 x + 4\).
Answer: \(y = -\tfrac12 x + 4\)
Reading Lines in the Wild
Whenever you see a straight-line graph in the real world, you can write its equation — and then predict with it. A graph of a phone bill that starts at $20 and rises $0.10 a minute reads off as \(y = 0.10x + 20\). A savings line starting at $50 and climbing $25 a week is \(y = 25x + 50\). The intercept is “where you started,” the slope is “how fast it changes,” and the equation lets you jump to any week without re-reading the graph.
Easy Points to Lose
- Reading run over rise. Slope is rise (vertical) over run (horizontal). Count up/down first, then across.
- Missing a negative intercept or slope. If the line crosses below the origin, \(b\) is negative; if it falls to the right, \(m\) is negative. Watch the direction.
- Using points that aren’t on the gridlines. Pick two points where the line crosses exact lattice intersections, or your rise/run will be a guess.
- Stopping at the slope. The equation needs both \(m\) and \(b\). If the intercept isn’t obvious, solve for \(b\) using a known point.
- Forcing a vertical line into \(y=mx+b\). A vertical line has undefined slope and can’t be written that way — it’s \(x = a\), not a \(y=\dots\) equation.
Your Turn: Write the Equation
Each line passes through the two given points. Write its \(y = mx + b\). Reveal to check.
- \((0,1)\) and \((1,4)\)
- \((0,5)\) and \((5,0)\)
- \((0,-3)\) and \((2,1)\)
- \((-2,0)\) and \((0,4)\)
- \((0,3)\) and \((4,3)\)
Show answers
- \(\color{blue}{y=3x+1}\)
- \(\color{blue}{y=-x+5}\)
- \(\color{blue}{y=2x-3}\)
- \(\color{blue}{y=2x+4}\)
- \(\color{blue}{y=3 \text{ (slope }0\text{, a horizontal line)}}\)
Make Your Own “Write the Equation” Worksheet
Generate fresh lines to read and write, with a full answer key — print or save as a PDF.
Frequently Asked Questions
How do I find the \(y\)-intercept from a graph?
Look at where the line crosses the vertical \(y\)-axis. The \(y\)-value at that point is \(b\). If it crosses at \((0,-3)\), then \(b=-3\).
How do I find the slope from a graph?
Pick two points the line passes through cleanly, count the rise (up/down) and the run (left/right) between them, and write rise over run. Down or left counts as negative.
What if the line doesn’t show the \(y\)-intercept?
Find the slope first, then plug one known point into \(y=mx+b\) and solve for \(b\). For slope 2 through \((1,1)\): \(1=2(1)+b\), so \(b=-1\).
What about horizontal or vertical lines?
A horizontal line has slope \(0\), so its equation is just \(y=b\) — the height where it sits (for example \(y=3\)). A vertical line has undefined slope and can’t be written as \(y=mx+b\); it’s \(x=a\), the \(x\)-value it passes through.
How can I check my equation?
Plug both points into your equation — if each makes it true, the equation is right. You can also graph it back and confirm it matches the original line.
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
- 3rd Grade SBAC Math FREE Sample Practice Questions
- Free Grade 5 English Worksheets for ACT Aspire Students
- 10 Most Common 6th Grade MCAS Math Questions
- 7th Grade MEAP Math FREE Sample Practice Questions
- How to Find the Period of a Function?
- Point-Slope Form Worksheet with Answers
- How to Unravel the Essential Properties of Rectangles
- 5th Grade MEAP Math Worksheets: FREE & Printable
- Free Grade 6 English Worksheets for Nevada Students
- The Best Grade 7 ELA Practice Tests for Missouri Students












What people say about "How to Write Linear Equations from Graphs - Effortless Math"?
No one replied yet.