Video: Graphing Linear Functions

In this video, we will learn how to graph linear functions.

17:52

Video Transcript

In this video, we will learn how to graph linear functions. We will identify the slope and 𝑦-intercept of a line and learn how to use a table of values to draw the graph of a function.

Let’s start by thinking about what a linear function is. The general form of a linear function is 𝑦 equals π‘šπ‘₯ plus 𝑏 or it may also be seen as 𝑦 equals π‘šπ‘₯ plus 𝑐. A linear function has two variables π‘₯ and 𝑦, and there is no higher power of π‘₯ than simply π‘₯ to the power of one. In both forms of this linear function, the letter π‘š, which is the coefficient of π‘₯, represents the slope or gradient of the line. The slope of a line indicates how steep the line is. The constant, 𝑏 or 𝑐, indicates the 𝑦-intercept of the linear function. So let’s have a look at some drawn linear functions.

If we start with one of the most basic linear functions, the line 𝑦 equals π‘₯, we can see that the gradient, the coefficient of π‘₯, would be one. And there’s also no constant term at the end of this function, which indicates that the 𝑦-intercept would be zero. And we could see here that it passes through the 𝑦-axis at the point zero, zero. If we compare this to the line 𝑦 equals π‘₯ plus two, we can see that the gradient remains the same at one. But this time, the 𝑦-intercept is plus two, and we can see on the graph that it crosses the 𝑦-axis at the point two.

So if we wanted to draw the graph of the function 𝑦 equals π‘₯ minus one, what would that look like? Well, the slope of the line would be the same as the other two lines. And this time, the 𝑦-intercept would be negative one. So if we want to consider how we find the 𝑦-intercept of a line, if we are given that the function written down, we can identify it from the equation in the form 𝑦 equals π‘šπ‘₯ plus 𝑏. And if we’re only given the drawn function, then we can identify the 𝑦-intercept simply by looking at where it crosses the 𝑦-axis.

We’ll now have a look at how changing the slope of a function changes how it looks when we graph it. Starting with our reference line of 𝑦 equals π‘₯, we can see that when we graph the function at 𝑦 equals two π‘₯, this line is much steeper. In other words, the coefficient of π‘₯, the slope, is greater than it was in 𝑦 equals π‘₯. For every one unit on the π‘₯-axis, the line 𝑦 equals π‘₯ goes up one unit on the 𝑦-axis. If we compare this to the line 𝑦 equals two π‘₯ then for every one unit on the π‘₯-axis, then it goes up by two units on the 𝑦-axis.

So if we wanted to graph the function 𝑦 equals three π‘₯, then for every one unit on the π‘₯-axis, it would go up three units on the 𝑦-axis, which would look like this. We can notice that since none of these three graphs had any constant term, then that means that they all go through zero on the 𝑦-axis. The 𝑦-intercept is zero. So what happens if we have a negative gradient, for example, the function 𝑦 equals negative π‘₯? We can see that lines with a negative gradient slope downwards from left to right.

Now, we can think about how we identify the slope of a line. The slope of a line is often referred to as the rise over the run, where the rise is the increase or decrease in the 𝑦-values. And the run is the increase or decrease in the π‘₯-values. We can also use the formula that, between two coordinates π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two, the slope is calculated by 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one.

So, if on our line we chose the coordinates one, three and zero, one, we can identify either of these coordinates with the π‘₯ one, 𝑦 one or π‘₯ two, 𝑦 two values and substitute them into the equation. Here, we have our 𝑦 two value of one minus our 𝑦 one value of three over our π‘₯ two value of zero subtract our π‘₯ one value of one. This will simplify to negative two over negative one, which would mean that the slope of this line is two. If we wanted to use the rise over the run, we would have a rise of two and a run of one, giving us two over one, which is two.

We can now think about how we would graph a linear function. The first method is by using a table of values. In this method, we take a few key values for π‘₯ and work out the corresponding 𝑦-values. So, for example, if we wanted to graph 𝑦 equals three π‘₯ plus one, we could choose π‘₯-values of zero, one, and two. And we would then substitute these values into our function to work out the 𝑦-value. Here, we would have 𝑦 is equal to three times zero plus one as our first 𝑦-value, which would mean that 𝑦 would be equal to one. For our second π‘₯-value of one, we would substitute in π‘₯ equals one into our function to give us three times one plus one, which is four. And for our final value when π‘₯ equals two, we have 𝑦 is equal to three times two plus one, which is six plus one, giving us seven.

So now, we’ve found three coordinates which lie on this line, zero, one; one, four; and two, seven. So what we need to do is draw our axis, plot these three coordinates, and draw a line through them. The advantage of a table of values is that it gives us coordinates for our line even if we’re not entirely sure what it looks like before we begin, which brings us to the second way in which we can graph a linear function. And that’s by identifying the features of the function when it’s in the form 𝑦 equals π‘šπ‘₯ plus 𝑏.

For example, if we were drawing the graph of 𝑦 equals three π‘₯ plus one, we would know that the slope must be three, meaning that, for every one on the π‘₯-axis, it would go three up on the 𝑦-axis. And since the 𝑦-intercept is one, it would cross the 𝑦-axis at zero, one. When using this method, we need to be careful and remember that a positive slope means that the line slopes upwards from left to right. And a negative slope means that the line slopes downwards from left to right.

We’re now going to put into practice what we’ve learned by looking at some example questions. In the first question, we’ll look more closely at how to fill in a table of values.

Let us consider the function 𝑓 of π‘₯ equals eight π‘₯ minus 11. Fill in the table. Identify the three points that lie on the line 𝑦 equals eight π‘₯ minus 11.

So here, we have our function 𝑓 of π‘₯ equals eight π‘₯ minus 11. We need to find the three missing 𝑦-values by substituting in to 𝑓 of π‘₯. So, in order to find our 𝑦-value when π‘₯ is negative one, we substitute π‘₯ equals negative one into our function. So we have eight times negative one minus 11. And since eight times negative one is negative eight, we have negative eight minus 11, giving us negative 19. And that’s our first missing value in the table. For our next missing value, we substitute π‘₯ equals zero into the function, giving us eight times zero minus 11, giving us zero minus 11 which is negative 11. And so we have our second value in the table.

For the final value in the table, we have when π‘₯ is one, eight times one minus 11, which is equal to eight minus 11, giving us an answer of negative three. So the answer to the first part of the question is the three values in the table are negative 19, negative 11, and negative three. The purpose of creating a table of values for a function is to give us pairs of coordinates. So the first pair of coordinates will be negative one, negative 19. The second will be zero, negative 11. And the third pair will be one, negative three.

Looking at the graph to identify the coordinate negative one, negative 19, we read the π‘₯-coordinate first going to negative one and then downwards on the 𝑦-axis to negative 19. And so we can identify that point 𝐼 will lie on the line. For the coordinate zero, negative 11, we don’t move on the π‘₯-axis and we go down to negative 11. And so we can identify that point 𝐻 would also be on the line of this function. For the third coordinate, we can identify if we go across on the π‘₯-axis one and down negative three, then this will be the point 𝐺. So the three points are 𝐼, 𝐻, and 𝐺. If we had been asked to graph this function and we’d found these three coordinates, we would have plotted them. And then we can draw a smooth line going through the three points.

In the next example, we’ll explore what to do whenever we have a function that isn’t given in the general form 𝑦 equals π‘šπ‘₯ plus 𝑐.

Consider the equation three 𝑦 equals six π‘₯ plus three over two. Rearrange the equation into the form 𝑦 equals π‘šπ‘₯ plus 𝑐. What are the slope and 𝑦-intercept of the equation? Use the slope and intercept to identify the correct graph of the equation.

Let’s begin this question by having a look at the first part. Here, we’re asked to rearrange our equation into the form 𝑦 equals π‘šπ‘₯ plus 𝑐. We can remember that this form, 𝑦 equals π‘šπ‘₯ plus 𝑐 or often 𝑦 equals π‘šπ‘₯ plus 𝑏, is the general form which allows us to identify key parts of a graph. We can see that our equation has a 𝑦 and an π‘₯ in the same way that the general form has a 𝑦 and an π‘₯. The difference here is that we have a three 𝑦 instead of just 𝑦. So we’ll need to divide both sides of our equation by three.

This means that, on the right-hand side, we’ll be dividing by two multiplied by three. And as two times three is six, we have 𝑦 equals six π‘₯ plus three over six. In order to simplify this fraction, we can consider the right-hand side as six π‘₯ over six plus three over six. This is equivalent to 𝑦 equals π‘₯ plus a half. And this means we have rearranged the equation into the form 𝑦 equals π‘šπ‘₯ plus 𝑐. For the second part, we can recall that when we have 𝑦 equals π‘šπ‘₯ plus 𝑐, then the coefficient of π‘₯, the letter π‘š, indicates the slope or gradient of an equation. The constant term 𝑐 represents the 𝑦-intercept.

So when we take our equation in this form, that’s 𝑦 equals π‘₯ plus a half, the slope will be represented by the coefficient of π‘₯, which in this case would be one. The 𝑦-intercept will be positive one-half, which we can write as a half. And so we have answered the second question. We can now take a look at the graph options for the third part of the question. We’ve established that the 𝑦-intercept of our graph will be at a half. We can see on our first graph that the 𝑦-intercept is a half since the graph crosses through half on the 𝑦-axis. So this may be a possible answer.

On the second graph, it crosses the 𝑦-axis at negative a half. And so we can rule out the second graph. The third graph has a 𝑦-intercept of one, so this does not fit. And the fourth has a 𝑦-intercept at negative one. The final graph has a 𝑦-intercept of negative a half. So this wouldn’t work either. This means that we have one answer left, but it is worth checking if the slope is equal to one.

We can recall that, to find the slope of a line between two coordinates π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two, we calculate 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one. We can select any two coordinates that lie on the line. Here we have zero, a half and one, three over two. It doesn’t matter which one we designate as π‘₯ one, 𝑦 one and which we designate as π‘₯ two, 𝑦 two. So to find the slope, we have three-halves subtract a half over one minus zero. And since three-halves subtract a half is one and one subtract zero is one, we have one over one, which means that the slope is indeed equal to one. And so our answer is that it is the first graph which represents the equation three 𝑦 equals six π‘₯ plus three over two.

By making a table of values, determine which of the following graphs represents the equation 𝑦 equals a half π‘₯ plus one.

In this question, we’re asked to make a table of values. This can be a very useful tool to help us draw the graphs of functions. Setting up a table of π‘₯- and 𝑦-values will give us sets of coordinates that will lie on the graph. So which π‘₯-values do we choose then? Well, we can see that all of our graph options roughly go from π‘₯ is negative four up to π‘₯ is four. So choosing a few values within this range would be a sensible option.

In order to find the 𝑦-value for each π‘₯-value, we substitute into the equation 𝑦 equals a half π‘₯ plus one. So when π‘₯ is negative two, we have 𝑦 equals a half times negative two plus one. And a half times negative two will give us negative one. So we have 𝑦 equals negative one plus one, which is zero. And so we found that when π‘₯ is negative two, 𝑦 is equal to zero. When π‘₯ is equal to negative one, we have 𝑦 equals a half times negative one plus one. And a half times negative one is negative a half plus one. And so we found another pair of values in the table.

We can continue to complete the values in the table. When we have completed the table of values, we will be able to identify coordinates which lie on the line. Taking the first set of coordinates of negative two, zero, we can see that only graphs C and E have this coordinate on the line. Identifying the second coordinate of negative one, a half, on graph C, we can see that this will be negative one, negative a half, meaning that we can rule out option C. We can confirm that graph E does go through the coordinate negative one, a half. It also goes through the coordinate zero, one; one, three over two; and two, two. Therefore, the graph given in E represents the equation 𝑦 equals a half π‘₯ plus one.

In this example, we saw how we could use a table of values to recognize an equation of a function. In the next example, we’ll use the features of the equation to recognize the graph.

Which of the following is the function represented by the shown graph? Option A, 𝑦 equals three-halves π‘₯ plus two. Option B, 𝑦 equals two π‘₯ plus two-thirds. Option C, 𝑦 equals two-thirds π‘₯ minus two. Option D, π‘₯ equals two-thirds 𝑦 plus two. Or option E, 𝑦 equals two-thirds π‘₯ plus two.

Let’s recall that the general form of a linear equation is 𝑦 equals π‘šπ‘₯ plus 𝑏 or 𝑦 equals π‘šπ‘₯ plus 𝑐, where the constant term of 𝑏 or 𝑐 represents the 𝑦-intercept of the function. The value of π‘š will indicate the slope or gradient of the line. So therefore, if we were to calculate the slope and the 𝑦-intercept of this drawn function, we could work out what the function is. We can recall that, between two coordinates π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two, the slope is equal to 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one.

We can select any two coordinates on the line for π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two. But often the easiest ones to pick are those which have integer values. We can see here that zero, two and three, four both lie on the line. It doesn’t matter which coordinate we designate as π‘₯ one, 𝑦 one and which we designate as π‘₯ two, 𝑦 two. To find the slope, we substitute in our 𝑦 two and 𝑦 one values to give us four minus two over the π‘₯ two minus π‘₯ one values, which is three minus zero. Simplifying this, we have a slope of two-thirds.

To find the 𝑦-intercept, we look at the graph to see where it crosses the 𝑦-axis. And that happens when the 𝑦-value is two. We can then fill in our values of slope and 𝑦-intercept into the general equation. We found that the slope π‘š is equal to two-thirds and the 𝑦-intercept of 𝑏 is equal to two. And so our answer is that given in option E, 𝑦 equals two-thirds π‘₯ plus two.

We can now summarize what we’ve learned in this video. We learned that a linear function can be expressed as 𝑦 equals π‘šπ‘₯ plus 𝑏 or 𝑦 equals π‘šπ‘₯ plus 𝑐. The value of π‘š represents the slope or gradient. And the constant value of 𝑏 or 𝑐 represents the 𝑦-intercept of the line. The slope of a line is equal to the rise over the run. It can also be calculated by 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one for the coordinates π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two. We saw that we can graph a function either by creating a table of values and plotting the coordinates or by inspecting the equation to find the values of the slope and 𝑦-intercept. This second method is a little bit more difficult, but it does get easier the more we practice graphing linear functions.

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