### Video Transcript

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

Imagine weβve booked a gardener for a job, presumably some sort of shrubbery-based situation. We know that the gardener charges a 10-dollar call-out fee and then another 5 dollars per hour for their services. The total amount of money that the gardener will charge is then a function of the number of hours they work. Without knowing the exact number of hours that theyβre likely to take, we can set up a linear equation that can be used to predict the total cost for any time. Using π₯ to represent the total number of hours spent working and π¦ to represent the total cost in dollars, the linear equation is π¦ equals 10 plus five π₯. The graph of this equation is shown. With this in mind, letβs formalize some of the terms weβve used so far.

When a relationship assigns exactly one output for a given input, itβs called a function. And if the graph of that function is a nonvertical straight line, like in the previous example, that function is said to be linear. In the case of the amount of the gardener would charge, the linear function could be represented as π of π₯ equals 10 plus five π₯. π of π₯ is the output, where π₯ is the variable; itβs the input to the function. The set of inputs is known as the domain of the function, whilst the set of possible outputs is called the range. And for a linear function, both the domain and range is simply the set of real numbers.

Now it follows that since π₯ is the input to the function, the value of the function for a certain number can be found by substituting that number for the variable π₯. For instance, the total cost of the gardener if they work for eight hours is found by substituting π₯ equals eight. And the output is the value of π of eight. Itβs 10 plus five times eight, which is equal to 50. Now in doing so, we create an ordered pair, which is in general given by π₯, π of π₯. This ordered pair is a point on the graph of the function. And so, by calculating the value of two or more ordered pairs, we can construct the graph of a linear function. Letβs demonstrate this in our first example.

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.

Remember, given a function, the value of that function for a certain number can be found by substituting that number for the variable. In this case, thatβs π₯. We see from the table that weβre going to find the value of the function when π₯ equals negative one, when π₯ equals zero, and when π₯ is equal to one. So letβs begin by letting π₯ equal negative one. Weβre going to substitute negative one into the function. Replacing π₯ with negative one, and we find the value of the function at that point is π of negative one equals eight times negative one minus 11. Thatβs negative eight minus 11, which is simply negative 19. And so we filled in the first empty column of our table. When π₯ is negative one, π¦, which is equal to π of π₯, is negative 19.

Weβll now move on to π₯ equals zero. When π₯ is equal to zero, the value of the function π of zero is eight times zero minus 11 or zero minus 11, which is negative 11. And so π of zero is equal to negative 11, allowing us to fill in the second empty column of our table. To complete the third empty column, weβre going to substitute π₯ equals one. That gives us π of one, which is eight times one minus 11 or eight minus 11, which is negative three. And so weβve completed our table. The three values are negative 19, negative 11, and negative three.

Itβs worth noting that there is a pattern in the differences between each value of the function. Each value of the function increases by eight each time. This is no accident. Given consecutive integer values for π₯, we should notice that the corresponding values of the function should increase by some constant amount.

Now, weβre also asked to identify the three points on the graph that lie on the line π¦ equals eight π₯ minus 11. Now, in completing the table of values, weβve produced ordered pairs, which are essentially coordinates on the graph of that function. The first ordered pair is negative one, negative 19. The second is zero, negative 11. And the third set of values, and hence the third ordered pair, is one, negative three.

If we plot these on our graph, weβll see which of the given points they coincide with. Negative one, negative 19, we can see on our graph that this coincides with the point labeled πΌ. Zero, negative 11 coincides with the point π». And one, negative three coincides with the point πΊ. Whilst not explicitly necessary in this example, for completeness we can draw a line through these points. And so we have the line representing the function π of π₯ equals eight π₯ minus 11.

And so weβre finished. The values that go in our table are negative 19, negative 11, and negative three. And the three points that lie on this line are πΌ, π», and πΊ, respectively.

In this example, we demonstrated how to find the output of a function given its rule and that allowed us to sketch its graph. In our next example, weβll use known values to identify the graph of a linear relation, and then weβll use the graph to identify any unknown values.

The following table represents a linear relation. Which of the following graphs represents this line? Find the values of π and π. Write the equation of the straight line in the form π of π₯ equals ππ₯ plus π.

Remember, when we create a table of values for some linear function, weβre essentially creating a group of ordered pairs. And each ordered pair is a point on the line of the graph of the function. We, in fact, have two complete ordered pairs here. The first one has an π₯-value of zero and a π¦-value of one. So the ordered pair is zero, one. The second has an π₯-value of one and a π¦-value of three, so the ordered pair is one, three. And in fact, whilst itβs good practice to write more than two ordered pairs, two ordered pairs is enough to identify or draw the graph of a linear relation.

Letβs begin by plotting the coordinate zero, one on each of the graphs. In doing so, we see that we have two graphs that satisfy this coordinate. They are graphs (A) and (E). To be able to identify which of these graphs represents the line, weβll plot the coordinate one, three. In doing so, we see that we can also now disregard graph (A). And so graph (E) is the graph that represents our linear relation. We can now use this graph to find the values of π and π.

We can see from the table that π is the π¦-value that corresponds to an π₯-value of two. So we can draw a vertical line up from π₯ equals two until we hit the graph of our function and then a horizontal line until we hit the π¦-axis. When we do, we find the output for an input of two is five, so π is equal to five. Letβs repeat this process to help us find the value of π. This time, the π₯-coordinate is three. So we draw a vertical line up from three until we hit the graph of our relation and then a horizontal line until we hit the π¦-axis. Thereβs no value written here, but it is a fairly simple scale. Each large square represents one, so π must be equal to seven. And so the values of π and π are five and seven, respectively.

The final part of this question asks us to write the equation of the straight line. And it gives it in the form π of π₯ equals ππ₯ plus π. In other words, we need to link each π₯-value with each π¦-value. A sensible pair of values to choose would be when π₯ is equal to zero. When π₯ is equal to zero, our function π of π₯ equals ππ₯ plus π is π of zero, which equals π times zero plus π. π times zero is zero. So we see that π of zero is equal to π. But of course π of zero is our output, which in this case has a value of one. So we can say that π must be equal to one. And so the equation of our line will be of the form π of π₯ equals ππ₯ plus one.

Now that we have the value of π, letβs use the second ordered pair to find the value of π. Substituting π₯ equals one into the equation π of π₯ equals ππ₯ plus one, and we get that π of one is equal to π times one plus one, which is simply π plus one. Now, of course, π of one is the output to the relation when the input is one. And we see from the table that thatβs three. So we can rewrite this as three equals π plus one. Then we can solve this equation by subtracting one from both sides. And that tells us that π is equal to two. And so the equation of our line is π of π₯ equals two π₯ plus one.

Now that we know the values of π and π, we could in fact check this result by substituting π₯ equals two in and checking we get five out or π₯ equals three in and checking that we get seven out. In both cases, we do, confirming that the equation of our straight line is π of π₯ equals two π₯ plus one.

Now in the previous two examples, weβve seen a very simple linear relation and its corresponding graph and a table of values. We notice in the first example that when the π₯-values are consecutive, their corresponding π¦-values or output values will increase or sometimes decrease by the same amount each time. In fact, that amount corresponds to the coefficient of π₯. In this example, the coefficient of π₯ was two and our π¦-values increased by two each time. In the previous example, the coefficient of π₯ was eight and the π¦-values or π of π₯ values increased by eight each time. Whilst itβs outside the scope of this lesson to investigate this in too much detail, it can serve as a useful check of our results.

Letβs consider another example, but this time the coefficient of π₯ is going to be negative. And that will result in the corresponding outputs decreasing and the graph of the function sloping downwards.

Consider the linear function π of π₯ equals five minus two π₯. We can draw a straight line to represent this function. Complete the table to find the coordinate of points on the line. Which of the following is the graph of the function?

And thereβs a third and final part to this question which weβll consider in a moment. We have a linear function π of π₯ equals five minus two π₯. And so we know that the graph of this function is going to be a nonvertical straight line. Weβll find a set of ordered pairs that satisfy this linear function by substituting π₯ equals negative two, negative one, zero, one, and two into the expression five minus two π₯. Weβll begin by letting π₯ equal negative two. So weβre calculating π of negative two, which is five minus two times negative two. Thatβs five plus four, which is, of course, equal to nine. And so the first value in our table is nine.

To find the next ordered pair, the next value in our table, weβll calculate π of negative one by substituting negative one into the expression five minus two π₯. That gives us five minus two times negative one, which is five plus two, which is, of course, equal to seven. Letβs repeat this process with π₯ equals zero. When we do, we get five minus two times zero. Thatβs five minus zero, which is equal to five. Now we could continue in this manner working out π of one and π of two. But this is a linear function, and so we should be able to spot a pattern for the π of π₯ values as long as the π₯-values themselves are consecutive.

Well, they do indeed increase by one each time. And so we notice that the π of π₯ values decrease by two each time. This means that we can find the value of π of one by subtracting two from five to give us three. In a similar way, we can subtract two from three to find π of two, and itβs equal to one. And so the values in our table are as shown.

We now have enough information to find the correct graph of our function. The ordered pairs that lie on the graph of the function are negative two, nine; negative one, seven; zero, five; and so on. These are simply taken from the table. And so we plot each of these values on every single pair of axes. And we see that the only pair of axes which contains the correct graph is (D). (D) is the graph of π of π₯ equals five minus two π₯.

We now clear some space and answer the third part of this question.

It says, which of these points is not on the line? Is it six, negative six; negative three, 11; negative four, 13; three, negative one; or four, negative three?

Now we have two techniques here. We could, of course, simply add each of these points to the graph of our function and see which one does not lie on the line. Alternatively, we can substitute the π₯-value into the function π of π₯ equals five minus two π₯ and see if the resulting output is the same as the π¦-value in the ordered pair. In other words, for our first ordered pair, we substitute π₯ equals six. That gives us five minus two times six or five minus 12, which is of course equal to negative seven. And so, in fact, when π₯ is equal to six, π¦ is equal to negative seven and not negative six. So the answer must be (A).

For completeness, weβll check the remaining points. π of negative three is 11 as required, and π of negative four is 13. We can plot point (D) directly onto the graph, and we see it does indeed lie on this line, as does point (E). Four, negative three lies on the line. And so the point that doesnβt lie on the line is six, negative six.

Now, before we wrap up this lesson, weβre going to look at a very special case of a linear function. We said that a linear function has a graph which is a nonvertical straight line. The special case, which is indeed a constant function, is of the form π¦ equals π or, of course, in function notation π of π₯ equals π, where π is a real number. In this case, the function is represented graphically by a horizontal line.

As an example, suppose weβre asked to draw the graph of the function π of π₯ equals three. We see that the output of this function is independent of the value of π₯. No matter the value of π₯ we substitute in, we will always get an output of three. And so we draw a line whose π¦-coordinate is always three. Itβs a horizontal line that passes through the π¦-axis at three. In a similar way, the graph of π¦ equals negative one or π of π₯ equals negative one is as shown. Itβs a horizontal line that passes through the π¦-axis at negative one.

Weβll now recap the key points from this lesson. In this lesson, we learned that the graph of a linear function is a nonvertical straight line. And when graphing a function, the coordinates of each point on the graph are given by π₯, π of π₯ β input and output. And we learned about a special case where the function is equal to some real constant π, π of π₯ equals π or π¦ equals π. In this case, we have simply a horizontal line where all the π¦-coordinates are equal to π.