Lesson Explainer: Graphing Linear Functions Mathematics • 6th Grade

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

Linear functions are used to define a linear relationship between two variables. They are functions with a constant rate of change and have many practical applications. For example, in economics, a demand curve may be a linear function of price and quantity. In science, Hooke’s law and Ohm’s law are linear relationships, the first between the force on a string and its length and the second between the voltage and the current in an electrical circuit.

Definition: Linear Functions

A linear function is a function whose graph is a straight line. The equation of a line in slope–intercept form is 𝑦=π‘šπ‘₯+𝑏, where π‘š and 𝑏 are constants. The constant π‘š is known as the slope, or gradient, of the line, and 𝑏 is the line’s 𝑦-interceptβ€”that is, where the line crosses the 𝑦-axis.

You may also see the equation of the line written as 𝑦=π‘šπ‘₯+𝑐. A linear function has one independent variable, π‘₯, and one dependent variable, 𝑦, and the highest power of π‘₯ is 1. The change in 𝑦 is proportional to the change in π‘₯, and the slope, π‘š, which is constant, is the ratio of the change in 𝑦 to the change in π‘₯.

Note that 𝑦=π‘šπ‘₯+𝑏 describes a linear relationship between the variables 𝑦 and π‘₯. We can also express this in function notation as follows: 𝑓(π‘₯)=π‘šπ‘₯+𝑏. Here, 𝑓 is a function of π‘₯, and a point on the line would have coordinates (π‘₯,𝑓(π‘₯)).

When it comes to graphing linear functions, how we approach this depends on the information we have. For example, we may be given two (or more) points on a line and can form a line by plotting these points and drawing a single line through them. We can work out the slope of this line using two points on the lineβ€”say, (π‘₯,𝑦) and (π‘₯,𝑦)οŠ¨οŠ¨β€”to calculate the ratio of the change in 𝑦 to the change in π‘₯, π‘š=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯.

Using this slope, together with one of the points, say, (π‘₯,𝑦), we can then find the exact value of the 𝑦-intercept, 𝑏, since if 𝑦=π‘šπ‘₯+π‘οŠ§οŠ§, rearranging gives us 𝑏=π‘¦βˆ’π‘šπ‘₯.

Note that the slope of the line is sometimes depicted as the rise over the run, where the rise is the change in 𝑦 between two points on the line and the run is the change in π‘₯ between the same two points.

It is important to remember that when the slope is positive, the line will slope upward from left to right and when the slope is negative, the line will slope downward from left to right.

One way of graphing a linear function is by making a table of values and plotting the coordinates of the points in our table. Let’s see how this works in an example.

Example 1: Graphing Linear Functions by Making Tables

Let us consider the function 𝑓(π‘₯)=8π‘₯βˆ’11.

  1. Fill in the table.
  2. Identify the three points that lie on the line 𝑦=8π‘₯βˆ’11.


Part 1

There are two parts to this question. The first requires us to complete the table by calculating the values of the function 𝑓(π‘₯)=8π‘₯βˆ’11, for the three π‘₯-values given. We can do this by substituting each of the π‘₯-values, π‘₯=βˆ’1,0, and 1, in turn, into the function as follows: 𝑓(βˆ’1)=8Γ—(βˆ’1)βˆ’11=βˆ’8βˆ’11=βˆ’19,𝑓(0)=8Γ—0βˆ’11=βˆ’11,𝑓(1)=8Γ—1βˆ’11=βˆ’3.

Completing the table with these values, we then have,


Part 2

The second part of the question asks us to identify the three points in the graph that lie on the line 𝑦=8π‘₯βˆ’11. Now, the purpose of creating a table of values for a function is to give us pairs of coordinates for the graph of that function. From our table, we see that the three coordinates for our function 𝑓(π‘₯) are (βˆ’1,βˆ’19), (0,βˆ’11), and (1,βˆ’3). Let’s plot these on our graph and see which of the given points they coincide with.

Plotting our first point, (βˆ’1,βˆ’19), we see that, on our graph, this coincides with the point labeled I.

Our next point, (0,βˆ’11), coincides with point H on the graph.

Finally, plotting our third point, (1,βˆ’3), we see that this coincides with point G on our graph.

Therefore, the three points that lie on the line 𝑦=8π‘₯βˆ’11 are points I, H, and G, as shown in the diagram below.

We may not always be given the equation of a line in the form 𝑦=π‘šπ‘₯+𝑏 and may have to rearrange a function into this form to help us identify the correct line. Our next example demonstrates this process.

Example 2: Graphing Linear Equations by Changing Their Form

Consider the equation 3𝑦=6π‘₯+32.

  1. Rearrange the equation into the form 𝑦=π‘šπ‘₯+𝑐.
  2. What are the slope and 𝑦-intercept of the equation?
  3. Use the slope and intercept to identify the correct graph of the equation.


Part 1

In this example, to identify the correct graph of the given equation, we must first rearrange the equation to find the slope and 𝑦-intercept. Our equation is 3𝑦=6π‘₯+32, so let’s begin by isolating 𝑦 on the left-hand side by dividing through by 3. This gives 𝑦=6π‘₯+33Γ—2=2π‘₯+12.

Separating out the terms on the right, we then have 𝑦=π‘₯+12.

Part 2

In the slope–intercept equation of a line, 𝑦=π‘šπ‘₯+𝑏, the coefficient of π‘₯ is the slope of the line. In our case, this is equal to 1 and the constant, 12, is the 𝑦-intercept, 𝑏.

Part 3

Now, if we check against the given graphs, as indicated below, the 𝑦-intercepts of graphs B, C, D, and E are 1, βˆ’12,βˆ’12, and βˆ’1 respectively. Since none of these are equal to the 𝑦-intercept of our lineβ€”that is, 𝑐=12β€”we can eliminate all four of these graphs.

This leaves us with only one option, graph A, as the correct graph. However, to be absolutely sure that graph A does match that of our equation, let’s check that the slope of the line in graph A is indeed equal to 1.

Recall that the slope of a line is given by π‘š=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯, where (π‘₯,𝑦) and (π‘₯,𝑦) are points on the line. From graph A, we see that the points ο€Ό0,12 and ο€Όβˆ’12,0 are on the line.

Then, using these points in the equation for the slope π‘š, we have π‘š=0βˆ’βˆ’0==1.

Hence, we have confirmed that both the slope, which is equal to 1, and the 𝑦-intercept, which is equal to 12, of graph A match that of the equation 3𝑦=6π‘₯+32, if it is expressed in slope–intercept form.

In our next example, we will match points on a graph with the equation of a line.

Example 3: Plotting Points of Linear Equations

Maged wants to draw the graph of the linear equation 𝑦=3π‘₯βˆ’4.

He plotted the points with π‘₯-coordinates 0, 1, 2, 3, and 4 but made one mistake.

  1. Which point is incorrect?
  2. What are the correct coordinates of this point?


Part 1

To find which of the points does not satisfy the equation 𝑦=3π‘₯βˆ’4, let’s first find the coordinates of each of the points on the graph. We can then insert the π‘₯- and 𝑦-values for each point into the equation to determine which is the incorrect point.

Tracing out the π‘₯- and 𝑦-coordinates on the graph for each point, we find the coordinates 𝐴(0,βˆ’4),𝐡(1,βˆ’1),𝐢(2,2),𝐷(3,4), and 𝐸(4,8). Now, substituting each of these in turn into the equation 𝑦=3π‘₯βˆ’4, we have the following: 𝐴(0,βˆ’4)βˆΆβˆ’4=3Γ—0βˆ’4=βˆ’4βœ“π΅(1,βˆ’1)βˆΆβˆ’1=3Γ—1βˆ’4=βˆ’1βœ“πΆ(2,2)∢2=3Γ—2βˆ’4=2βœ“π·(3,4)∢4=3Γ—3βˆ’4=5𝐸(4,8)∢8=3Γ—4βˆ’4=8βœ“Γ—

The only point whose coordinates do not satisfy the given equation is point D. Hence, point D is incorrect.

Part 2

To find the correct coordinates of this point, we substitute the π‘₯-coordinate, π‘₯=3, into the equation, giving 𝑦=3Γ—3βˆ’4=5.

Hence, as shown in the graph below, the correct coordinates of the point on the line 𝑦=3π‘₯βˆ’4, with π‘₯=3, are 𝐷(3,5).

In our next example, we will demonstrate how to make and use a table of values to determine which is the correct graph for a specified linear equation.

Example 4: Determining the Graph of a Linear Function Using a Table of Values

By making a table of values, determine which of the following graphs represents the equation 𝑦=12π‘₯+1.


We’re asked to make a table of values to help us determine which of the graphs represents the equation 𝑦=12π‘₯+1. This means choosing an appropriate set of π‘₯-values that we substitute into the given equation to calculate the associated 𝑦-values. We will then have a set of coordinates of points on the graph of the equation, which we can compare with the given graphs.

For the calculations to be straightforward, we choose points from the given graphs, with integer π‘₯-values. From lowest to highest, the graphs cross the π‘₯-axis at π‘₯=βˆ’2 (graphs A and D) and at π‘₯=2 (graphs B and E). We can also include π‘₯=0 so that we have three points to consider.


Now, using the equation 𝑦=12π‘₯+1 to calculate the 𝑦-coordinates for these π‘₯-values, we have π‘₯=βˆ’2βˆΆπ‘¦=12Γ—(βˆ’2)+1=βˆ’1+1=0,π‘₯=0βˆΆπ‘¦=12Γ—0+1=1,π‘₯=2βˆΆπ‘¦=12Γ—2+1=2.

Into our table, this gives us the following:


We now have the coordinates of three points on our graph: (βˆ’2,0),(0,1), and (2,2). By plotting these points on the given graphs, we can determine which of the graphs represents the equation 𝑦=12π‘₯+1.

As we can see, the only graph that goes through all three of our calculated points is graph A. Graphs B and C do not go through any of our three points, and graphs D and E go through only one of the points: respectively, (βˆ’2,0) and (0,1).

Hence, the equation 𝑦=12π‘₯+1 is represented in graph A.

In our final example, we use the slope and intercept of a graphed linear function to determine its equation.

Example 5: Graphing Functions

Which of the following is the function represented by the shown graph?

  1. π‘₯=23𝑦+2
  2. 𝑦=23π‘₯+2
  3. 𝑦=2π‘₯+23
  4. 𝑦=32π‘₯+2
  5. 𝑦=23π‘₯βˆ’2


To find which of the given functions is represented by the graph, we first recall that the slope–intercept form of a linear function is 𝑦=π‘šπ‘₯+𝑏, or, sometimes, 𝑦=π‘šπ‘₯+𝑐, where π‘š is the slope, or gradient, of the line and 𝑏 or 𝑐 is the 𝑦-intercept. All of the given options except option A are in this form, so let’s rearrange option A to slope–intercept form as follows: π‘₯=23𝑦+2⟺23𝑦=π‘₯βˆ’2βŸΊπ‘¦=32π‘₯βˆ’3.

Our options are now π΄βˆΆπ‘¦=32π‘₯βˆ’3,π΅βˆΆπ‘¦=23π‘₯+2,πΆβˆΆπ‘¦=2π‘₯+23,π·βˆΆπ‘¦=32π‘₯+2,πΈβˆΆπ‘¦=23π‘₯βˆ’2.

Now if we consider the given graph, we can see that the 𝑦-interceptβ€”that is, where π‘₯=0β€”is at 𝑦=2.

Substituting π‘₯=0 into each of our options, we find that only options B and D have their 𝑦-intercept at 𝑦=2. Options A, C, and E have 𝑦-intercepts at 𝑦=βˆ’3,23, and βˆ’2 respectively. Hence, we can eliminate options A, C, and E. This leaves us with options B and D to consider.

We can use what we know about the slope of a line to find which is the correct equation. Recall that given two points on a line, (π‘₯,𝑦) and (π‘₯,𝑦), the slope of the line is given by the ratio of the change in 𝑦 to the change in π‘₯, π‘š=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯.

Using our graph, we can choose two points on the line, say, (βˆ’3,0) and (0,2).

Using these two points, we can then calculate the slope: π‘š=0βˆ’2βˆ’3βˆ’0=23.

Comparing options B, 𝑦=23π‘₯+2, and D, 𝑦=32π‘₯+2, we see that only option B has the correct slope.

Hence, the function represented by the graph shown is option B: 𝑦=23π‘₯+2.

We conclude this explainer with some of the key points covered on graphing linear functions.

Key Points

  • A linear function can be expressed as 𝑦=π‘šπ‘₯+𝑏 (or 𝑦=π‘šπ‘₯+𝑐), where π‘š is the slope, or gradient, of the line and 𝑏 (or 𝑐) is the 𝑦-intercept. (This is known as the slope–intercept form of a line.)
  • The slope of a line, π‘š, sometimes called the rise over the run ο€½π‘š=riserun, is the ratio of the change in 𝑦 to the change in π‘₯. Given two points on the line, (π‘₯,𝑦) and (π‘₯,𝑦) the slope is then π‘š=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯.
  • We can graph a linear function by creating a table of values for π‘₯ and 𝑦 from the equation, plotting the coordinates of the points, and drawing the unique line through those points.
  • Given a graph of a linear function, we can find its equation by using the coordinates of points on the line to determine its slope and intercept.

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