Ctrl+k

Write an equation from a graph

A straight-line graph is translated into an equivalent linear equation, typically y=mx+by=mx+b, by interpreting the slope mm as the constant rate of change and the yy-intercept bb as the value of yy when x=0x=0. The reasoning includes reading the graph’s scale, determining slope from two points, and distinguishing the yy-intercept from the xx-intercept; nonlinear, piecewise, and more abstract forms are outside this scope.

Detailed Explanation: Write an equation from a graph

A straight-line graph can be written as

y=mx+by=mx+b

where:

  • mm is the slope, or rate of change.
  • bb is the yy-intercept, where the line crosses the yy-axis.

Example

Suppose a graph shows a line passing through the points (0,2)(0,2) and (3,8)(3,8).

Step 1: Find the yy-intercept

The yy-intercept is the point where x=0x=0. The graph includes (0,2)(0,2), so

b=2b=2

Step 2: Find the slope

Use two points on the line:

m=change in ychange in xm=\frac{\text{change in }y}{\text{change in }x}

From (0,2)(0,2) to (3,8)(3,8):

  • The change in yy is 82=68-2=6.
  • The change in xx is 30=33-0=3.

Therefore,

m=63=2m=\frac{6}{3}=2

The line rises 22 units for every 11 unit it moves to the right.

Step 3: Substitute into y=mx+by=mx+b

Use m=2m=2 and b=2b=2:

y=2x+2\boxed{y=2x+2}

Check that bb is the yy-intercept, not the xx-intercept. The yy-intercept is where the graph crosses the vertical yy-axis.

Learn by doing: Write an equation from a graph

Click a topic below to practice the foundational skills you'll need, learn the steps, or master this skill

Practice with unlimited practice problems

Slope of a Line - Select Linear Equation Based on Graph


    ?