# Find the Function of a Graph

It’s important, when working with linear functions, to be able to find the equation of a linear function by reading a graph of the function.

It’s actually a lot easier than it sounds, as long as you remember that all linear functions graph as straight lines that are written as $f\left(x\right)=ax+b$, where $a$ is the slope and $b$ $y$-intercept (the constant term). Here are instructions for how to do it:

Rule

### FindingtheEquationofaFunctionfromaGraph

1.
Calculate the slope $a$, either by the formula for the slope, or by manually counting how much $y$ increases or decreases by when you move $x$ one place to the right.
2.
Find the $y-intercept$ $b$ by locating where the graph intersects the $y$-axis.
3.
Insert the values into the expression $f\left(x\right)=ax+b$.

Example 1

Find the equation of the function from the graph.

1.
Use the formula for the slope: $\begin{array}{lll}\hfill a=\frac{0-16}{4-0}=\frac{-16}{4}=-4& \phantom{\rule{2em}{0ex}}& \hfill \end{array}$

You can also find the answer graphically by moving along the $x$-axis one place to the right. You can see that the $y$-value goes from 16 to 12. That means it decreases by $16-12=4$. Thus, the slope is $-4$.

2.
Find the $y$-intercept, $b$, on the graph. From the drawing, you can see that the graph intersects the $y$-axis at $y=16$.
3.
Insert the values into the expression $f\left(x\right)=ax+b$.
4.
You get $f\left(x\right)=-4x+16$, the function of this graph.