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.
Type the problems from this lesson and check each step.
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 you make a linear equation from a graph?
Pick two points where the line crosses grid corners exactly, find the slope as rise ÷ run, and read the y-intercept where the line meets the y-axis. Then write y = mx + b. If a line passes through (0, 1) and (2, 5), it rises 4 while running 2, so m = 2 and b = 1, giving y = 2x + 1.
How do you write linear equations from graphs and tables?
With a table, find the slope by dividing the change in y by the change in x between any two rows, then find the y-value when x = 0. For a table with x = 0, 1, 2 and y = 5, 2, −1, y drops 3 each time x rises 1, so m = −3 and b = 5, giving y = −3x + 5. On a graph, read the same two pieces from the line.
How do you write linear equations from situations and graphs?
Decide what x and y stand for, then look for a starting value and a constant rate. A 12-inch candle that burns 1.5 inches per hour starts at y = 12 and falls 1.5 each hour, so y = −1.5x + 12. Its graph starts at (0, 12) on the y-axis and slopes downward, reaching zero at x = 8 hours.
What are the ways to graph linear equations?
There are three common ways: use slope-intercept form, make a table of values, or plot the two intercepts. For 2x + 3y = 6, the intercept method is quickest: set y = 0 to get (3, 0) and x = 0 to get (0, 2), then draw the line through them. Rewriting it as y = −(2/3)x + 2 gives the same line.
Is there a writing linear equations from graphs worksheet?
Yes. Effortless Math has a Write the Equation worksheet maker that builds printable sets of graphed lines to practice with. For each graph, circle two clear lattice points, compute rise over run, read the y-intercept, and write the equation. Check every answer by plugging one of your points back in to see that both sides agree.
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
- How to Use Parallelogram Rule for Vector Addition and Subtraction
- Best Laptops for Teachers
- The Best Grade 8 Math Book for Delaware Students
- 5 Best AFOQT Math Study Guides
- Praxis 8004 Civics: Right, Legal Duty, or Civic Responsibility? (2027 Prep)
- Mean Median Mode Calculator
- A 4-Week Grade 4 ELA Study Plan: Reading, Writing, Vocabulary, and Review That Actually Fits Real Life
- Free Grade 3 Math Worksheets for Minnesota Third Graders: 49 MCA-Aligned PDFs with Solutions
- Meaning in Context: Using the Sentence as Evidence
- Gas Laws: Pressure, Volume and Kelvin Temperature


What people say about "How to Write a Linear Equation from a Graph (Step by Step)"?
No one replied yet.