We can plot a set of points to represent an equation. When such an equation contains both an x variable and a y variable, it is called an equation in two variables. Its graph is called a graph in two variables. Any graph on a two-dimensional plane is a graph in two variables.
Suppose we want to graph the equation y=2x−1y=2x−1. We can begin by substituting a value for x into the equation and determining the resulting value of y. Each pair of x– and y-values is an ordered pair that can be plotted. The table below lists values of x from –3 to 3 and the resulting values for y.
xx | y=2x−1y=2x−1 | (x,y)(x,y) |
−3−3 | y=2(−3)−1=−7y=2(−3)−1=−7 | (−3,−7)(−3,−7) |
−2−2 | y=2(−2)−1=−5y=2(−2)−1=−5 | (−2,−5)(−2,−5) |
−1−1 | y=2(−1)−1=−3y=2(−1)−1=−3 | (−1,−3)(−1,−3) |
00 | y=2(0)−1=−1y=2(0)−1=−1 | (0,−1)(0,−1) |
11 | y=2(1)−1=1y=2(1)−1=1 | (1,1)(1,1) |
22 | y=2(2)−1=3y=2(2)−1=3 | (2,3)(2,3) |
33 | y=2(3)−1=5y=2(3)−1=5 | (3,5)(3,5) |
We can plot the points in the table. The points for this particular equation form a line, so we can connect them. This is not true for all equations.

Figure 6
Note that the x-values chosen are arbitrary, regardless of the type of equation we are graphing. Of course, some situations may require particular values of x to be plotted in order to see a particular result. Otherwise, it is logical to choose values that can be calculated easily, and it is always a good idea to choose values that are both negative and positive. There is no rule dictating how many points to plot, although we need at least two to graph a line. Keep in mind, however, that the more points we plot, the more accurately we can sketch the graph.
How To: Given an equation, graph by plotting points.
- Make a table with one column labeled x, a second column labeled with the equation, and a third column listing the resulting ordered pairs.
- Enter x-values down the first column using positive and negative values. Selecting the x-values in numerical order will make the graphing simpler.
- Select x-values that will yield y-values with little effort, preferably ones that can be calculated mentally.
- Plot the ordered pairs.
- Connect the points if they form a line.
Example 2: Graphing an Equation in Two Variables by Plotting Points
Graph the equation y=−x+2y=−x+2 by plotting points.
Solution
First, we construct a table similar to the one below. Choose x values and calculate y.
xx | y=−x+2y=−x+2 | (x,y)(x,y) |
−5−5 | y=−(−5)+2=7y=−(−5)+2=7 | (−5,7)(−5,7) |
−3−3 | y=−(−3)+2=5y=−(−3)+2=5 | (−3,5)(−3,5) |
−1−1 | y=−(−1)+2=3y=−(−1)+2=3 | (−1,3)(−1,3) |
00 | y=−(0)+2=2y=−(0)+2=2 | (0,2)(0,2) |
11 | y=−(1)+2=1y=−(1)+2=1 | (1,1)(1,1) |
33 | y=−(3)+2=−1y=−(3)+2=−1 | (3,−1)(3,−1) |
55 | y=−(5)+2=−3y=−(5)+2=−3 | (5,−3)(5,−3) |
Now, plot the points. Connect them if they form a line.

Figure 7
Construct a table and graph the equation by plotting points: y=12x+2y=12x+2.
xx | y=12x+2y=12x+2 | (x,y)(x,y) |
−2−2 | y=12(−2)+2=1y=12(−2)+2=1 | (−2,1)(−2,1) |
−1−1 | y=12(−1)+2=32y=12(−1)+2=32 | (−1,32)(−1,32) |
00 | y=12(0)+2=2y=12(0)+2=2 | (0,2)(0,2) |
11 | y=12(1)+2=52y=12(1)+2=52 | (1,52)(1,52) |
22 | y=12(2)+2=3y=12(2)+2=3 | (2,3)(2,3) |

Figure 8
Candela Citations
- College Algebra. Authored by: OpenStax College Algebra. Provided by: OpenStax. Located at: http://cnx.org/contents/9b08c294-057f-4201-9f48-5d6ad992740d@3.278:1/Preface. License: CC BY: Attribution