6.3.1: Graphing Linear Equations in Two Variables

Learning Outcomes

  • Plot linear equations in two variables on the coordinate plane.
  • Use intercepts to plot lines.
  • Use a graphing utility to graph a linear equation on a coordinate plane.

Key words

  • Graph in two variables: a graph on a 2-dimensional plane
  • x-intercept: the point where the graph crosses the x-axis
  • y-intercept: the point where the graph crosses the y-axis

Graphing Linear Equations

Using Points to Plot Linear Equations

To graph a linear equation in two variables, we can plot a set of ordered pair solutions as points on a rectangular coordinate system. 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=2x1. We can begin by finding solutions for the equation by substituting values 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.

x y=2x1 (x,y)
3 y=2(3)1=7 (3,7)
2 y=2(2)1=5 (2,5)
1 y=2(1)1=3 (1,3)
0 y=2(0)1=1 (0,1)
1 y=2(1)1=1 (1,1)
2 y=2(2)1=3 (2,3)
3 y=2(3)1=5 (3,5)

When we plot the points in the table, they form a line, so we can connect them.

This is not true for all equations, but the graph of a linear equation is always a line.

This is a graph of a line on an x, y coordinate plane. The x- and y-axis range from negative 8 to 8. A line passes through the points (-3, -7); (-2, -5); (-1, -3); (0, -1); (1, 1); (2, 3); and (3, 5).

Note that the xvalues 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 2 to graph a line and at least 3 to guarantee the line is correct. Keep in mind, however, that the more points we plot, the more accurately we can sketch the graph.

How To graph a linear equation

  1. Make a solutions table.
  2. Plot the ordered pairs on a rectangular coordinate system.
  3. Connect the points if they form a line.

Example

Graph the equation y=x+2 by plotting points.

Solution

First, we construct a table by choosing x-values and calculating the corresponding y-values.

x y=x+2 (x,y)
5 y=(5)+2=7 (5,7)
3 y=(3)+2=5 (3,5)
1 y=(1)+2=3 (1,3)
0 y=(0)+2=2 (0,2)
1 y=(1)+2=1 (1,1)
3 y=(3)+2=1 (3,1)
5 y=(5)+2=3 (5,3)

Now, plot the points. Connect them since they form a line.

This image is a graph of a line on an x, y coordinate plane. The x-axis includes numbers that range from negative 7 to 7. The y-axis includes numbers that range from negative 5 to 8. A line passes through the points: (-5, 7); (-3, 5); (-1, 3); (0, 2); (1, 1); (3, -1); and (5, -3).

Try It

Construct a table and graph the equation by plotting points: y=12x+2.

TRY IT

Using Intercepts to Plot Linear Equations

The intercepts of a graph are points where the graph crosses the axes. The x-intercept is the point where the graph crosses the xaxis. At this point, the ycoordinate is zero. The The yintercept is the point where the graph crosses the yaxis. At this point, the xcoordinate is zero.

INTERCEPTS

The x-intercept is the point where the graph crosses the x-axis. At this point y=0.

The y-intercept is the point where the graph crosses the y-axis. At this point x=0.

To determine the xintercept, we set y equal to zero and solve for x. Similarly, to determine the yintercept, we set x equal to zero and solve for y. For example, let’s find the intercepts of the equation y=3x1.

To find the xintercept, set y=0.

y=3x10=3x11=3x13=x(13,0)x-intercept

To find the yintercept, set x=0.

y=3x1y=3(0)1y=1(0,1)y-intercept

 

We can confirm that our results make sense by looking at a graph of the equation. Notice that the graph crosses the axes where we predicted it would.

This is an image of a line graph on an x, y coordinate plane. The x and y-axis range from negative 4 to 4. The function y = 3x – 1 is plotted on the coordinate plane

Example

Find the intercepts of the equation y=3x4. Then sketch the graph using only the intercepts. Verify your graph by determining another point on the line.

Solution

Set y=0 to find the x-intercept.

y=3x40=3x44=3x43=x(43,0)x-intercept

 

Set x=0 to find the y-intercept.

y=3x4y=3(0)4y=4(0,4)y-intercept

 

Plot both points and draw a line passing through them.

This is an image of a line graph on an x, y coordinate plane. The x-axis ranges from negative 5 to 5. The y-axis ranges from negative 6 to 3. The line passes through the points (-4/3, 0) and (0, -4).
We can check our line by finding a third point: choose x1, then y=3x4y=3(1)4y=1.
The point (1,1) lies on the graph so we know we have the correct line.

Try It

Using a Graphing Utility to Plot Equations

We can use an online graphing tool to quickly plot lines. Watch this short video Tutorial to learn how.

Try It

Desmos has a helpful feature that allows us to turn a constant (number) into a variable. Follow these steps to learn how:

  1. Graph the line y=23x43.
  2. On the next line enter y=ax43. You will see a button pop up that says “add slider: a”, click on the button. You will see the next line populated with the variable a and the interval on which a can take values.
  3. What part of a line does the variable a represent? The slope or the y-intercept?

Here is a short tutorial with more information about sliders.