If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Lesson 7: Writing slope-intercept equations

# Slope-intercept form from a table

Learn how to write an equation of the line that matches up to a table of values. Created by Sal Khan.

## Want to join the conversation?

• This just seems really confusing, is there any other easier way to learn this?
• It's really all about substituting. Taking your time helps a lot. It is difficult at first, and probably even harder to explain without confusing someone (I have experience!), but I advise you find some good websites to explain this...

Do you remember doing function tables with the input and output when you were a kid? It's almost the same exact thing...
You need to focus on the relationship between x and y -- trial and error helps, too.

y = ___x + ____

If y always = 2.....
y = 0x + 2 (no matter what x equals, y always equals 2 ---- so when you multiply x by 0 and then add 2, regardless of the x-value, y is ALWAYS equal to 2.)
0x = 0, just like 0 times 1 = 0 ---> anything times 0 is 0.
y = 2

Hope this helps a little! Sorry, if it doesn't! Good luck, anyway!
• So when u look at a table do u want to see how much it goes by each time
• At , why is the slope 0 and not 2? Somebody explain, please!
• The slope is easiest to understand in a graph. A slope of 2 means that the graph line goes up 2 units when you go right 1 unit. See for example this image: http://prepfortests.com/files/images/geometry/cartesianline.png Here if you go from x = 0 to x = 1, y changes from -3 to -1. In other words, you go up 2 units, so the slope is 2.

In the video however, the y value is always equal to 2. If you graph this, you simply get a horizontal line, as in this image: http://cdn-6.ask-math.com/images/Linegraph-1.png What is the slope in that image? Well, how much does the line go up when you go right 1 unit? If you go from x = 0 to x = 1 for example, y always stays 2. So you go up 0 units, and the slope is 0.
• I am so confused, is there a simple way to solve this?
• I'm afraid this is the simpler way. Need a hand?
• At Sal says that Y is always zero, but wouldn't it be two?
• This is because the slope means how much you move in order to get to the next point. Since, the number remains as 2 no matter how much the x-value changes, it would be 0. However, if it was actually 2, the y-coordinates would change 2 units to the right for each change in the x-intercept
• I thought Y is the intercept and X is the slope. Why is it different in the Video?
• Actually, m is the slope and b is the y-intercept. Y is simply to show where on the y-axis, the line is supposed to be located. Hope I helped!
• what if there are 6 sets of coordinates?
• It doesn't matter what 2 coordinates you pick out. For example, let's pick out 2 coordinates, like (2, 4) and (7, 2). (2, 4) is the starting point and (7, 2) is the ending point. We first solve the slope which is shown below here:

2-4=-2 <--- numerator
7-2=5 <---- denominator

Now that we have solved for the slope, which is -2/5, let's solve for the y-intercept. Let's use (7, 2) to plug into the equation.

2=-2/5(7)+b ----> 2=-14/5+b ----> 24/5=b

Now this is your slope-intercept equation: y=-2/5x+24/5
(1 vote)
• Does it matter what point you choose to solve for (b) ?
• Nope not at all, since all the coordinates for the function are the input and output. It doesn't matter because the points on the line follow the same pattern or function.
• how do i write an equation with graph points like y intercept =-5 and slope = 3
• The general format of slope-intercept form equations is y=mx+b
m is where you substitute the slope
b is where you substitute the y-intercept

So, if I had y-intercept = 7 and slope = -2, the equation would be:
y=-2x+7