Graph Linear Equations in Two Variables
Plot points in a rectangular coordinate system
Just like maps use a grid system to identify locations, a grid system is used in algebra to show a relationship between two variables in a rectangular coordinate system. The rectangular coordinate system is also called the -plane or the “coordinate plane.”
The rectangular coordinate system is formed by two intersecting number lines, one horizontal and one vertical. The horizontal number line is called the -axis. The vertical number line is called the -axis. These axes divide a plane into four regions, called quadrants. The quadrants are identified by Roman numerals, beginning on the upper right and proceeding counterclockwise.
In the rectangular coordinate system, every point is represented by an ordered pair. The first number in the ordered pair is the -coordinate of the point, and the second number is the -coordinate of the point. The phrase “ordered pair” means that the order is important.
What is the ordered pair of the point where the axes cross? At that point both coordinates are zero, so its ordered pair is . The point has a special name. It is called the origin.
We use the coordinates to locate a point on the -plane. Let’s plot the point as an example. First, locate on the -axis and lightly sketch a vertical line through . Then, locate on the -axis and sketch a horizontal line through . Now, find the point where these two lines meet—that is the point with coordinates .
Notice that the vertical line through and the horizontal line through are not part of the graph. We just used them to help us locate the point .
When one of the coordinates is zero, the point lies on one of the axes. The point is on the -axis and the point is on the -axis.
Example. Plot each point in the rectangular coordinate system and identify the quadrant in which the point is located: (a) (b) (c) (d) (e) .
The first number of the coordinate pair is the -coordinate, and the second number is the -coordinate. To plot each point, sketch a vertical line through the -coordinate and a horizontal line through the -coordinate. Their intersection is the point.
(a) Since , the point is to the left of the -axis. Also, since , the point is above the -axis. The point is in Quadrant II.
(b) Since , the point is to the left of the -axis. Also, since , the point is below the -axis. The point is in Quadrant III.
(c) Since , the point is to the right of the -axis. Since , the point is below the -axis. The point is in Quadrant IV.
(d) Since , the point whose coordinates are is on the -axis.
(e) Since , the point is to the right of the -axis. Since , the point is above the -axis. (It may be helpful to write as a mixed number or decimal.) The point is in Quadrant I.
Plot the point (-2, 1). In which quadrant is it located? Enter the quadrant number.
A negative x-coordinate is left of the y-axis; a positive y-coordinate is above the x-axis.The signs of the -coordinate and -coordinate affect the location of the points. We can summarize sign patterns of the quadrants in this way:
| Quadrant I | Quadrant II | Quadrant III | Quadrant IV |
|---|---|---|---|
Up to now, all the equations you have solved were equations with just one variable. In almost every case, when you solved the equation you got exactly one solution. But equations can have more than one variable. Equations with two variables may be of the form . An equation of this form is called a linear equation in two variables.
Here is an example of a linear equation in two variables, and :
The equation is also a linear equation. But it does not appear to be in the form . We can use the Addition Property of Equality and rewrite it in form.
By rewriting as , we can easily see that it is a linear equation in two variables because it is of the form . When an equation is in the form , we say it is in standard form.
Most people prefer to have , , and be integers and when writing a linear equation in standard form, although it is not strictly necessary.
Linear equations have infinitely many solutions. For every number that is substituted for there is a corresponding value. This pair of values is a solution to the linear equation and is represented by the ordered pair . When we substitute these values of and into the equation, the result is a true statement, because the value on the left side is equal to the value on the right side.
Linear equations have infinitely many solutions. We can plot these solutions in the rectangular coordinate system. The points will line up perfectly in a straight line. We connect the points with a straight line to get the graph of the equation. We put arrows on the ends of each side of the line to indicate that the line continues in both directions.
A graph is a visual representation of all the solutions of the equation. It is an example of the saying, “A picture is worth a thousand words.” The line shows you all the solutions to that equation. Every point on the line is a solution of the equation. And, every solution of this equation is on this line. This line is called the graph of the equation. Points not on the line are not solutions!
Graph of a linear equation. The graph of a linear equation is a straight line.
- Every point on the line is a solution of the equation.
- Every solution of this equation is a point on this line.
Example. The graph of is shown. For each ordered pair, decide: (a) Is the ordered pair a solution to the equation? (b) Is the point on the line? A: ; B: ; C: ; D: .
Substitute the - and -values into the equation to check if the ordered pair is a solution to the equation.
| Point | Substitution and decision |
|---|---|
| A: | ; is a solution. |
| B: | ; is a solution. |
| C: | ; is not a solution. |
| D: | ; is a solution. |
The points , , and are on the line , and the point is not on the line. The points that are solutions to are on the line, but the point that is not a solution is not on the line.
For , is a solution? Enter 1 for yes or 0 for no.
Substitute x = 2 and compare 3x - 1 with y = 5.Graph a linear equation by plotting points
There are several methods that can be used to graph a linear equation. The first method we will use is called plotting points, or the Point-Plotting Method. We find three points whose coordinates are solutions to the equation and then plot them in a rectangular coordinate system. By connecting these points in a line, we have the graph of the linear equation.
Example. How to graph a linear equation by plotting points. Graph the equation by plotting points.
Step 1. Find three points whose coordinates are solutions to the equation. You can choose any values for or . In this case, since is isolated on the left side of the equation, it is easier to choose values for .
Organize the solutions in a table.
Step 2. Plot the points in a rectangular coordinate system. Check that the points line up. If they do not, carefully check your work.
Step 3. Draw the line through the three points. Extend the line to fill the grid and put arrows on both ends of the line. This line is the graph of .
Graph a linear equation by plotting points.
- Find three points whose coordinates are solutions to the equation. Organize them in a table.
- Plot the points in a rectangular coordinate system. Check that the points line up. If they do not, carefully check your work.
- Draw the line through the three points. Extend the line to fill the grid and put arrows on both ends of the line.
It is true that it only takes two points to determine a line, but it is a good habit to use three points. If you only plot two points and one of them is incorrect, you can still draw a line but it will not represent the solutions to the equation. It will be the wrong line. If you use three points, and one is incorrect, the points will not line up. This tells you something is wrong and you need to check your work.
When an equation includes a fraction as the coefficient of , we can still substitute any numbers for . But the arithmetic is easier if we make “good” choices for the values of . This way we will avoid fractional answers, which are hard to graph precisely.
Example. Graph the equation .
Find three points that are solutions to the equation. Since this equation has the fraction as a coefficient of , we will choose values of carefully. We will use zero as one choice and multiples of for the other choices. Why are multiples of two a good choice for values of ? By choosing multiples of the multiplication by simplifies to a whole number.
Plot the points, check that they line up, and draw the line.
For the equation , find y when x = 0.
Substitute x = 0 into the equation.For the equation , find y when x = 1.
Substitute x = 1 into the equation.Graph vertical and horizontal lines
Some linear equations have only one variable. They may have just and no , or just without an . This changes how we make a table of values to get the points to plot.
Let’s consider the equation . This equation has only one variable, . The equation says that is always equal to , so its value does not depend on . No matter what is the value of , the value of is always . So to make a table of values, write in for all the -values. Then choose any values for . Since does not depend on , you can choose any numbers you like. But to fit the points on our coordinate graph, we’ll use , , and for the -coordinates.
Plot the points from the table and connect them with a straight line. Notice that we have graphed a vertical line.
What if the equation has but no ? Let’s graph the equation . This time the -value is a constant, so in this equation, does not depend on . Fill in for all the ’s and then choose any values for . We’ll use , , and for the -coordinates.
In this figure, we have graphed a horizontal line passing through the -axis at .
Example. Graph: (a) (b) .
(a) The equation has only one variable, , and is always equal to . We create a table where is always and then put in any values for . The graph is a vertical line passing through the -axis at .
(b) Similarly, the equation has only one variable, . The value of is constant. All the ordered pairs have the same -coordinate. The graph is a horizontal line passing through the -axis at .
For the vertical line , what is the x-coordinate of every point?
The equation says x is always 5.What is the difference between the equations and ? The equation has both and . The value of depends on the value of , so the -coordinate changes according to the value of . The equation has only one variable. The value of is constant, it does not depend on the value of , so the -coordinate is always .
Example. Graph and in the same rectangular coordinate system. We notice that the first equation has the variable , while the second does not. We make a table of points for each equation and then graph the lines.
For the horizontal line , what is the y-coordinate of every point?
The equation says y is always 3.Find - and -intercepts
Every linear equation can be represented by a unique line that shows all the solutions of the equation. We have seen that when graphing a line by plotting points, you can use any three solutions to graph. This means that two people graphing the line might use different sets of three points.
At first glance, their two lines might not appear to be the same, since they would have different points labeled. But if all the work was done correctly, the lines should be exactly the same. One way to recognize that they are indeed the same line is to look at where the line crosses the -axis and the -axis. These points are called the intercepts of a line.
For each line, the -coordinate of the point where the line crosses the -axis is zero. The point where the line crosses the -axis has the form and is called the -intercept of the line. The -intercept occurs when is zero. In each line, the -coordinate of the point where the line crosses the -axis is zero. The point where the line crosses the -axis has the form and is called the -intercept of the line. The -intercept occurs when is zero.
-intercept and -intercept of a line. The -intercept is the point where the line crosses the -axis. The -intercept is the point where the line crosses the -axis.
- The -intercept occurs when is zero.
- The -intercept occurs when is zero.
Example. Find the - and -intercepts on each graph shown.
(a) The graph crosses the -axis at the point . The -intercept is . The graph crosses the -axis at the point . The -intercept is .
(b) The graph crosses the -axis at the point . The -intercept is . The graph crosses the -axis at the point . The -intercept is .
(c) The graph crosses the -axis at the point . The -intercept is . The graph crosses the -axis at the point . The -intercept is .
A graph crosses the x-axis at (2, 0). What is its x-intercept?
The x-intercept is the point where the graph crosses the x-axis.Recognizing that the -intercept occurs when is zero and that the -intercept occurs when is zero, gives us a method to find the intercepts of a line from its equation. To find the -intercept, let and solve for . To find the -intercept, let and solve for .
Find the - and -intercepts from the equation of a line. Use the equation of the line. To find:
- the -intercept of the line, let and solve for .
- the -intercept of the line, let and solve for .
Example. Find the intercepts of .
We will let to find the -intercept, and let to find the -intercept. We will fill in a table, which reminds us of what we need to find.
The -intercept is .
The -intercept is . The intercepts are the points and .
Find the x-intercept of .
Let y = 0 and solve for x.Find the y-intercept of .
Let x = 0 and solve for y.Graph a line using the intercepts
To graph a linear equation by plotting points, you need to find three points whose coordinates are solutions to the equation. You can use the - and -intercepts as two of your three points. Find the intercepts, and then find a third point to ensure accuracy. Make sure the points line up—then draw the line. This method is often the quickest way to graph a line.
Example. How to graph a line using the intercepts. Graph using the intercepts.
Step 1. Find the - and -intercepts of the line. Let and solve for ; let and solve for .
The -intercept is and the -intercept is .
Step 2. Find another solution to the equation. We’ll use .
A third point is .
Step 3. Plot the three points. Check that the points line up.
Step 4. Draw the line.
Graph a linear equation using the intercepts.
- Find the - and -intercepts of the line.
- Let and solve for .
- Let and solve for .
- Find a third solution to the equation.
- Plot the three points and check that they line up.
- Draw the line.
Example. Graph using the intercepts.
Find the intercepts and a third point.
We list the points in the table and show the graph.
For , find the x-intercept.
Let y = 0 and solve for x.Example. Graph using the intercepts.
Let : , so . Let : , so . The -intercept and the -intercept are both . This line has only one intercept. It is the point .
To ensure accuracy, we need to plot three points. Since the - and -intercepts are the same point, we need two more points to graph the line. Let , so . Let , so .
Plot the three points, check that they line up, and draw the line.
For , use x = 1 to find a second point on the line.
Substitute x = 1 into y = 4x.Key terms
rectangular coordinate system — a grid formed by the -axis and -axis. quadrants — the four regions into which the axes divide the plane. ordered pair — , the coordinates of a point. origin — the point . linear equation in two variables — an equation of the form , where and are not both zero. standard form — the form . solution of a linear equation in two variables — an ordered pair that makes the equation true. graph of a linear equation — the straight line made up of all its solutions. vertical line — the graph of . horizontal line — the graph of . intercepts of a line — the points where a line crosses the axes. -intercept — , where a line crosses the -axis. -intercept — , where a line crosses the -axis.
This section is adapted from Intermediate Algebra 2e, Section 3.1: Graph Linear Equations in Two Variables by Lynn Marecek and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the coordinate-plane figures as accessible interactive graphs and the solution tables as markdown tables; omitted the Be Prepared quiz, Self Check checklist, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.