Main content

## Get ready for AP® Calculus

### Course: Get ready for AP® Calculus > Unit 2

Lesson 2: Writing slope-intercept equations# Slope-intercept equation from graph

CCSS.Math: , ,

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?(168 votes)
- 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!(30 votes)

- 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?(26 votes)
- 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.(49 votes)

- I don't get it, how does B= 4/3 on A?(21 votes)
- 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(24 votes)

- 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!(21 votes)
- Thank you Lauren for the advice, I'll surely use it!(4 votes)

- What would you do if you had something like x=0? or y= -5(13 votes)
- 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.(17 votes)

- Can someone summarize the main points of this video? It's kind of confusing!(11 votes)
- 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?(10 votes)

- 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(8 votes)
- 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.(14 votes)

- Isn't negative number in denominator incorrect?(4 votes)
- It's not the preferred place for the sign.

The preferred placement for a sign in a fraction is in front of the fraction (not in the numerator or denominator.

For example: -(1/2) = (-1)/2 = 1/(-2). The preferred form would be -(1/2)

Hope this helps.(15 votes)

- Whats he talking about at3:04when he says delta x and delta y?(4 votes)
- Delta means "the change of". Sal was referring to the changing x and y values along the line.(13 votes)

- Do these things work with exponets and square roots? Also do they work with porablo graghs?(10 votes)

## Video transcript

So you may or may not already
know that any linear equation can be written in the form
y is equal to mx plus b. Where m is the slope
of the line. The same slope that we've
been dealing with the last few videos. The rise over run of the line. Or the inclination
of the line. And b is the y-intercept. I think it's pretty easy
to verify that b is a y-intercept. The way you verify that is you
substitute x is equal to 0. If you get x is equal to 0--
remember x is equal to 0, that means that's where we're going
to intercept at the y-axis. If x is equal to 0, this
equation becomes y is equal to m times 0 plus b. m times 0 is just
going to be 0. I don't care what m is. So then y is going
to be equal to b. So the point 0, b is going
to be on that line. The line will intercept the
y-axis at the point y is equal to b. We'll see that with
actual numbers in the next few videos. Just to verify for you that m
is really the slope, let's just try some numbers out. We know the point 0,
b is on the line. What happens when
x is equal to 1? You get y is equal
to m times 1. Or it's equal to m plus b. So we also know that the
point 1, m plus b is also on the line. Right? This is just the y value. So what's the slope between
that point and that point? Let's take this as the end
point, so you have m plus b, our change in y, m plus b minus
b over our change in x, over 1 minus 0. This is our change in
y over change in x. We're using two points. That's our end point. That's our starting point. So if you simplify this,
b minus b is 0. 1 minus 0 is 1. So you get m/1, or you
get it's equal to m. So hopefully you're satisfied
and hopefully I didn't confuse you by stating it in the
abstract with all of these variables here. But this is definitely going
to be the slope and this is definitely going to be
the y-intercept. Now given that, what I want to
do in this exercise is look at these graphs and then use the
already drawn graphs to figure out the equation. So we're going to look at these,
figure out the slopes, figure out the y-intercepts and
then know the equation. So let's do this line A first.
So what is A's slope? Let's start at some
arbitrary point. Let's start right over there. We want to get even numbers. If we run one, two, three. So if delta x is equal to 3. Right? One, two, three. Our delta y-- and I'm just doing
it because I want to hit an even number here-- our delta
y is equal to-- we go down by 2-- it's equal
to negative 2. So for A, change in
y for change in x. When our change in x is 3, our
change in y is negative 2. So our slope is negative 2/3. When we go over by 3, we're
going to go down by 2. Or if we go over by 1, we're
going to go down by 2/3. You can't exactly see it there,
but you definitely see it when you go over by 3. So that's our slope. We've essentially done
half of that problem. Now we have to figure
out the y-intercept. So that right there is our m. Now what is our b? Our y-intercept. Well where does this intersect
the y-axis? Well we already said
the slope is 2/3. So this is the point
y is equal to 2. When we go over by 1 to the
right, we would have gone down by 2/3. So this right here must
be the point 1 1/3. Or another way to say it,
we could say it's 4/3. That's the point y
is equal to 4/3. Right there. A little bit more than 1. About 1 1/3. So we could say b
is equal to 4/3. So we'll know that the equation
is y is equal to m, negative 2/3, x plus
b, plus 4/3. That's equation A. Let's do equation B. Hopefully we won't have
to deal with as many fractions here. Equation B. Let's figure out its slope
first. Let's start at some reasonable point. We could start at that point. Let me do it right here. B. Equation B. When our delta x is equal
to-- let me write it this way, delta x. So our delta x could be 1. When we move over 1 to the
right, what happens to our delta y? We go up by 3. delta x. delta y. Our change in y is 3. So delta y over delta x, When
we go to the right, our change in x is 1. Our change in y is positive 3. So our slope is equal to 3. What is our y-intercept? Well, when x is equal to
0, y is equal to 1. So b is equal to 1. So this was a lot easier. Here the equation is y is
equal to 3x plus 1. Let's do that last line there. Line C Let's do the y-intercept
first. You see immediately the y-intercept--
when x is equal to 0, y is negative 2. So b is equal to negative 2. And then what is the slope? m is equal to change in
y over change in x. Let's start at that
y-intercept. If we go over to the right
by one, two, three, four. So our change in x
is equal to 4. What is our change in y? Our change in y is positive 2. So change in y is 2 when
change in x is 4. So the slope is equal
to 1/2, 2/4. So the equation here is y is
equal to 1/2 x, that's our slope, minus 2. And we're done. Now let's go the other way. Let's look at some equations of
lines knowing that this is the slope and this is the
y-intercept-- that's the m, that's the b-- and actually
graph them. Let's do this first line. I already started circling
it in orange. The y-intercept is 5. When x is equal to 0,
y is equal to 5. You can verify that
on the equation. So when x is equal to 0, y is
equal to one, two, three, four, five. That's the y-intercept
and the slope is 2. That means when I move 1 in the
x-direction, I move up 2 in the y-direction. If I move 1 in the x-direction,
I move up 2 in the y-direction. If I move 1 in the x-direction,
I move up 2 in the y-direction. If I move back 1 in the
x-direction, I move down 2 in the y-direction. If I move back 1 in the
x-direction, I move down 2 in the y-direction. I keep doing that. So this line is going to look--
I can't draw lines too neatly, but this is going
to be my best shot. It's going to look something
like that. It'll just keep going on,
on and on and on. So that's our first line. I can just keep going
down like that. Let's do this second line. y is equal to negative
0.2x plus 7. Let me write that. y is equal
to negative 0.2x plus 7. It's always easier to
think in fractions. So 0.2 is the same
thing as 1/5. We could write y is equal to
negative 1/5 x plus 7. We know it's y-intercept at 7. So it's one, two, three,
four, five, six. That's our y-intercept
when x is equal to 0. This tells us that for every
5 we move to the right, we move down 1. We can view this as
negative 1/5. The delta y over delta x is
equal to negative 1/5. For every 5 we move to the
right, we move down 1. So every 5. One, two, three, four, five. We moved 5 to the right. That means we must
move down 1. We move 5 to the right. One, two, three, four, five. We must move down 1. If you go backwards, if you move
5 backwards-- instead of this, if you view this
as 1 over negative 5. These are obviously equivalent
numbers. If you go back 5-- that's
negative 5. One, two, three, four, five. Then you move up 1. If you go back 5-- one,
two, three, four, five-- you move up 1. So the line is going
to look like this. I have to just connect
the dots. I think you get the idea. I just have to connect
those dots. I could've drawn it a little
bit straighter. Now let's do this one, y
is equal to negative x. Where's the b term? I don't see any b term. You remember we're saying
y is equal to mx plus b. Where is the b? Well, the b is 0. You could view this as plus 0. Here is b is 0. When x is 0, y is 0. That's our y-intercept, right
there at the origin. And then the slope-- once again
you see a negative sign. You could view that as
negative 1x plus 0. So slope is negative 1. When you move to the right by
1, when change in x is 1, change in y is negative 1. When you move up by 1 in x,
you go down by 1 in y. Or if you go down by 1 in x,
you're going to go up by 1 in y. x and y are going to
have opposite signs. They go in opposite
directions. So the line is going
to look like that. You could almost imagine it's
splitting the second and fourth quadrants. Now I'll do one more. Let's do this last
one right here. y is equal to 3.75. Now you're saying, gee,
we're looking for y is equal to mx plus b. Where is this x term? It's completely gone. Well the reality here is, this
could be rewritten as y is equal to 0x plus 3.75. Now it makes sense. The slope is 0. No matter how much we change
our x, y does not change. Delta y over delta
x is equal to 0. I don't care how much
you change your x. Our y-intercept is 3.75. So 1, 2, 3.75 is right
around there. You want to get close. 3 3/4. As I change x, y will
not change. y is always going to be 3.75. It's just going to be
a horizontal line at y is equal to 3.75. Anyway, hopefully you
found this useful.