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

# Worked example: slope from two points

Let's find the slope of the line that goes through the ordered pairs (4,2) and (-3, 16). The slope, or steepness, of a line is found by dividing the vertical change (rise) by the horizontal change (run). The formula is slope =(y₂ - y₁)/(x₂ - x₁), where (x₁, y₁) and (x₂, y₂) are the coordinates of two points on the line. Created by Sal Khan and Monterey Institute for Technology and Education.

## Want to join the conversation?

• Do I HAVE to use this method, or is it okay to just use the other one in the previous video, "Graphical Slope of a Line"? Is there really any difference?
(277 votes)
• The method of graphing the line and then measuring the slope of the graph isn't a very good method when you are dealing with messy numbers (fractions, irrational numbers etc.) Also, the method used in this video will work even if you don't have graph paper.
(284 votes)
• How do you find the slope of a curved line?? (not linear)
(66 votes)
• There is no such thing as the "slope of a curve" per se; what you have to find is the slope of the line that hugs the curve closely at a given point, called the tangent line at that point. You can find this by taking the derivative of the equation of the curve and then plugging in the x value of that point. That's the very beginning of calculus; you can watch Sal's videos on taking derivatives in the Calculus section. ^_^
(150 votes)
• but if you do like Sal did - simplifying 14/-2 to -2
i can't figure out the slope!!
(34 votes)
• Remember that -2 can be written like -2/1. :) Since -2 divided by 1 is just -2.

Do you see the rise over run now? -2 is the "rise", while 1 is the "run".

14/-7 is a proportional fraction to -2/1. You can simplify the fraction by dividing both numbers by 7.

14 divided by 7 is 2, and -7 divided 7 is -1. So, 14/-7 is equal to -2/1.

Since they are proportional fractions, their slope is actually the same too! :)

Let's try with Sal's examples, the starting point at (-3,16) to the ending point (4,2). With the rise over run -2/1 (which is the same as 14/-7 remember? Just simplified), we go 2 down and 1 right. Our starting point is now at (-2,14).

Let's go 2 down and 1 right again. Our point is now (-1,12).

Again. (0,10).

Again. :P (1,8)

Almost there. (2,6)

You see it? (3,4)

Well what do you know, now we are at (4,2)! The ending point we were aiming for.

Now, if you drew a line through all the coordinates we just made, it would look just like the line Sal drew. In fact, his line went through all the points that we made!

Try it yourself if you really care :P. Also, I'm sure you meant -7 right XP?
(77 votes)
• What happens if you already have the line, and need the ordered pairs?
(16 votes)
• Watch the "Slope of a line" video. (The one before this one). The whole video is about finding slope WITHOUT needing the ordered pairs.
(14 votes)
• How do you draw a slope on a graph when the only number you are given is the slope? Say the problem says "show the slope of 2." How would you know how to draw the line without any coordinates?
(12 votes)
• Janine,
You can drawn it anywhere on the graph. Just choose any first point. Then go up two and right 1 for the second point and draw a line through the two points. Your line will have a slope of 2.
(15 votes)
• 1. Do you have to draw an arrow head at each end of the line (see )? In other words, is this a "line" in the geometrical sense? Or is it a line segment? Or perhaps a ray that goes from (-3,16) to (4,2)?

I am thinking about the way he describes it as y decreases when x increases. I am also thinking about what it means that x is independent and y is dependent variable. Can you really go in either direction on the x in this situation?

2. How do you explicitly tell on a Cartesian plane that you are only investigating the change in x in the positive direction? Can you draw the x axis as a ray with only an arrow head at the right side and a point on the left side?
(11 votes)
• 1. the question is ''find the slope of the line ''
so, yes it is a line in the geometrical sense.. and the line passes through the 2 points given

the equation of a line is y= mx +c
where y is dependent on x, m and c are constants and x is independent
and yes, you can go in both directions.. recall that a line goes on to infinity.. so, in principle there is no defined start point (therefore no start x-coordinate)
if x 'starts' from negative infinity and starts increasing, it is understood that it goes in both directions (positive and negative)

2. I'm not sure how to explain this one.. have you already watched the other videos?
(11 votes)
• How can you explain it more simply because I am still struggling to understand?
(11 votes)
• Hey there snoman! When finding slope of any 2 ordered pairs, for instance lets just use (2,9) and (19,10), a simple and quick method you can use is y2-y1 over x2-x1. Then just make sure you divide the y over the x in the end. Let me further explain using my example in 3 straightforward steps:

Step 1: You take the ordered pairs (2,9) and (19,10) and take out the y2 and y1 numbers. That would be 10 and 9. Then take out the x2 and x1 numbers. That should be 19 and 2.

Step 2: Next, you should minus the y2 and y1 numbers from each other. Your answer should be 1. After you do that, repeat the same process with the numbers of x2 and x1 and subtract both. Your answer should be 17.

Step 3: Final one! This is very important so you get your slope! Now, we have to use the method of rise/run or y change over x change to get the final answer. Divide your y number (1) over your x number (17). Your final answer should be 1/17.
(8 votes)
• how do you know if your answer is positive or negative?
(1 vote)
• If the line goes up and to the right, then the slope is positive.

If the line goes down and to the right, then the slope is negative.

If the line is horizontal, then the slope is zero.

If the line is vertical, then the slope is undefined.

Have a blessed, wonderful day!
(23 votes)
• in the (slope from two points) exercise I'm having trouble defining what is y and what is x in a pair
is it y,x or x,y
(3 votes)
• In a ordered pair it goes (x,y). For example lets say we have the pair (8,5). In this case our x, or run is 8, and our y, or rise, is 5. Hope this helped!
(7 votes)
• Instead of using y2-y1 over x2-x1, is it possible to use y1-y2 over x1-x2? Does it make a difference which one is used?
(4 votes)
• It doesn’t matter at all, just as long as you have the same format, for example, if you do y2-y1, you have to keep that same format for x: x2-x1
(2 votes)

## Video transcript

Find the slope of the line that goes through the ordered pairs 4 comma 2 and negative 3 comma 16. So just as a reminder, slope is defined as rise over run. Or, you could view that rise is just change in y and run is just change in x. The triangles here, that's the delta symbol. It literally means "change in." Or another way, and you might see this formula, and it tends to be really complicated. But just remember it's just these two things over here. Sometimes, slope will be specified with the variable m. And they'll say that m is the same thing-- and this is really the same thing as change in y. They'll write y2 minus y1 over x2 minus x1. And this notation tends to be kind of complicated, but all this means is, is you take the y-value of your endpoint and subtract from it the y-value of your starting point. That will essentially give you your change in y. And it says take the x-value of your endpoint and subtract from that the x-value of your starting point. And that'll give you change in x. So whatever of these work for you, let's actually figure out the slope of the line that goes through these two points. So we're starting at-- and actually, we could do it both ways. We could start at this point and go to that point and calculate the slope or we could start at this point and go to that point and calculate the slope. So let's do it both ways. So let's say that our starting point is the point 4 comma 2. And let's say that our endpoint is negative 3 comma 16. So what is the change in x over here? What is the change in x in this scenario? So we're going from 4 to negative 3. If something goes from 4 to negative 3, what was it's change? You have to go down 4 to get to 0, and then you have to go down another 3 to get to negative 3. So our change in x here is negative 7. Actually, let me write it this way. Our change in x is equal to negative 3 minus 4, which is equal to negative 7. If I'm going from 4 to negative 3, I went down by 7. Our change in x is negative 7. Let's do the same thing for the change in y. And notice, I implicitly use this formula over here. Our change in x was this value, our endpoint, our end x-value minus our starting x-value. Let's do the same thing for our change in y. Our change in y. If we're starting at 2 and we go to 16, that means we moved up 14. Or another way you could say it, you could take your ending y-value and subtract from that your starting y-value and you get 14. So what is the slope over here? Well, the slope is just change in y over change in x. So the slope over here is change in y over change in x, which is-- our change in y is 14. And our change in x is negative 7. And then if we want to simplify this, 14 divided by negative 7 is negative 2. Now, what I want to show you is, is that we could have done it the other way around. We could have made this the starting point and this the endpoint. And what we would have gotten is the negative values of each of these, but then they would've canceled out and we would still get negative 2. Let's try it out. So let's say that our start point was negative 3 comma 16. And let's say that our endpoint is the 4 comma 2. 4 comma 2. So in this situation, what is our change in x? Our change in x. If I start at negative 3 and I go to 4, that means I went up 7. Or if you want to just calculate that, you would do 4 minus negative 3. 4 minus negative 3. But needless to say, we just went up 7. And what is our change in y? Our change in y over here, or we could say our rise. If we start at 16 and we end at 2, that means we went down 14. Or you could just say 2 minus 16 is negative 14. We went down by 14. This was our run. So if you say rise over run, which is the same thing as change in y over change in x, our rise is negative 14 and our run here is 7. So notice, these are just the negatives of these values from when we swapped them. So once again, this is equal to negative 2. And let's just visualize this. Let me do a quick graph here just to show you what a downward slope would look like. So let me draw our two points. So this is my x-axis. That is my y-axis. So this point over here, 4 comma 2. So let me graph it. So we're going to go all the way up to 16. So let me save some space here. So we have 1, 2, 3, 4. It's 4 comma-- 1, 2. So 4 comma 2 is right over here. 4 comma 2. Then we have the point negative 3 comma 16. So let me draw that over here. So we have negative 1, 2, 3. And we have to go up 16. So this is 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16. So it goes right over here. So this is negative 3 comma 16. Negative 3 comma 16. So the line that goes between them is going to look something like this. Try my best to draw a relatively straight line. That line will keep going. So the line will keep going. So that's my best attempt. And now notice, it's downward sloping. As you increase an x-value, the line goes down. It's going from the top left to the bottom right. As x gets bigger, y gets smaller. That's what a downward-sloping line looks like. And just to visualize our change in x's and our change in y's that we dealt with here, when we started at 4 and we ended at-- or when we started at 4 comma 2 and ended at negative 3 comma 16, that was analogous to starting here and ending over there. And we said our change in x was negative 7. We had to move back. Our run we had to move in the left direction by 7. That's why it was a negative 7. And then we had to move in the y-direction. We had to move in the y-direction positive 14. So that's why our rise was positive. So it's 14 over negative 7, or negative 2. When we did it the other way, we started at this point. We started at this point, and then ended at this point. Started at negative 3, 16 and ended at that point. So in that situation, our run was positive 7. And now we have to go down in the y-direction since we switched the starting and the endpoint. And now we had to go down negative 14. Our run is now positive 7 and our rise is now negative 14. Either way, we got the same slope.