Lesson Objectives
  • Demonstrate the ability to create a table of ordered pair solutions for a linear equation in two variables
  • Demonstrate the ability to plot an ordered pair
  • Learn how to graph a linear equation in two variables
  • Learn how to find the x-intercept and the y-intercept
  • Learn how to graph a linear equation in two variables using the intercept method
  • Learn how to graph a linear equation in two variables that passes through the origin
  • Learn how to graph a horizontal line and vertical line

How to Graph a Linear Equation in Two Variables


In our last lesson, we reviewed the basic definition of a linear equation in two variables. Additionally, we learned how to create a table of ordered pair (x, y) solutions, and how to plot a point (an ordered pair) on the coordinate plane.
A linear equation in two variables is of the form:
ax + by = c
Where x and y are the variables, a and b are the coefficients of x and y, and c is our constant. We are able to replace a, b, and c with any real number. The only restriction we have is that a and b, the coefficients of x and y, cannot both be 0. A linear equation in two variables has an infinite number of ordered pair solutions (x,y). For this reason, it is normal to graph the equation and show a visual representation of the solution set.
There are many different ways to graph a linear equation in two variables. In this lesson, we will focus on gathering ordered pair solutions, plotting the ordered pairs, and then sketching a line through the points. In the coming lessons, we will learn much faster approaches, but for now, we will focus on the fundamentals.

Graphing a Linear Equation in Two Variables

  • Generate three points » ordered pair solutions (x,y) for the linear equation in two variables
  • Plot each point on the coordinate plane
  • Sketch a line through the given points and draw arrows at each end
Let's look at an example.
Example 1: Graph each equation.
x + 4y = 6
Let's begin by generating three points (ordered pair solutions). In order to graph a line, we need at least two points. A third point is usually recommended to guard against errors. Recall from our last lesson that we can find an order pair solution by picking a value for x and solving for y or picking a value for y and solving for x. When we graph equations, we typically want to work with single-digit integers if possible. To make things easier, we have chosen some values to work with. Let's complete the table below:
x y (x, y)
-2__(-2, __)
__3(__, 3)
2__(2,__)
First and foremost, we have an x-value of (-2). Let's plug in a (-2) for x and solve for y:
-2 + 4y = 6
4y = 8
y = 2
Our first point: (-2,2)
x y (x, y)
-22(-2, 2)
__3(__, 3)
2__(2,__)
Let's now work on the second point. We have a y-value of 3. Let's plug in a 3 for y and solve for x:
x + 4(3) = 6
x + 12 = 6
x = -6
Our second point: (-6, 3)
x y (x, y)
-22(-2, 2)
-63(-6, 3)
2__(2,__)
Lastly, we will work on the third and final point. We have an x-value of 2. Let's plug in a 2 for x and solve for y:
2 + 4y = 6
4y = 4
y = 1
Our third point: (2, 1)
x y (x, y)
-22(-2, 2)
-63(-6, 3)
21(2, 1)
Now that we have three ordered pairs: (-2, 2), (-6, 3), and (2, 1), let's plot these points on the coordinate plane: Plotting the ordered pairs (-2,2), (-6,3) and (2,1) For our last step, we will draw a straight line through the points. Arrows are drawn at each end of the line to indicate that our solution continues forever in each direction. Graph of the equation x + 4y=6, obtained by plotting the ordered pairs (-2,2), (-6,3) and (2,1) and drawing a line through the points with an arrow at each end

The Intercept Method - Graphing Linear Equations in Two Variables

On most lines, we have an x-intercept and a y-intercept. The x-intercept is the point at which the graph of the equation crosses the x-axis. If we pay close attention to the coordinate plane, we can see that any point on the x-axis has a y location of 0. This means we can find the x-intercept or the point where the graph impacts the x-axis by plugging in a 0 for y and solving for x. Similarly, we have what is known as the y-intercept. This is the point at which the graph of the equation crosses the y-axis. If we pay close attention to the coordinate plane, we can see that any point on the y-axis has an x location of 0. This means we can find our y-intercept or the point where the graph impacts the y-axis by plugging in a 0 for x and solving for y. Let's look at an example.
Example 2: Graph each equation using the intercept method.
2x - y = -4
x - intercept: (__, 0)
Plug in a 0 for y and solve for x:
2x - 0 = -4
2x = -4
x = -2
x - intercept: (-2, 0)
y-intercept: (0, __)
2(0) - y = -4
0 - y = -4
-y = -4
y = 4
y-intercept: (0, 4)
Our x-intercept occurs at the point: (-2, 0) and our y-intercept occurs at the point: (0,4). To use what is known as the "intercept method", when possible, we use the intercepts to obtain our first two points for our line. This is generally quicker since working with 0 is normally pretty easy. Now we just need a third point to use as a check. Let's try a value of (-4) for x and solve for the unknown y:
2(-4) - y = -4
-8 - y = -4
-y = 4
y = -4
This gives us a third ordered pair of: (-4, -4). Let's look at our ordered pairs in a table format.
x y (x, y)
-20(-2, 0)
04(0, 4)
-4-4(-4, -4)
Now let's graph our equation. Again, we plot the ordered pairs: (-2, 0), (0, 4), and (-4, -4). Graphing the equation 2x - y=-4

Graphing a Linear Equation in Two Variables that Passes Through the Origin

In some cases, the graph of a linear equation in two variables will pass through the origin. This will occur when our equation is of the form:
ax + by = 0
When this occurs, both the x-intercept and y-intercept will occur at the origin (the point (0,0)). To use the intercept method with a line that passes through the origin means we need to find two additional points. Let's look at an example.
Example 3: Graph each equation using the intercept method.
x + 3y = 0
We know this line passes through the origin, given it matches the format of:
ax + by = 0
This means we know our intercepts will occur at the origin (0,0). With this type of situation, we need to generate two additional points. We can use an x-value of (-6) to start.
(-6, __)
-6 + 3y = 0
3y = 6
y = 2
(-6, 2) is a point on the line. Let's look at an x-value of 6.
(6, __)
6 + 3y = 0
3y = -6
y = -2
(6, -2)
Our three points will be: (0, 0), (-6, 2), and (6, -2). Let's look at our ordered pairs in a table format.
x y (x, y)
00(0, 0)
-62(-6, 2)
6-2(6, -2)
Now let's graph our equation. Again, we plot the ordered pairs: (0, 0), (-6, 2), and (6, -2). Graphing a Line that passes through the origin: -x + 3y=0

Graphing a Horizontal Line

Just like with most things in Algebra, we have special case scenarios that occur when graphing a linear equation in two variables. We will sometimes see a horizontal line when we have an equation such as:
y = k
Where y is a variable and k is some constant term.
Most students will immediately point out that an equation such as: y = k only has one variable. This is true, however, we can rewrite this equation using a trick:
0x + y = k
Since 0 times any value for x would be 0, we can say that this equation can be simplified to:
y = k
To graph this equation, we can find k on the y-axis and draw a horizontal line. This happens since any value for x produces the same y-value. Let's look at an example.
Example 4: Graph each equation.
y = 7
To graph this equation, we can go to 7 on the y-axis and sketch a horizontal line. If it makes it easier, we can also plot points if we would like, for any given x-value, the y-value will be 7. Let's plot the points (4, 7), (0, 7), and (-4, 7) and then sketch our line: graphing a horizontal line y=7

Graphing a Vertical Line

Similar to a horizontal line, we also have a special case scenario that results in a vertical line. This will occur when we have an equation of the form:
x = k
Again, we may choose to write this as a linear equation in two variables by placing 0 as the coefficient of y:
x + 0y = k
Since 0 times any value for y would be 0, we can say this equation can be simplified to:
x = k
To graph this equation, we can find k on the x-axis and draw a vertical line. This happens since any value for y produces the same x-value. Let's look at an example.
Example 5: Graph each equation.
x = -8
To graph this equation, we can go to (-8) on the x-axis and sketch a vertical line. If it makes it easier, we can also plot points if we would like, for any given y-value, the x-value will be (-8). Let's plot the points (-8, 7), (-8, 0), and (-8, -7) and then sketch our line: graphing a horizontal line x=-8

Skills Check:

Example #1

Find the y-intercept. $$-4y - 6x=-16$$

Please choose the best answer.

A
$$(0, 4)$$
B
$$(4, 0)$$
C
$$(0, -4)$$
D
$$(-4, 0)$$
E
$$\left(-\frac{1}{4}, 0\right)$$

Example #2

Find the x-intercept. $$4x - 19y=13$$

Please choose the best answer.

A
$$\left(0, -\frac{13}{19}\right)$$
B
$$\left(0, -\frac{12}{19}\right)$$
C
$$\left(-\frac{18}{7}, 0\right)$$
D
$$\left(-\frac{4}{13}, 0\right)$$
E
$$\left(\frac{13}{4}, 0\right)$$

Example #3

Find the equation of the graph.

Sketching the graph of 7x + 2y=-6

Please choose the best answer.

A
$$2x + 7y=-5$$
B
$$7x + 2y=-6$$
C
$$x - 3y=14$$
D
$$5x - 19y=7$$
E
$$x - 12y=21$$
checkmark x-mark
checkmark x-mark
checkmark x-mark

Congrats, Your Score is 100%

Trophy, You Win!

Better Luck Next Time, Your Score is %

Try again?

retry Trophy, You Win!