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

Given two points on a line, we can write an equation for that line by finding the slope between those points, then solving for the y-intercept in the slope-intercept equation y=mx+b. In this example, we write an equation of the line that passes through the points (-1,6) and (5,-4). Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

• Can anyone tell me what ! <--- that means regarding a problem that looks like this: 5!
• the "!" we read like this 5! (five factorial)
They work as following:
2! = 2x1, 3! = 3x2x1 etc.

So, yours in question would be 5! = 5x4x3x2x1

It is part of the probabilities and statistics problems where you learn combinations and permutations.
• How does this make any sense?
• Corona virus was not around 2 years ago.
• I do not get this...
• this video is to find the equation of a line in the form of slope-intercept equation, where "Y" = "the slope of the line (Y minus Y divided by X minus X from two different random point in the line)" times "X" plus "the Y intercept (where the line touches the Y-axis)". This is showing us how to calculate each of the "elements" of the equation shown above when we only know two points
• I'm having issues with two negative points, ie. in the equation y2-y1 / x2 - x1

when y2 = -1 and y1 = -3 / x2 = -3 and x1= -2

I get stumped, I dont know if i'm suppose to be adding the doouble negatives to get a positive or what. my equations don't add up, please help!
• you would have -1+3/-3+2 to get a slope of -2
(1 vote)
• What would be the slope to y = 4 and x = 3
• You need 2 points to find the slope. Points come in as ordered pairs of (x, y). You gave 2 equations. Or, are these meant to be intercepts? Please clarify the information that you are providing.
• how do you know when to use the first point or the second point?
• It doesn't matter. You can use either point to calculate "b".
• Couldn't Sal just multiply the whole equation by 3 to get -
3y = -5x + 13 ?
• At did he use 6 as y for the line equation because it was "y1" , thus making it the original y? How come he did not use the -10 from both y values?
• He used 6 because it was one of the points for y on the line. He could not use -10, because -10 isn't necessarily a point on the line, because it's the change in y. If -10 from the slope were to be a valid option for a point in this equation, that means that the change in x would also have to be the accompanying point on the line to go with the change in y. However if Sal were to use -10, the x value he would have to be different.

This is seen when you compare the points and the slope. The change in y over the change in x equals out to -10/6, or -5/3. We also know from the given points that when y equals 6, x is equal to -1.

Now to compare this to when y equal to -10, we would have this:

-10 = 5/3x + 13/3 and from this, we can solve for x in this situation.

So first, we subtract 13/3 from both sides.

-13/3 - 10/3 = 5/3x + 13/3 - 13/3 and we are left with:

-23/3 = 5/3x, so now we divide both sides by 5/3

-23/3 / 5/3 = 5/3x / 5/3 The right hand side cancels out

-23/3 / 5/3 = x As for the left hand side, we know that dividing by a fraction is the same thing as multiplying by it's reciprocal, so it becomes

-23/3 * 3/5 = x And multiplying this out will give us...

-69/15 = x And lastly, dividing -69 by 15 gives us...

-4.6 = x

Alright, so we know that when y is equal to -10, then x is equal to -4.6. This means that it is an ENTIRELY different point on the line, as the change in y over change in x is equal to -10/6, or -5/3.
• One thing I'm confusing with is; in practice, when we have to find for b we have to use one point from the question to fit in the formula of y=mx+b. Mostly the answer got right with first point but sometimes the answer got right with the second point (I mean the question give two points from the graph to find b) so does that means we have to draw a rough graph first to find which point is fit to be put in the formula to find b?
Sry if my question is a bit confusing.
• Any point will work to find b actually, because the y=mx+b form is meant to correspond to every pair of points on the graph.

You never have to draw or sketch a graph but I find it tends to help. The graph though will not tell you which point you should use, since you can use either.

Let me know if this was not the answer you were looking for.