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

Graph from slope-intercept equation

To graph a linear equation in slope-intercept form, we can use the information given by that form. For example, y=2x+3 tells us that the slope of the line is 2 and the y-intercept is at (0,3). This gives us one point the line goes through, and the direction we should continue from that point to draw the entire line. Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • blobby green style avatar for user halia.harrop
    my mind is already fried, i cant do this lol
    (39 votes)
    Default Khan Academy avatar avatar for user
  • piceratops sapling style avatar for user chris acevedo
    After all of this i still don't get it
    (23 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user Shayan Rehman
    since your y intercept was a negative shouldn't the slope be a negative
    (1 vote)
    Default Khan Academy avatar avatar for user
  • duskpin sapling style avatar for user SAMANTHA879
    After watching this video, I'm still confused. I wish there was a way to get a video on the questions I'm getting. For example: y=3x-3 or y=-x+1 or y=1/2x-2. I am visual, it would teach me much better. But whatever, I'll keep trying!
    (13 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user BruinWarrior
      Your examples work the same way as the video. The constant term will always be your y-intercept, and the coefficient of x will always be your slope. Once you plot your y-intercept, plot another point using your slope. Then connect the dots! If you want to make sure you got it correct, you can also plot an extra point, but you don't have to.
      (1 vote)
  • marcimus pink style avatar for user Kang
    How would you write 6x+5y=20 in plot-intercept form. I can't seem to figure out how you can divide 6x by 5.
    The video is great. Thanks
    (4 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user sbi
      So you're trying to put 6x+5y=20 into y=mx+b.

      Let's try it step by step:
      6x+5y=20
      6x+5y(-6x)=20(-6x) --> 5y=20-6x
      5y(/5)=20-6x (/5) --> y=4-6x/5 (whether you write it as 6x/5 or (6/5)x.. it doesn't really matter, because it's the same thing)

      I hope that helps - I see where you are getting confused. That was also my problem when I was learning this...
      (12 votes)
  • duskpin ultimate style avatar for user Henry Burris
    But in my question, I don't have a fraction and therefore don't know the slope. What do I do?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      If your equation is of the form: y=mx+b, then you do have a slope. The slope does not need to look like a fraction. For example:
      y=2x-5. The slope=2. As a fraction this is 2/1.
      y=x-5. The slope=1. As a fraction this is 1/1
      y=0.5x-3. The slope=0.5, which in fraction form is 1/2

      Hope this helps.
      (11 votes)
  • piceratops ultimate style avatar for user FireNinja 火 忍 者
    Would the change in Y over the change in X be the same as rise/run(rise over run) ? Rise being the the change in Y and run being the change in X. I learned it differently and wasn't sure if it was the same equation.
    (4 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Rico
    okay so i know how to get the answer is but i want to know if by using the foil method or using the k,c,f keep,change,flip
    (3 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      What exactly do you mean? This video is about linear functions, FOIL deals with expanding two binomials which are quadratic fucntions, and KFC deals with dividing fractions. You are dealing with three different things and you are somehow trying to use all three as if they are different ways of doing the same thing. You need to learn each separately for the purpose they are intended to do.
      (3 votes)
  • leaf green style avatar for user dakota.parmiter
    would if m is not a fraction
    (3 votes)
    Default Khan Academy avatar avatar for user
    • old spice man green style avatar for user jmascaro
      Hello Dakota,
      If the slope (m) is a whole number, like 2, you still interpret it as a fraction (2/1). Remember that slope can be interpreted as rise/run, where the numerator is how many places you move up or down and the denominator is how many places you move left or right. So if you have a slope of 4/5, for every 4 places you move up, you move 5 places to the right.

      If your slope is 2, read it as 2/1, which means that for every 2 places you move up, you move 1 place to the right.

      Hope that helps :-)
      (3 votes)
  • piceratops ultimate style avatar for user Yashwant Pallapolu
    Can the formula for Slope Interpret form be y=mx-b
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

We are asked to graph y is equal to 1/3x minus 2. Now, whenever you see an equation in this form, this is called slope-intercept form. And the general way of writing it is y is equal to mx plus b, where m is the slope. And here in this case, m is equal to 1/3-- so let me write that down-- m is equal to 1/3, and b is the y-intercept. So in this case, b is equal to negative 2. And you know that b is the y-intercept, because we know that the y-intercept occurs when x is equal to 0. So if x is equal to 0 in either of these situations, this term just becomes 0 and y will be equal to b. So that's what we mean by b is the y-intercept. So whenever you look at an equation in this form, it's actually fairly straightforward to graph this line. b is the y-intercept. In this case it is negative 2, so that means that this line must intersect the y-axis at y is equal to negative 2, so it's this point right here. Negative 1, negative 2, this is the point 0, negative 2. If you don't believe me, there's nothing magical about this, try evaluating or try solving for y when x is equal to 0. When x is equal to 0, this term cancels out and you're just left with y is equal to negative 2. So that's the y-intercept right there. Now, this 1/3 tells us the slope of the line. How much do we change in y for any change in x? So this tells us that 1/3, so that right there, is the slope. So it tells us that 1/3 is equal to the change in y over the change in x. Or another way to think about it, if x changes by 3, then y would change by 1. So let me graph that. So we know that this point is on the graph, that's the y-intercept. The slope tells us that if x changes by 3-- so let me go 3 three to the right, 1, 2, 3-- that y will change by 1. So this must also be a point on the graph. And we could keep doing that. If x changes by 3, y changes by 1. If x goes down by 3, y will go down by 1. If x goes down by 6, y will go down by 2. It's that same ratio, so 1, 2, 3, 4, 5, 6, 1, 2. And you can see all of these points are on the line, and the line is the graph of this equation up here. So let me graph it. So it'll look something like that. And you're done.