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 equation from two points

CCSS.Math:

## Video transcript

a line goes through the points negative one comma six and five comma negative four what is the equation of the line so let's just try to visualize this so that is my x-axis and you don't have to draw it to do this problem that always helps to visualize that is my y-axis and the first point is negative one comma six so negative one comma one two three four five six so it's this point right over there it's negative one comma six and the other point is five comma negative four so one two three four five and then we go down four so one two three four so it's right over there and so the line that connects them will look something like this the line will draw a rough approximation I can draw a straighter line than that I'll draw a dot little dotted line maybe easier to do dotted line so the line will look something like that so let's find its equation so a good place to start is we could find its slope remember we want to we can find equation y is equal to MX plus B this is the slope-intercept form where m is the slope and B is the y-intercept we can first try to solve for M we could find the slope of this line so M or the slope is the change in Y over the change in X or we could view it as how the the Y values of our end point minus the Y value of our starting point over the X values of our end point minus the X values of our starting point let me make that clear so this is equal to change in Y over change in X which is the same thing as rise over run which is the same thing as the Y value of your ending point minus the Y value of your starting point this is the same exact thing as change in Y and that over the x value of your ending point minus the x value of your starting point this is the exact same thing as change in X and you just have to pick one of these as a starting point and one is the ending point so let's just make this over here our starting point and make that our ending point so what is our change in Y so our change in Y to go we started at I is equal to six we started Y is equal to six and we go down all the way to Y is equal to negative four so this is right here that is our change in Y you could look at the graph you say well if I go to if I start at six and I go to negative four I went down ten or if you just want to use this formula here it'll give you the same thing we finished at negative four we finished it negative four and from that we want to subtract we want to subtract six this right here is y - this is our ending Y and this is our beginning Y this is y 1 so Y 2 negative 4 minus y 1 negative 6 so that or negative 4 minus 6 that is equal to negative 10 and all that's doing is telling us the change in Y to go from this point to that point we have to go down our rise was negative we had to go down 10 that's where the negative 10 comes from now we just have to find our change in X so we can look at this graph over here we started X is equal to negative 1 and we go all the way to X is equal to 5 so we start at x is equal to negative 1 and we go all the way to X is equal to 5 so it takes us 1 to get to 0 and then 5 more so our change in X is 6 you can look at it visually there or you could use this formula same exact idea our ending x-value our ending x-value is 5 and our starting x value is negative 1 5 minus negative 1 5 minus negative 1 is the same thing as 5 plus 1 so it is 6 so our slope here is negative 10 over 6 which is the exact same thing as negative 5/3 as negative 5 over 3 divide the numerator and the denominator by 2 so we now know our equation will be y is equal to negative 5/3 that's our slope x + B so we still need to solve for our y-intercept to get our equation and to do that we can use the information that we know or we could we have several points of information but we can use the fact that the line goes through the point negative 1 6 we could you could use point as well but we know that when X is equal to negative 1 so Y is equal to 6 so y is equal to 6 when X is equal to negative 1 so negative 5/3 times X when X is equal to negative 1 y is equal to 6 so we literally just substitute this X and y value back into this and now we can solve for B so let's see this negative 1 times negative 5/3 so we get 6 is equal to positive 5/3 plus B and now we can subtract 5/3 from both sides of this equation so we have subtract the left-hand side from the left-hand side and subtract from the right-hand side and then we get what's 6 minus 5/3 so that's going to be let me do it over here we could do take a common denominator so 6 is the same thing as let me just do it over here so 6 minus 5 over 3 is the same thing as 6 is 18 over 3 minus 5 over 3 that's what 6 is 18 over 3 and this is just 13 over 3 so this is 13 over 3 and then of course these cancel out so we're get B is equal to 13 thirds so we're done we know we know the slope and we know the y-intercept the equation of our line is y is equal to negative 5/3 X plus our y-intercept which is 13 which is 13 over 3 and we could write these as mixed numbers if it's easier to visualize 13 over 3 is 4 and 1/3 so this y-intercept right over here this y-intercept right over here that's 0 comma 13 over 3 or 0 comma 4 and one thirds and even with my very roughly drawn diagram it does look like this and this slope 5 negative 5/3 that's the same thing as negative 1 and 2/3 and you can see here the slope is downward sloping it's negative it's a little bit steeper than a slope of 1 it's a Nega it's not quite as negative 2 its negative 1 and 2/3 if you were to write this as a negative as a mixed number so hopefully hopefully you found that you found that entertaining you