How to Write an Equation from a Graph?

How to Write an Equation from a Graph?
Algebra 1

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.

Illustration of students learning Write an Equation from a Graph

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

The big idea

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

  1. Find the y-intercept \(b\) where the line crosses the y-axis.
  2. Count the slope \(m\) (rise over run) between two grid points.
  3. Write \(y = mx + b\).
Tutor tip: Choose two points where the line passes exactly through grid corners. Reading a slope off “between the lines” leads to guessing.
Reading the line

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

Worked Examples

A. Positive slope

A line crosses at \((0,1)\) and passes \((2,5)\).

\(b = 1\), slope \(= \tfrac{5-1}{2-0} = 2\). \(y = 2x + 1\).

B. Negative slope

A line crosses at \((0,3)\) and passes \((1,1)\).

\(b = 3\), slope \(= \tfrac{1-3}{1-0} = -2\). \(y = -2x + 3\).

C. Through the origin

A line crosses at \((0,0)\) and passes \((2,6)\).

\(b = 0\), slope \(= 3\). \(y = 3x\).

D. A gentle slope

A line crosses at \((0,2)\) and passes \((4,4)\).

\(b = 2\), slope \(= \tfrac{4-2}{4-0} = \tfrac12\). \(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.

  1. \((0,0)\) and \((2,6)\)
  2. \((0,5)\) and \((5,0)\)
  3. \((0,-4)\) and \((2,2)\)
  4. \((0,2)\) and \((4,4)\)
Show answers
  1. \(\color{blue}{y = 3x}\)
  2. \(\color{blue}{y = -x + 5}\)
  3. \(\color{blue}{y = 3x – 4}\)
  4. \(\color{blue}{y = \tfrac12 x + 2}\)
Keep practicing

Make Your Own Worksheet

Generate fresh read-the-graph problems 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 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

What people say about "How to Write an Equation from a Graph? - Effortless Math: We Help Students Learn to LOVE Mathematics"?

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: From Pre-Algebra to Algebra II