How do I use the graph of a linear function to find its equation?

1 Answer
Jan 4, 2015

If you have two points on the graph, you can calculate the equation.

Select any two point on the graph. It may make life easier to have two points that are on gridlines in your graph. If one of the points is the #y#-intercept, it makes life a lot easier.
(the #y#-intercept is the point where your graph crosses the vertical, or #y#-axis)

You want to find the equation #y=m*x+b#
where #m# is called the slope, and #b# the #y#-value at the #y#-intercept.

To calculate the slope #m#
Let's call the two points you selected #(x_1,y_1)# and #(x_2,y_2)#
Then the slope is how fast #y# changes relative to a change in #x#
Or in formula (in formulae, #Delta# means "change in..."):
#m=(Delta y)/(Delta x)=(y_2-y_1)/(x_2-x_1)#

To calculate the intercept #b#
If one of the points you selected is on the #y#-axis, then this #y#-value is equal to #b#.
Otherwise you fill in the equation #y=mx+b# with the values for one of the points:
#y_1=mx_1+b -> b=y_1-mx_1=y_1-(y_2-y_1)/(x_2-x_1)x_1#
(substituting the #m# you already calculated in the previous step)

One example
Step 1: finding #m#
Your points are #(-4,-2)# and #(4,0)#

#m=(y_2-y_1)/(x_2-x_1)=(0--2)/(4--4)=2/8=1/4#

Step 2 : finding #b#
Substitute #x# and #y# for the right point (because it's easier)
#y=mx+b ->0=1/4*4+b->0=1+b->b=-1#
The complete equation will be: #y=1/4x-1#
Step 3: check! your answer:
Fill in the #x# of you other point (you should get the proper #y#)
#1/4*(-4)-1=-1-1=-2#