How to find a slope with an equation

Slope-Intercept:

The following video will teach how to find the equation of a line, given any two points on that line.

Video Source (7:13 mins) | Transcript

Steps to find the equation of a line from two points:

  1. Find the slope using the slope formula
    • \({\text{Slope}}={\text{m}}=\frac{\text{rise}}{\text{run}}=\frac{{\text{y}}_2-{\text{y}}_1}{{\text{x}}_2-{\text{x}}_1}\)
    • \(\text{Point 1 or P}_{1}=(\text{x}_{1}, \text{y}_{1})\)
    • \(\text{Point 2 or P}_{2}=(\text{x}_{2}, \text{y}_{2})\)
  2. Use the slope and one of the points to solve for the y-intercept (b).
    • One of your points can replace the x and y, and the slope you just calculated replaces the m of your equation y = mx + b. Then b is the only variable left. Use the tools you know for solving for a variable to solve for b.
  3. Once you know the value for m and the value for b, you can plug these into the slope-intercept form of a line (y = mx + b) to get the equation for the line.

Additional Resources

  • Khan Academy: Slope-Intercept Equation from Two Points (06:41 mins, Transcript)
  • Khan Academy: Slope-Intercept Form Problems (14:57 mins, Transcript)

Practice Problems

For each of the following problems, find the equation of the line that passes through the following two points:

  1. \(\left ( -5,10 \right )\) and \(\left ( -3,4 \right )\)
  2. \(\left ( -5,-26 \right )\) and \(\left ( -2,-8 \right )\)
  3. \(\left ( -4,-22 \right )\) and \(\left ( -6,-34 \right )\)
  4. \(\left ( 3,1 \right )\) and \(\left ( -6,-2 \right )\)
  5. \(\left ( 4,-6 \right )\) and \(\left ( 6,3 \right )\)
  6. \(\left ( 5,5 \right )\) and \(\left ( 3,2 \right )\)


Interpreting Lines:

This is an introduction to drawing lines when given the slope and the y-intercept in an equation form. Remember that the y-intercept is where the graph crosses the y-axis; this is where we usually start. First, find the y-intercept, then determine the slope. For now, just focus on whether the slope is positive or negative.

Here are the variables we will start using in our function:

  • m = slope
  • b = y-intercept

The equation is y = mx + b. The x and y variables remain as letters, but m and b are replaced by numbers (ex: y = 2x + 4, slope = 2 and y-intercept = 4). The following video will show a few examples of understanding how to use the slope and intercept from an equation.

Video Source (03:53 mins) | Transcript

y = mx + b

This equation is called the slope-intercept form because the two numbers in the equation are the slope and the intercept. Remember, the slope (m) is the number being multiplied to x and the intercept (b) is the number being added or subtracted.

Additional Resources

  • Khan Academy: Intro to Slope-Intercept Form (08:59 mins; Transcript)
  • Khan Academy: Worked Examples: Slope-Intercept Intro (04:39 mins; Transcript)

Practice Problems

  1. Find the slope of the line:
    \(\text{y}=6\text{x}+2\)

  2. Find the y-intercept of the line:
    \({\text{y}}=-7{\text{x}}+4\)

  3. Find the slope of the line:
    \({\text{y}}=-3{\text{x}}+5\)

  4. Find the y-intercept of the line:
    \({\text{y}}=-{\text{x}}-3\)


Video transcript

Find the slope of the line in the graph. And just as a bit of a review, slope is just telling us how steep a line is. And the best way to view it, slope is equal to change in y over change in x. And for a line, this will always be constant. And sometimes you might see it written like this: you might see this triangle, that's a capital delta, that means change in, change in y over change in x. That's just a fancy way of saying change in y over change in x. So let's see what this change in y is for any change in x. So let's start at some point that seems pretty reasonable to read from this table right here, from this graph. So let's see, we're starting here-- let me do it in a more vibrant color-- so let's say we start at that point right there. And we want to go to another point that's pretty straightforward to read, so we can move to that point right there. We could literally pick any two points on this line. I'm just picking ones that are nice integer coordinates, so it's easy to read. So what is the change in y and what is the change in x? So first let's look at the change in x. So if we go from there to there, what is the change in x? My change in x is equal to what? Well, I can just count it out. I went 1 steps, 2 steps, 3 steps. My change in x is 3. And you could even see it from the x values. If I go from negative 3 to 0, I went up by 3. So my change in x is 3. So let me write this, change in x, delta x is equal to 3. And what's my change in y? Well, my change in y, I'm going from negative 3 up to negative 1, or you could just say 1, 2. So my change in y, is equal to positive 2. So let me write that down. Change in y is equal to 2. So what is my change in y for a change in x? Well, when my change in x was 3, my change in y is 2. So this is my slope. And one thing I want to do, I want to show you that I could have really picked any two points here. Let's say I didn't pick-- let me clear this out-- let's say I didn't pick those two points, let me pick some other points, and I'll even go in a different direction. I want to show you that you're going to get the same answer. Let's say I've used this as my starting point, and I want to go all the way over there. Well, let's think about the change in y first. So the change in y, I'm going down by how many units? 1, 2, 3, 4 units, so my change in y, in this example, is negative 4. I went from 1 to negative 3, that's negative 4. That's my change in y. Change in y is equal to negative 4. Now what is my change in x? Well I'm going from this point, or from this x value, all the way-- let me do that in a different color-- all the way back like this. So I'm going to the left, so it's going to be a negative change in x, and I went 1, 2, 3, 4, 5, 6 units back. So my change in x is equal to negative 6. And you can even see I started it at x is equal to 3, and I went all the way to x is equal to negative 3. That's a change of negative 6. I went 6 to the left, or a change of negative 6. So what is my change in y over change in x? My change in y over change in x is equal to negative 4 over negative 6. The negatives cancel out and what's 4 over 6? Well, that's just 2 over 3. So it's the same value, you just have to be consistent. If this is my start point, I went down 4, and then I went back 6. Negative 4 over negative 6. If I viewed this as my starting point, I could say that I went up 4, so it would be a change in y would be 4, and then my change in x would be 6. And either way, once again, change in y over change in x is going to be 4 over 6, 2/3. So no matter which point you choose, as long as you kind of think about it in a consistent way, you're going to get the same value for slope.