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

Graphing slope-intercept form

Learn how to graph lines whose equations are given in the slope-intercept form y=mx+b.
If you haven't read it yet, you might want to start with our introduction to slope-intercept form.

Graphing lines with integer slopes

Let's graph y=2x+3.
Recall that in the general slope-intercept equation y=mx+b, the slope is given by m and the y-intercept is given by b. Therefore, the slope of y=2x+3 is 2 and the y-intercept is (0,3).
In order to graph a line, we need two points on that line. We already know that (0,3) is on the line.
Additionally, because the slope of the line is 2, we know that the point (0+1,3+2)=(1,5) is also on the line.

Check your understanding

Problem 1
Graph y=3x1.

Problem 2
Graph y=4x+5.

Graphing lines with fractional slope

Let's graph y=23x+1.
As before, we can tell that the line passes through the y-intercept (0,1), and through an additional point (0+1,1+23)=(1,123).
While it is true that the point (1,123) is on the line, we can't plot points with fractional coordinates as precisely as we draw points with integer coordinates.
We need a way to find another point on the line whose coordinates are integers. To do that, we use the fact that in a slope of 23, increasing x by 3 units will cause y to increase by 2 units.
This gives us the additional point (0+3,1+2)=(3,3).

Check your understanding

Problem 3
Graph y=34x+2.

Problem 4
Graph y=32x+3.

Want to join the conversation?

  • blobby green style avatar for user 682060
    How come if the negative sign is next to the fraction it causes the rise to be negative but not the run
    (47 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Think about the fraction as division... How do you get a negative number when dividing:
      a negative divided by a positive = a negative
      a positive divided by a negative = a negative

      As you can see, only one of the 2 numbers can be negative. Thus, for a slope like -4/5, you can apply the negative sign to the numerator which would tell you to go down 4 units, then right 5 units. Or, you can apply the negative to the denominator which would make you go up 4 units and left 5 units.

      If you make both numbers negative, then you are doing: negative divided by negative = positive. And, you would have a positive slope.

      Hope this helps.
      (101 votes)
  • aqualine sapling style avatar for user wesley jones
    i don't really get it why in the last exercise the slope is -3/2 you ad plus 2 for the change in x but minus 3 for the change in y.
    (35 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      When you have a negative slope, like -3/2 then one of the numbers must be negative (remember, negative divided by positive = negative; and positive divided by negative = negative).

      So, when you interpret the slope of -3.2...
      1) You can do -3 for change in Y (move down 3 units) and +2 for X (move right 2 units). OR... 2) You can do +3 for change in Y (up 3 units) and -2 for X (move left 2 units).
      Hope this helps.
      (79 votes)
  • starky tree style avatar for user 20nlion
    im having some trouble... anybody have some helpful tips hehehe
    (16 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Zachary Heaton
      place you first point on the y axis +/-. Then turn the slope into a fraction.
      Slope: The positive or negative sign determine if the line goes up or down from the y intercept. Based on that, going left to right, if it is a negative travel down the numerator, travel right the denominator.

      Y=27/3x+1 Place first point on y axis at positive 1. Then travel up 27, then go right 3. Simplified, you would go up 9, and right 1.
      (3 votes)
  • starky seed style avatar for user gjp100
    I don't have a clue on how to do this
    (15 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      If you have an equation in slope-intercept form, you know both a point (the y intercept) and the slope, so it should be relatively easy to graph especially with a little practice. So if you have y=3x-4, the slope is 3=3/1, the y intercept is (0,-4). We can plot the point by starting at the origin and counting down 4 to get to (0,-4) and put a dot at this point. With a slope of rise (up) 3 over run (right) 1, you get to (0+1,-4+3) which is (1,-1), and a second time (1+1,-1+3) which is (2,2) and you have three points to draw a line through. One more example, if you have y=-3/4x + 2, you have a point (0,2) and a slope of -3/4 (rise down 3 right 4). This gives a second point of (0+4,2-3) or (4,-1) and (4+4,-1-3) or (8,-4) to draw a line. So start with the y intercept, and count the slope from that point.
      (14 votes)
  • piceratops seedling style avatar for user Devss
    How do I graph a line if the slope isn't provided? Here is what I mean:

    y=-x+6

    How do I graph it if I do not know the slope? Thanks!
    (14 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Envy
    Not to be that person but like When am I reallyyyyyyyyyyyy going to use this in everyday life?
    (11 votes)
    Default Khan Academy avatar avatar for user
  • aqualine sapling style avatar for user wesley jones
    i don't really get it why in the last exercise the slope is -3/2 you ad plus 2 for the change in x but minus 3 for the change in y.
    (9 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user mukhopadhyayaveri14
    I can't understand how to graph an equation with a fraction y-intercept. Ex: y=2x-1/2
    (5 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Put a point at (0, -1/2). It is half-way between 0 and -1.
      Since the slope is 2, you move up 2 units and right 1.
      -- Up 1 unit takes you to 1/2, up 2 units takes you to 1 1/2 (halfway between 1 and 2).
      -- Then, go right 1 unit. You should now be at the point 1 1/2, 1)

      Hope this helps.
      (11 votes)
  • starky seedling style avatar for user bail380001
    what if the question is y=x+4
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user 563080
    what is the difference between zero slope and no slope.
    (1 vote)
    Default Khan Academy avatar avatar for user