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.

Main content

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?

  • mr pants teal style avatar for user NicholasStarosta
    This just seems really confusing, is there any other easier way to learn this?
    (11 votes)
    Default Khan Academy avatar avatar for user
    • leafers tree style avatar for user maggieyoung7
      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!
      (10 votes)
  • marcimus pink style avatar for user Seras Victoria
    So when u look at a table do u want to see how much it goes by each time
    (4 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Elziule
    At , why is the slope 0 and not 2? Somebody explain, please!
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user Muskan Nehra
    I am so confused, is there a simple way to solve this?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • starky tree style avatar for user Cian Knight
    At Sal says that Y is always zero, but wouldn't it be two?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Shraavya
      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
      (2 votes)
  • old spice man blue style avatar for user Mikeify
    I thought Y is the intercept and X is the slope. Why is it different in the Video?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Benjamin Kim
    Does it matter what point you choose to solve for (b) ?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seed style avatar for user lucky Moe
    what if there are 6 sets of coordinates?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Yana
    how do i write an equation with graph points like y intercept =-5 and slope = 3
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user poeticlime18
    How would you find the slope if it's a scatter plot data table?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user mathmathmath
      For example lets say you have two points from the first x and y values in the data table which are (9, 20) and (30, 50). You would set up an equation by doing m=second y- first y / second x - first x. So in this example: 50-20/30-9= 10/7=m. So your slope would be 10/7.
      (4 votes)

Video transcript

A line goes through the following points, and the equation of that line is written in y equals mx plus b form. Also known as slope-intercept form. What is the equation of the line? So the first thing we want to think about, what is the slope of this line? What is m here? So what is our change in y for given change in x? So this is an interesting example here. And I encourage you to pause the video and try it out yourself. Because no matter how much we change x, y is not changing. y is a constant, 2. So your change in y between any two points is going to be 0. It doesn't matter what your change in x is, your change in x could be 1, your change in x could be 4, your change in y is always 0. So y is not changing as you change x. So your slope for this relationship is actually 0. Y is equal to 0x plus-- and then, you could just realize that the equation of this is just that y is always equal to 2. So it's 0x plus 2, which is the same thing as y is equal to 2. You could substitute back in. You could say OK, well, if y is equal to 0x plus b, that means that y is equal to b. Well, y is always equal to 2, no matter what thing you pick, so b is equal to 2. So either way, this just boils down to y is equal to 0x plus 2, or y is just equal to 2. Let's do another one of these. Maybe one where the y is actually changing. So here, the y is clearly actually changing. So let me copy and paste this. I want to put on my scratch pad. We can work it out. So we'll stick it right over here. And then we are told a line goes through the-- OK, so same thing. The line goes through these points with the equation of a line. So the main idea here is, you only need 2 points for an equation of line. They've given us more than necessary. So I'd like to pick the two points that make things a little bit simpler. So I'll pick the point 4, 2 and 7, 0. I just picked those two points because they have nice, clean numbers associated with it. So what is our change in x here? So our change in x here, if we go from 4 to 7, our change in x is equal to 3. And what's our change in y here? So we went up from 4 to 7. We increased by 3. Our y decreased by 2. Change in y is equal to negative 2. So our slope, which is equal to change in y over change in x, is equal to negative 2/3. And if you wanted to relate that to the formulas that you normally see for slope, you're just looking at your end point. So this is y2 minus y1, which is negative 2 over x2 minus x1, which is 7 minus 4. But that just boils down to negative 2/3. And so our equation is going to be y is equal to negative 2/3 x plus b. So let's substitute one of these points in here, to figure out what our b must be. And once again, I want to figure out something where this is going to become nice and clean. But this isn't going to be really clean for any of these numbers right over here. If we had a 3 for x, or a 6 for x, or a 0 for x, then things would work out nicely. But they don't give us any of those. So let's just try the 7 and the 0. So when x is equal to 0-- sorry, when x is equal to 7-- y is equal to 0. So when x is equal to 7, I'll just do it in the same color, y is equal to 0. So 0 is equal to negative 2/3 times 7 plus b, or 0 is equal to negative 14/3 plus b. Add 14/3 to both sides, you get 14/3 is equal to b. So this is going to be y is equal to negative-- I'm going to go back to the other screen-- so y is equal to negative 2/3 x plus 14/3. So let me do that. So y is equal to negative 2/3 x plus 14/3. Let's check our answer. We got it right.