Graphing a Line Using Table of Values

The most fundamental strategy to graph a line is the use of table of values. The goal is to pick any values of [latex]x[/latex] and substitute these values in the given equation to get the corresponding [latex]y[/latex] values. There’s no right or wrong way of picking these values of [latex]x[/latex]. As you develop your skills, you will learn how to select the appropriate values of [latex]x[/latex] depending on how you want to show the graph.

How to Set up a Table of Values

So how does it look? There are two ways to set up the table of values. If the table is presented horizontally, the top row will include all the values of [latex]x[/latex] while the bottom row will contain the corresponding [latex]y[/latex] value for each [latex]x[/latex]. On the other hand, when the table is shown vertically, the left column has the [latex]x[/latex]-values and the right column has the [latex]y[/latex]-values.

a vertical table is a table where the x and y values are written from top to bottom while a horizontal table the x and y values are written from left to right

Examples of How to Graph a Line using Table of Values

Let’s take a look at some examples to see how it works.

Example 1: Graph the equation of the line below using table of values.

y=2x-1

It doesn’t matter which kind of the table of values to use. For this one, we will use the horizontal format. The next step is to pick values of [latex]x[/latex].

There is no wrong way of selecting the [latex]x[/latex] values. Keep in mind that we need a minimum of two points to graph a line. That means it’s okay to go above the minimum requirements for better accuracy. For me, I always plot three points or more. The reason is that if the line doesn’t pass through the three points, it tells me that I have committed an error in my calculation. This gives me the opportunity to recheck my work.

To decide what [latex]x[/latex]-values to choose, I suggest that you look at the size of our [latex]xy[/latex]-axis. More particularly look at available numbers in the horizontal axis.

Suppose your teacher gives you this [latex]xy[/latex]-axis in your worksheet.

an xy axis with y axis having a maximum value of +4 and a minimum value of -4; with x axis axis having a maximum value of +4 and a minimum value of -4

If we want the graph to show within this [latex]xy[/latex]-axis, it makes sense to pick [latex]x[/latex] values that are between [latex]{ – 4}[/latex] and [latex]{ + 4}[/latex]. Always try to include the zero in one of your [latex]x[/latex] values because this will simplify your calculation. So, we chose the following [latex]x[/latex]-coordinates then place them in the table accordingly.

a horizontal table with x values of -1, 0 and 1

The next obvious step is to figure out the value of [latex]y[/latex] for each [latex]x[/latex] in the table. To do that, we will use the given equation of the line because it is the formula that gives us direct information how to arrive for the value of [latex]y[/latex] when given an [latex]x[/latex] value. We are going to use the formula three times since we have three values of [latex]x[/latex].

  • [latex]x = – 1[/latex]
if x = -1, y=-3
  • [latex]x = 0[/latex]
if x=0, y=-1
  • [latex]x = 1[/latex]
if x=1, y=1

Let’s collect those output values and place them in the row where [latex]y[/latex] values are located.

a table with x values of -1, 0, 1 and y values of -3, -1, and 1

Plot the three points in the [latex]xy[/latex]-axis.

three points plotted on an xy axis. the points are (-1,-3), (0,-1) and (1,1).

Using a straight edge (ruler), connect the dots to see the graph of the line. That’s it!

a line passing through the points (-1,-3), (0,-1) and (1,1).

Example 2: Graph the equation of the line below using table of values.

y=(-1/2)x+2

The first thing that stands out in this problem is that the coefficient of the “[latex]x[/latex]-term” is fractional. We need to be a little bit careful here since we can easily end up with fractional [latex]y[/latex]-values. Points with fractional coordinates can be tricky when plotting them on the axis.

For this problem, we want values of [latex]x[/latex] when multiplied by the coefficient of [latex] – {1 \over 2}[/latex] will give us positive or negative whole numbers. Since the denominator of the fraction is [latex]2[/latex], the values of [latex]x[/latex] must be multiples of [latex]2[/latex]. Right? Again, don’t forget to always include zero as one of your input values.

For this example, we will use the vertical format of the table values. For more practice, let’s have five input values of [latex]x[/latex].

a vertical table with x values of -4, -2, 0, 2, 4

Solve for the value of [latex]y[/latex] for each [latex]x[/latex] using the equation.

  • [latex]x = – 4[/latex]
if x=-4, y=4
  • [latex]x = – 2[/latex]
 if x=-2, y=3,
  • [latex]x = 0[/latex]
if x=0, y=2
  • [latex]x = 2[/latex]
if x=2, y=1
  • [latex]x = 4[/latex]
if x=4, y=0

Collect all [latex]y[/latex]-values from our calculations and place them in the appropriate location in the table of values.

a vertical table with x values of -4, -2, 0, 2, 4 and y values of 4, 3, 2, 1, 0.

Now it’s time to plot each point in the coordinate axis and connect them to reveal the graph of the line. And we’re done!

a line passing through the points (-4,4), (-2,3), (0,2), (2,1), and (4,0).

Example 3: Graph the equation of the line below using table of values.

y=(2/3)x+1

I see that we have a fractional coefficient of [latex]x[/latex] with a denominator of [latex]3[/latex]. That means our choice of [latex]x[/latex] coordinates will include zero ( as always! ) and some multiples of [latex]3[/latex].

Here are the selected values of [latex]x[/latex] for our table of values.

a vertical table with x values of -6, -3, 0, 3, 6

Let’s find the value of [latex]y[/latex] for each [latex]x[/latex] using the given equation [latex]y = {2 \over 3}x + 1[/latex].

  • [latex]x = – 6[/latex]
when x=-6, y=-3
  • [latex]x = – 3[/latex]
when x=-3, y=-1
  • [latex]x = 0[/latex]
when x=0, y=1
  • [latex]x = 3[/latex]
when x=3, y=3
  • [latex]x = 6[/latex]
when x=6, y=5

Put these [latex]y[/latex]-values together with the [latex]x[/latex]-values in a table.

a table with x values of -6, -3, 0, 3, 6 and y values of -3, -1, 1, 3, 5

Plot the points in the Cartesian plane and connect the dots to show the graph of the line.

a line passing through the points (-6,-3), (-3,-1), (0,1), (3,3), and ((6,5)

You may also be interested in these related math lessons or tutorials:

Three Ways to Graph a Line
Graphing a Line using Slope and y-intercept
Graphing a Line Using X and Y intercepts