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.

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

What people say about "How to Write Linear Equations from Graphs - Effortless Math"?

No one replied yet.

Leave a Reply

X
51% OFF

Limited time only!

Save Over 51%

Take It Now!

SAVE $55

It was $109.99 now it is $54.99

The Ultimate Algebra Bundle 2026: From Pre-Algebra to Algebra II