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.

# Slope-intercept equation from graph

Learn to write equations in slope-intercept form for three different lines. Created by Sal Khan.

## Want to join the conversation?

• can someone please explain linear equations?
• All that the slope-intercept form (the equation to describe linear equations) is, is an equation (y=mx+b) where m (the number that multiples x) is the slope and b (the number that is not multiplying a variable on the right-hand side of the equation) is the y-intercept. The x and the y don't really do anything in this case so you can ignore them. An easy way to see this equation is y=(the slope)x+the y-intercept. Hope this helps!
• Why does "b" represent the y-intercept? Did someone just choose a random letter to represent it? Who chose what the y-intercept would be represented by?
• I think it's because y and b are both the second letter in the oft used groups: a, b, c, and x, y, z. b is the point on the line that falls on the y-axis, but we can't call it 'y' so we call it 'b' instead.
Some of this is pretty arbitrary. I'm working with a system right now that calibrates using slope and intercept, and for whatever reason we call them 'm' and 'n' (iNtercept?).
At this point don't get too hung up on the deeper meaning behind the letters (I honestly never thought about why they used 'b' until you asked, and I've taken calculus) and focus on what they represent. It's like learning English; you can explore the deeper meaning of WHY a pig is called a pig, but when you're starting out, it's enough to know that it's spelled p-i-g and represents a farm animal. The deeper meaning can wait until you are studying agriculture.
Hope it helped.
• I don't get it, how does B= 4/3 on A?
• Because the slope is -2/3, so when the x value increases by one, the y-value decreases by 2/3. That's why moving from an x-value of -1 to 0 will move you down by 2/3 (from a y-value 2 to 4/3, because 2 - 2/3 is 4/3. This can also be written as 6/3 - 2/3 = 4/3)

Another way to do this is by plugging the slope and a point to the slope-intercept equation (y = mx + b) to solve for the y-intercept. I'll use the point (-1, 2).
y = mx + b
2 = -2/3(-1) + b
2 = 2/3 + b
2 - 2/3 = b
4/3 = b
• I would like to give a little advice to anyone who needs it for khan academy. In one tab, I keep the video for the lesson. In the other tab, I keep the questions, and complete them while watching the video. Just a little advice that really works well for me. Have a great day!
• Thank you Lauren for the advice, I'll surely use it!
(1 vote)
• What would you do if you had something like x=0? or y= -5
• These are extreme cases.
If x=0, then we have the y-axis as the line.
If y=-5, then we have the horizontal line y=-5 taking on all possible x values and sending them to y=-5.
• Can someone summarize the main points of this video? It's kind of confusing!
• Okay i'll try the best i can. So... its just a review on the last video "graphing a line in slope int form." But this video is more complex. does this help?
• I have watched this for over 30 minutes and I still haven't understood anything
• When you try to write a slope-intercept equation from a graph, there are three steps you need to take:

1. Slope
Remember that slope is rise/run, or change in y over change in x. Find two points on the line that have clean, whole numbers as coordinates. Then use the following expression to find the slope: (y2-y1)/(x2-x1). Or, you can physically draw the lines and count the units like Sal does in the video.

Take a look at what Sal does for line A. He chooses the coordinates (-1, 2) and (2, 0).
Change in y --> 0 - 2 = -2
Change in x --> 2 - (-1) = 3
Change in y / change in x --> -2/3
Thus -2/3 is the slope.

2. Y-intercept
This is usually the easiest. Look at the point where the line intersects the y axis, or the axis going in the vertical direction. But sometimes it's not so clear as to where the point is. This is my strategy:

First take a look at the slope-intercept form: y = mx + b. We already known what m is = -2/3 (the slope.) We now have y = (-2/3)x + b.

Then find a point on the line--literally any point with whole coordinates will do. We'll choose (2, 0). Plug the x and y into our equation:
y = (-2/3)x + b
0 = (-2/3)(2) + b
Now we solve for b:
0 = -4/3 + b
4/3 = b
Ta-da! b, our y-intercept, is equal to 4/3.

3. Put it together
Now we can just put everything in our slope-intercept equation:
y = mx + b
y = (-2/3)x + 4/3

Hope this helps!
• Ok yes I understand this, but what does it have to do with linear equations on a graph, yes, I know how to find the slope and the y-intercept and how to take slope intercept form and make a graph, but say you have a problem like 5y=-45,which in this case does not have a x so you would have to divide by five in which y would then equal -9 so then my question is how would you plot that on a graph? Because I have tried many times and am getting the right y intercept but not the right coordinates. Thank you for your time -Tj
• If you have an equation that only tells you the y-value, then the x-value can be anything, as long as the y-value is correct. So to plot it, you just draw a horizontal line through the y-value.