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
- Learn how to graph a linear equation from slope-intercept form

## How to Graph Linear Equations

### What is a Linear Equation in Two Variables?

In our Algebra 2 course, 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.

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:

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)

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)

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)

Now that we have three ordered pairs: (-2, 2), (-6, 3), and (2, 1), let's plot these points on the coordinate plane: 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.

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.

Now let's graph our equation. Again we plot the ordered pairs: (-2, 0), (0, 4), and (-4, -4).

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.

Now let's graph our equation. Again, we plot the ordered pairs: (0, 0), (-6, 2), and (6, -2).

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:

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:

y = mx + b

m, the coefficient of x is our slope, and b, the constant term is our y-intercept. If we place the equation of the line in slope-intercept form, we can quickly obtain its graph by plotting the y-intercept as our first point and then finding additional points using the slope. Let's look at a few examples.

Example 6: Graph each $$7x+4y=16$$ Place the equation in slope-intercept form. This means we will solve the equation for y: $$7x + 4y=16$$ $$4y=-7x + 16$$ $$y=\frac{-7}{4}x + 4$$ From our equation, we can see that our slope, m, is -7/4. We can also see that the y-intercept will occur at the point (0,4). We will plot our y-intercept as the first point on the line. From this point (0,4), we can find additional points using the slope. Recall that slope is rise/run. Since our slope is -7/4, we can move down 7 units and right 4 units to get to our next point of (4,-3). Example 7: Graph each $$6x - 5y=-10$$ Place the equation in slope-intercept form. This means we will solve the equation for y: $$6x - 5y=-10$$ $$-5y=-6x - 10$$ $$y=\frac{6}{5}x + 2$$ From our equation, we can see that our slope, m, is 6/5. We can also see that the y-intercept will occur at (0,2). We will plot our y-intercept as the first point on the line. From this point (0,2), we can find additional points using the slope. Recall that slope is rise/run. Since our slope is 6/5, we can move up 6 units and right 5 units to get to our next point (5,8).

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

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,__) |

-2 + 4y = 6

4y = 8

y = 2

Our first point: (-2,2)

x | y | (x, y) |
---|---|---|

-2 | 2 | (-2, 2) |

__ | 3 | (__, 3) |

2 | __ | (2,__) |

x + 4(3) = 6

x + 12 = 6

x = -6

Our second point: (-6, 3)

x | y | (x, y) |
---|---|---|

-2 | 2 | (-2, 2) |

-6 | 3 | (-6, 3) |

2 | __ | (2,__) |

2 + 4y = 6

4y = 4

y = 1

Our third point: (2, 1)

x | y | (x, y) |
---|---|---|

-2 | 2 | (-2, 2) |

-6 | 3 | (-6, 3) |

2 | 1 | (2, 1) |

### 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) |
---|---|---|

-2 | 0 | (-2, 0) |

0 | 4 | (0, 4) |

-4 | -4 | (-4, -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) |
---|---|---|

0 | 0 | (0, 0) |

-6 | 2 | (-6, 2) |

6 | -2 | (6, -2) |

### 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 Vertical Line

Similar to a horizontal line, we also have a special case scenario which 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:

### Slope-Intercept Form

The slope-intercept form of a line gives us the slope and y-intercept by simple inspection. We obtain the slope-intercept form of a line by solving its equation for y:y = mx + b

m, the coefficient of x is our slope, and b, the constant term is our y-intercept. If we place the equation of the line in slope-intercept form, we can quickly obtain its graph by plotting the y-intercept as our first point and then finding additional points using the slope. Let's look at a few examples.

Example 6: Graph each $$7x+4y=16$$ Place the equation in slope-intercept form. This means we will solve the equation for y: $$7x + 4y=16$$ $$4y=-7x + 16$$ $$y=\frac{-7}{4}x + 4$$ From our equation, we can see that our slope, m, is -7/4. We can also see that the y-intercept will occur at the point (0,4). We will plot our y-intercept as the first point on the line. From this point (0,4), we can find additional points using the slope. Recall that slope is rise/run. Since our slope is -7/4, we can move down 7 units and right 4 units to get to our next point of (4,-3). Example 7: Graph each $$6x - 5y=-10$$ Place the equation in slope-intercept form. This means we will solve the equation for y: $$6x - 5y=-10$$ $$-5y=-6x - 10$$ $$y=\frac{6}{5}x + 2$$ From our equation, we can see that our slope, m, is 6/5. We can also see that the y-intercept will occur at (0,2). We will plot our y-intercept as the first point on the line. From this point (0,2), we can find additional points using the slope. Recall that slope is rise/run. Since our slope is 6/5, we can move up 6 units and right 5 units to get to our next point (5,8).

#### Skills Check:

Example #1

Find the x-intercept. $$7x + 5y=-20$$

Please choose the best answer.

A

$$(7, 0)$$

B

$$\left(-\frac{20}{7}, 0\right)$$

C

$$(-4, 0)$$

D

$$(-7, 0)$$

E

$$\left(0, -\frac{20}{7}\right)$$

Example #2

Find the y-intercept. $$x - 3y=6$$

Please choose the best answer.

A

$$(-2, 0)$$

B

$$(0, -2)$$

C

$$(0, 6)$$

D

$$(6, 0)$$

E

$$\left(-\frac{1}{2}, 0\right)$$

Example #3

Match the graph to its equation.

Please choose the best answer.

A

$$3x + 5y=20$$

B

$$3x - 5y=20$$

C

$$x + 2y=1$$

D

$$2x - 5y=20$$

E

$$2x + 5y=20$$

Congrats, Your Score is 100%

Better Luck Next Time, Your Score is %

Try again?

Ready for more?

Watch the Step by Step Video Lesson Take the Practice Test