Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.

Video: Introducing Linear Functions Using y = mx + b

Tim Burnham

A detailed introduction to the general form of a linear function, y=mx+b (or y=mx+c). We explain how to calculate the slope and the y-intercept and show how changing these parameters affects the graph of the function.

17:49

Video Transcript

In this video we’re gonna explore the general form of the equation of a straight line function: 𝑦 equals π‘šπ‘₯ plus 𝑏. Now depending on where you live, you may have seen this written as 𝑦 equals π‘šπ‘₯ plus 𝑐. Well, it means just the same thing. But some bright spark thought it’d be a good idea to use the letter β€œπ‘β€ instead of the letter β€œπ‘β€ to represent the value of the coordinate of the point that cuts the 𝑦-axis. Now you think that’ll it make it easier to remember which value tells you where the line cuts the 𝑦-axis β€” 𝑐 stands for cut. But after many years of teaching in places where they use 𝑦 equals π‘šπ‘₯ plus 𝑐 rather than 𝑦 equals π‘šπ‘₯ plus 𝑏, believe me it doesn’t work. You might as well just use 𝑦 equals π‘šπ‘₯ plus 𝑏. Anyway whichever version of the formula you use, this is the big idea we’re gonna be looking at in this video.

So let’s look at some graphs first. Let’s plot 𝑦 equals π‘₯. Well 𝑦 equals π‘₯ could also be written as 𝑦 equals one π‘₯ or 𝑦 equals one times π‘₯. So whatever π‘₯-coordinate we give, we just multiply it by one and that will also be the 𝑦-coordinate. So we’ve got a series of points that have exactly the same π‘₯- and 𝑦-coordinates. So for example, if my π‘₯-coordinate is zero, my 𝑦-coordinate would also be zero; if my π‘₯-coordinate is five, my 𝑦-coordinate is also five; or if my π‘₯-coordinate is negative seven, the 𝑦-coordinate would also be negative seven. And that leads us to a whole series of points and loads of points in between them that look like this on the graph. And when I join them up, they look like this, giving us the graph of the line 𝑦 equals π‘₯.

Now let’s plot the line 𝑦 equals two π‘₯. And for this one, we had to take the π‘₯-coordinate and times it by two to get the 𝑦-coordinate. So if our π‘₯-coordinate was zero, we’d multiply that by two and we’d also get zero. And if the π‘₯-coordinate was three, we’d multiply that by two and get six and so on. So our graph would look like this.

And in the same way, we could plot 𝑦 equals three π‘₯. Now already I think we’ll plot two- we’ll plot 𝑦 equals a half π‘₯ and 𝑦 equals zero π‘₯. Well clearly 𝑦 equals zero π‘₯ is just 𝑦 equals zero. So the 𝑦-coordinate is always gonna be zero in that case. So there’s 𝑦 equals a half π‘₯ and we can see that the π‘₯-coordinate is ten at this point here and our 𝑦-coordinate is five. So the 𝑦-coordinate is half of the π‘₯-coordinate and that’s true for all of the coordinates on that line. And there’s 𝑦 equals zero π‘₯, where the 𝑦-coordinate is always zero.

So now we’ve plotted all those lines together. What you should notice is that the multiplier of the π‘₯ tells us how steep that line is gonna be. We got a series of lines which start off horizontal and get steeper and steeper and steeper as the multiplier of π‘₯ gets bigger. Let’s pick a point in one of those lines and increase our π‘₯-coordinate by one. Now when we do that, the corresponding 𝑦-coordinate back on the line has gone up by a half and look that’s the multiplier of π‘₯. When I look at the line 𝑦 equals one π‘₯ if I take a point on the line, increase the π‘₯-coordinate by one, the corresponding 𝑦-coordinate if I move back to the line has also gone up by one. If I do the same on the line 𝑦 equals two π‘₯, increase the π‘₯-coordinate by one, the corresponding 𝑦-coordinate to get back to the line goes up by two and that’s the multiplier of π‘₯.

So for any straight line in this 𝑦 equals π‘šπ‘₯ plus 𝑏 format, so 𝑦 equals a number times π‘₯ plus or minus another number; I mean in our case the numbers are plus zero, so that 𝑏 or 𝑐 number on the end is zero, any line in that format the multiplier of π‘₯ tells you about the slope of the line β€” how steep it is or how shallow it is: is it horizontal? or is it getting more and more vertical? But the number itself specifically tells you how much will the 𝑦-coordinate change if I increase my π‘₯-coordinate by one at any point on that line.

Right, let’s go through that exercise again. But this time our multipliers of π‘₯ are going to be negative numbers. So we’re gonna do zero π‘₯, negative a half π‘₯, negative one π‘₯, negative two π‘₯, and negative three π‘₯. So 𝑦 equals zero π‘₯ is still this horizontal line. And for 𝑦 equals negative a half π‘₯, the 𝑦-coordinate is negative a half times the π‘₯-coordinate. So for example, when the π‘₯-coordinate is five, the 𝑦-coordinate is negative a half times that. So it’s negative two point five. So you can see this point on the line here.

Now we can also plot 𝑦 equals negative one π‘₯ or just negative π‘₯, and 𝑦 equals negative two π‘₯, and 𝑦 equals negative three π‘₯. Now again 𝑦 equals zero π‘₯. We said it was a horizontal line and you’ll see that as this number gets bigger and more negative the line gets steeper. But instead of going from the bottom left to the top right, going uphill, it’s going in the other direction. It’s going from the top left to the bottom right; it’s going where we would call downhill. So the number on the multiplier of π‘₯ tells us about the slope of that line, but the sign of that number also gives us some information about the slope. If it’s negative, it’s going in this downhill direction top left to bottom right. If it was positive, it’s going in this uphill direction as we increase π‘₯ from the bottom left up to the top right.

Now because every time I increase my π‘₯-coordinate by one on a given line, the 𝑦-coordinate always changes by the same amount; that’s what makes it a straight line. So on the line 𝑦 equals negative three π‘₯ if I start up here and I increase the π‘₯-coordinate by one, to get back into that line I’ve got to decrease the 𝑦-coordinate by three. And that same thing is true no matter whereabouts on the straight line I start. And looking at 𝑦 equals negative a half π‘₯, the same thing is true. Every time no matter wherever I start on that line if I increase my π‘₯-coordinate by one, the 𝑦-coordinate decreases by the same amount β€” negative a half in this case. So whether it’s from here or it’s here or here or even over here, the slope of that line is always the same, everywhere on the line.

Well now we’re gonna plot some different lines: 𝑦 equals π‘₯ plus zero, 𝑦 equals π‘₯ plus one, π‘₯ plus two, π‘₯ plus three, π‘₯ plus four, and π‘₯ plus five. And you can do this using some software or you could do it using tables of values. But I’m going to do it for you here; what we do is we take our π‘₯-coordinate and we add something to it. Now depending on which equation we’re using, we’ll either add one or nothing and two or three or four or five. So if I take my π‘₯-coordinate and add nothing to it to get my 𝑦-coordinate, it means all my π‘₯- and 𝑦-coordinates are the same. So this is the line that we get. If I take my π‘₯-coordinate and add one to it all the time, then this is the line I get. Look when my π‘₯-coordinate is zero, zero plus one is one, so my 𝑦-coordinate will be one; so this is the point I’m gonna get. If my π‘₯-coordinate is four, four plus one is five, so five will be the 𝑦-coordinate I get. So that’s the line 𝑦 equals π‘₯ plus one. Now I’m gonna plot π‘₯ plus two, π‘₯ plus three, π‘₯ plus four, and π‘₯ plus five. And here are the lines that I get. Now this isn’t massively surprising because look they’ve all got the same multiplier of π‘₯. We didn’t have anything in front of it; so it’s all one times π‘₯. So the slope of those lines should all be the same. Every time I increase my π‘₯-coordinate by one, the 𝑦-coordinate goes up by one. They’re parallel lines because they’ve all got the same slope of one.

But now let’s look at this other thing: the plus 𝑏. We’re adding zero, one, two, three, four, and five. 𝑦 equals π‘₯ plus zero cuts the 𝑦-axis here at zero, 𝑦 equals π‘₯ plus one cuts the 𝑦-axis here at one, 𝑦 equals π‘₯ plus two cuts the 𝑦-axis here at two, and no surprises 𝑦 equals π‘₯ plus three, four, and five cuts the 𝑦-axis here at three, four, and five. So this second term here, the plus number on its own or the minus number on its own, will tell us where that line is gonna cut the 𝑦-axis.

Okay let’s take a look at some lines then when we are subtracting a number rather than adding a number on the end. So 𝑦 equals π‘₯ plus zero, π‘₯ minus one, π‘₯ minus two, and so on down to π‘₯ minus five. So this is what those lines look like. Again remember that they all mean one times π‘₯. So the slope of the line is one. They’ve all got the same slope; therefore, they’re parallel. And the thing that’s different about all of those lines is the number we’re adding on the end and that tells us whereabouts it cuts the 𝑦-axis.

So now we know how equations of straight lines work; we know the rules. We can easily plot linear graphs from the equations without having to make a table of values first. So we just need first of all to plot a 𝑦-intercept; it’s minus three, so that’s here. And then as I increase my π‘₯-coordinate, my 𝑦-coordinate is increasing by two because I’ve got a positive two in front of the π‘₯. So as I go increase my π‘₯-coordinate by one, my 𝑦-coordinate is gonna go up by two, increase the π‘₯-coordinate by one, the 𝑦-coordinate goes up by two. And if I start decreasing my π‘₯-coordinate by one, the 𝑦-coordinate is gonna do the opposite thing; it’s gonna come down by two. So as I decrease my π‘₯-coordinate by one, the 𝑦-coordinate comes down by two, decrease by one, comes down by two, and so on. Then I just have to join all these up. And here’s my line. So remember the number in front of the π‘₯ tells us the slope of the line. If it’s positive, it’s an uphill line. If it was negative, it will be a downhill line. So that’s a little check that you need to sort of learn and remember and the number on the end tells you where it cuts the 𝑦-axis. So negative three; it’s cutting the 𝑦-axis at negative three.

Now let’s plot 𝑦 equals one and a half π‘₯ plus two. So here is where it cuts the 𝑦-axis. And this multiplier of π‘₯ tells us the slope of the graph. Every time I increase the π‘₯-coordinate by one, the 𝑦-coordinate goes up by one and a half. Or to make it easier with whole numbers doubling those, if I increase the π‘₯-coordinate by twos β€” that’s twice as many, then the 𝑦-coordinate goes up by three β€” that’s twice as many. So increasing the π‘₯-coordinate by two, the 𝑦-coordinate goes up by three. Increasing the π‘₯-coordinate by two, the 𝑦-coordinate goes up by three, and so on. And likewise coming back, if I decrease the π‘₯-coordinate by two, the 𝑦-coordinate is gonna go down by three, decrease the π‘₯-coordinate by two, the 𝑦-coordinate goes in the opposite direction down by three, and so on. And joining up the points, there’s our line. The slope was a positive number; the multiplier of π‘₯ was a positive number. So we know it should be an uphill line, which it is; so that’s good. And it cuts the 𝑦-axis at positive two, which it does; so that’s good.

Now let’s plot 𝑦 equals negative π‘₯ plus five. So looking at negative π‘₯, remember that means a negative one π‘₯. So our slope is negative one. Every time I increase my π‘₯-coordinate by one, my 𝑦-coordinate goes down by one. Now the number on its own is positive five. So this cuts the 𝑦-axis at positive five; the intercept is five. So let’s plot that intercept there. And then every time I increase the π‘₯-coordinate by one, the 𝑦-coordinate goes down by one, increase the π‘₯ by one, the 𝑦-coordinate goes down by one. And let’s carry on with that pattern to get these points and then go backwards. Every time I decrease my π‘₯-coordinate by one, the 𝑦-coordinate is gonna go up by one; the opposite of the negative side, it’s gonna go up by one. Decrease my π‘₯-coordinate by one, 𝑦-coordinate goes up by one, and so on. And joining up those points, there’s my line. Remember cuts the 𝑦-axis at five yup. And it’s a negative slope, so that’s a downhill slope. Every time I increase my π‘₯-coordinate by one, the 𝑦-coordinate decreases by one; that’s negative one π‘₯, which matches my graph.

Now let’s plot 𝑦 plus π‘₯ equals two. Well we’ve a slight problem here because this isn’t quite in this right format. It’s not in our 𝑦 equals something times π‘₯ plus another number format. So what I’m gonna do is I’m going to subtract π‘₯ from both sides of my equation, which gives me 𝑦 plus π‘₯ take away π‘₯ on the left-hand side and two take away π‘₯ on the right-hand side. So if I start off with positive π‘₯ and then I take away π‘₯, those two things are gonna cancel each other out. So I’ve just got 𝑦 on the left-hand side of my equation. Now on the right-hand side, I’ve got two take away π‘₯; now it doesn’t matter whether I say two take away π‘₯ or if I start off with negative π‘₯ and then I add two onto it. Remember this two on its own here is really a positive two. And in this format, it’s really easy to recognize that the negative π‘₯ means the negative one π‘₯. So the slope is negative one. And that plus two on its own here tells us that we’re cutting the 𝑦-axis at positive two. So I can put that on the graph. Here we go, cut the 𝑦-axis at positive two and then every time I increase my π‘₯-coordinate by one, the 𝑦 coordinate decreases by one. So these are the points you’re gonna generate. And when you join them up that’s what they’re gonna look like.

Now it’s also worth noting at this point I’ve been drawing all these little orange lines and showing you know increase π‘₯ by one the 𝑦-coordinate goes down by one, you don’t actually need to be doing those. So you only need to be plotting the points. So I’m just putting them on the page so you can see them. It makes it nice and clear what we’re doing β€” how we’re counting this up, but you wouldn’t normally draw those orange lines in when you’re plotting these graphs. Now the key learning point for this example was the fact that sometimes we have to rearrange our equation in order to get that 𝑦 equals π‘šπ‘₯ plus 𝑏 format, which makes it much easier to plot.

Let’s do another couple of examples then. So for this one, I’ve got π‘₯ plus 𝑦 plus three equals zero. I’m gonna have to do a bit more rearranging. So first of all, I’m gonna subtract π‘₯ from both sides. And when I do that, I’ve got π‘₯ and I’m taking away π‘₯ on the left-hand side, so I can cancel those two out. And on the right-hand side, I got zero take away π‘₯. Well that is just negative π‘₯. So I’ve got 𝑦 plus three is equal to negative π‘₯, still not quite the right format. So I need to take away three from both sides. And when I do that over on the left-hand side, I’ve got 𝑦 add three take away three. So if I have to do three take away three, that’s nothing; so these two terms over here cancel out. So I’ve got 𝑦 is equal to negative π‘₯ take away three. Great, that’s now in my 𝑦 equals π‘šπ‘₯ plus 𝑏 format. And negative π‘₯ is the same as negative one π‘₯, so our slope is negative one. So cutting the 𝑦-axis at negative three looks like that. And without doing all the ziggity zaggity lines all over the place, we can see that increasing our π‘₯-coordinate decreases our 𝑦-coordinate by one, leaves with these points which look like this when I join them up. So that’s the equation π‘₯ plus 𝑦 plus three equals zero, which I rearranged to 𝑦 equals negative π‘₯ take away three in order to quickly be able to see what the slope was, negative one, and where the 𝑦-intercept was, negative three.

So the big lesson of this example is that sometimes we need to rearrange our equation in order to get it into that 𝑦 equals π‘šπ‘₯ plus 𝑏 format so that we can easily work out the slope and the intercept. So to summarize then, 𝑦 equals π‘šπ‘₯ plus 𝑏 or π‘šπ‘₯ plus 𝑐 is the general form of the straight line equation. The multiplier π‘₯ is the slope, which means that when I increase my π‘₯-coordinate by one, the 𝑦-coordinate will increase by whatever that π‘š value is β€” whether it’s positive or whether it’s negative. And the 𝑏 value tells us the 𝑦-coordinate of the point on the line that cuts the 𝑦-axis. If the π‘š value was positive, we’ll have an uphill line that looks like this. And if it was negative, we’ll have a downhill line like that. Sometimes we need to rearrange the equation to get the 𝑦 equals π‘šπ‘₯ plus 𝑏 format and hence the slope and where it cuts the 𝑦-axis. And lastly remember not all equations rearrange into the 𝑦 equals π‘šπ‘₯ plus 𝑏 format. Not all functions represent straight line graphs.