How to Write Linear Equations from Graphs

How to Write Linear Equations from Graphs
Algebra 1

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.

Try it

Equation Solver (Solve for x)

Open the full calculator →

Type the problems from this lesson and check each step.

Tutor-style math help

Write Linear Equations from Graphs: what to notice and how to work it

Linear skill
Linear topics are about constant rate of change. The slope tells how fast y changes for each 1-unit change in x, and an intercept anchors the line on an axis.

What to notice first

Find the rate and one reliable point. With those two pieces, the line is determined.

Common student mistake

Do not mix up x-intercepts and y-intercepts. At an x-intercept, y = 0; at a y-intercept, x = 0.

Key formulas and cues

\(m=\frac{y_2-y_1}{x_2-x_1}\)
\(y=mx+b\)
\(y-y_1=m(x-x_1)\)
\(Ax+By=C\)
runrise yx

A reliable path

  1. Find slopeUse two points, a table, or the coefficient of x in slope-intercept form.
  2. Find an anchorUse a point or intercept so the line is in the right location.
  3. Check directionPositive slope rises left to right; negative slope falls left to right.

Worked examples

Find slope from two points

Example: \((1,4)\) and \((3,10)\)
  1. Change in y is 10 – 4 = 6.
  2. Change in x is 3 – 1 = 2.
  3. Divide rise by run.
Answer: \(m=3\)

Write slope-intercept form

Example: slope 3 and y-intercept -2
  1. Use y = mx + b.
  2. Put m = 3 and b = -2.
  3. Write the line.
Answer: \(y=3x-2\)
Try one before moving on
Try: Find the slope through \((2,1)\) and \((6,9)\).
Answer: \(m=\frac{9-1}{6-2}=2\).
Next step: do the matching worksheet or quiz while the method is still fresh, then come back and explain the first step in your own words.
Illustration of students learning How to Write Linear Equations From Graphs

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.

The big idea

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):

  1. Find the \(y\)-intercept \(b\), read where the line crosses the \(y\)-axis.
  2. Find the slope \(m\), pick two clear lattice points and count rise over run.
  3. Write \(y = mx + b\) with your two numbers.
Worked on the grid

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 equation
y = 2x + 2(0, 2)

Worked 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)\).

  1. Read the intercept where it crosses: \(b = 1\).
  2. Slope: \(m = \dfrac{3 – 1}{4 – 0} = \tfrac12\).
  3. Write it: \(y = \tfrac12 x + 1\).

Answer: \(y = \tfrac12 x + 1\)

y = ½x + 1(4, 3)

Example B, A downhill line

A line passes through \((0,3)\) and \((2,-1)\).

  1. Read the intercept: \(b = 3\).
  2. Slope: \(m = \dfrac{-1 – 3}{2 – 0} = -2\) (falls to the right).
  3. Write it: \(y = -2x + 3\).

Answer: \(y = -2x + 3\)

y = −2x + 3(2, -1)

Example C, Intercept not given directly

A line passes through \((1,1)\) and \((3,5)\).

  1. Slope: \(m = \dfrac{5 – 1}{3 – 1} = 2\).
  2. Solve for \(b\) with a point: \(1 = 2(1) + b\), so \(b = -1\).
  3. Write it: \(y = 2x – 1\).

Answer: \(y = 2x – 1\)

y = 2x − 1(3, 5)

Example D, A fractional slope

A line passes through \((0,4)\) and \((2,3)\).

  1. Read the intercept: \(b = 4\).
  2. Slope: \(m = \dfrac{3 – 4}{2 – 0} = -\tfrac12\).
  3. Write it: \(y = -\tfrac12 x + 4\).

Answer: \(y = -\tfrac12 x + 4\)

y = −½x + 4(2, 3)

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.

  1. \((0,1)\) and \((1,4)\)
  2. \((0,5)\) and \((5,0)\)
  3. \((0,-3)\) and \((2,1)\)
  4. \((-2,0)\) and \((0,4)\)
  5. \((0,3)\) and \((4,3)\)
Show answers
  1. \(\color{blue}{y=3x+1}\)
  2. \(\color{blue}{y=-x+5}\)
  3. \(\color{blue}{y=2x-3}\)
  4. \(\color{blue}{y=2x+4}\)
  5. \(\color{blue}{y=3 \text{ (slope }0\text{, a horizontal line)}}\)
Keep practicing

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.

New problems every click, never the same sheet twice
Step-by-step answer key so you can self-check
✍

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

What people say about "How to Write a Linear Equation from a Graph (Step by Step)"?

No one replied yet.

Leave a Reply