Before you get started, take this readiness quiz.
Evaluate $3x+2$ when $x=\mathrm{-1}$.
If you missed this problem, review Example 1.57.
Solve $3x+2y=12$ for $y$ in general.
If you missed this problem, review Example 2.63.
Recognize the Relationship Between the Solutions of an Equation and its Graph
In the previous section, we found several solutions to the equation $3x+2y=6$. They are listed in Table 4.10. So, the ordered pairs $\left(0,3\right)$, $\left(2,0\right)$, and $\left(1,\frac{3}{2}\right)$ are some solutions to the equation $3x+2y=6$. We can plot these solutions in the rectangular coordinate system as shown in Figure 4.5.
$3x+2y=6$ | ||
$x$ | $y$ | $\left(x,y\right)$ |
0 | 3 | $\left(0,3\right)$ |
2 | 0 | $\left(2,0\right)$ |
1 | $\frac{3}{2}$ | $\left(1,\frac{3}{2}\right)$ |
Notice how the points line up perfectly? We connect the points with a line to get the graph of the equation $3x+2y=6$. See Figure 4.6. Notice the arrows on the ends of each side of the line. These arrows indicate the line continues.
Every point on the line is a solution of the equation. Also, every solution of this equation is a point on this line. Points not on the line are not solutions.
Notice that the point whose coordinates are $\left(\mathrm{-2},6\right)$ is on the line shown in Figure 4.7. If you substitute $x=\mathrm{-2}$ and $y=6$ into the equation, you find that it is a solution to the equation.
So the point $\left(\mathrm{-2},6\right)$ is a solution to the equation $3x+2y=6$. (The phrase “the point whose coordinates are $\left(\mathrm{-2},6\right)$” is often shortened to “the point $\left(\mathrm{-2},6\right)$.”)
So $\left(4,1\right)$ is not a solution to the equation $3x+2y=6$. Therefore, the point $\left(4,1\right)$ is not on the line. See Figure 4.6. This is an example of the saying, “A picture is worth a thousand words.” The line shows you all the solutions to the 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 $3x+2y=6$.
Graph of a Linear Equation
The graph of a linear equation $Ax+By=C$ is a line.
- Every point on the line is a solution of the equation.
- Every solution of this equation is a point on this line.
Example 4.10
The graph of $y=2x-3$ is shown.
For each ordered pair, decide:
ⓐ Is the ordered pair a solution to the equation?
ⓑ Is the point on the line?
A $\left(0,\mathrm{-3}\right)$ B $\left(3,3\right)$ C $\left(2,\mathrm{-3}\right)$ D $\left(\mathrm{-1},\mathrm{-5}\right)$
Use the graph of $y=3x-1$ to decide whether each ordered pair is:
- a solution to the equation.
- on the line.
ⓐ $\left(0,\mathrm{-1}\right)$ ⓑ $\left(2,5\right)$
Use graph of $y=3x-1$ to decide whether each ordered pair is:
- a solution to the equation
- on the line
ⓐ $\left(3,\mathrm{-1}\right)$ ⓑ $\left(\mathrm{-1},\mathrm{-4}\right)$
Graph a Linear Equation by Plotting Points
There are several methods that can be used to graph a linear equation. The method we used to graph $3x+2y=6$ is called plotting points, or the Point–Plotting Method.
Example 4.11
How To Graph an Equation By Plotting Points
Graph the equation $y=2x+1$ by plotting points.
Graph the equation by plotting points: $y=2x-3$.
Graph the equation by plotting points: $y=\mathrm{-2}x+4$.
The steps to take when graphing a linear equation by plotting points are summarized below.
How To
Graph a linear equation by plotting points.
- Step 1. Find three points whose coordinates are solutions to the equation. Organize them 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.
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. Look at the difference between part (a) and part (b) in Figure 4.8.
Let’s do another example. This time, we’ll show the last two steps all on one grid.
Example 4.12
Graph the equation $y=\mathrm{-3}x$.
Graph the equation by plotting points: $y=\mathrm{-4}x$.
Graph the equation by plotting points: $y=x$.
When an equation includes a fraction as the coefficient of $x$, we can still substitute any numbers for $x$. But the math is easier if we make ‘good’ choices for the values of $x$. This way we will avoid fraction answers, which are hard to graph precisely.
Example 4.13
Graph the equation $y=\frac{1}{2}x+3$.
Graph the equation $y=\frac{1}{3}x-1$.
Graph the equation $y=\frac{1}{4}x+2$.
So far, all the equations we graphed had $y$ given in terms of $x$. Now we’ll graph an equation with $x$ and $y$ on the same side. Let’s see what happens in the equation $2x+y=3$. If $y=0$ what is the value of $x$?
This point has a fraction for the x- coordinate and, while we could graph this point, it is hard to be precise graphing fractions. Remember in the example $y=\frac{1}{2}x+3$, we carefully chose values for $x$ so as not to graph fractions at all. If we solve the equation $2x+y=3$ for $y$, it will be easier to find three solutions to the equation.
The solutions for $x=0$, $x=1$, and $x=\mathrm{-1}$ are shown in the Table 4.13. The graph is shown in Figure 4.9.
$2x+y=3$ | ||
$x$ | $y$ | $(x,y)$ |
0 | 3 | $\left(0,3\right)$ |
1 | 1 | $\left(1,1\right)$ |
$\mathrm{-1}$ | 5 | $\left(\mathrm{-1},5\right)$ |
Can you locate the point $\left(\frac{3}{2},0\right)$, which we found by letting $y=0$, on the line?
Example 4.14
Graph the equation $3x+y=\mathrm{-1}$.
Graph the equation $2x+y=2$.
Graph the equation $4x+y=\mathrm{-3}$.
If you can choose any three points to graph a line, how will you know if your graph matches the one shown in the answers in the book? If the points where the graphs cross the x- and y-axis are the same, the graphs match!
The equation in Example 4.14 was written in standard form, with both $x$ and $y$ on the same side. We solved that equation for $y$ in just one step. But for other equations in standard form it is not that easy to solve for $y$, so we will leave them in standard form. We can still find a first point to plot by letting $x=0$ and solving for $y$. We can plot a second point by letting $y=0$ and then solving for $x$. Then we will plot a third point by using some other value for $x$ or $y$.
Example 4.15
Graph the equation $2x-3y=6$.
Graph the equation $4x+2y=8$.
Graph the equation $2x-4y=8$.
Graph Vertical and Horizontal Lines
Can we graph an equation with only one variable? Just $x$ and no $y$, or just $y$ without an $x$? How will we make a table of values to get the points to plot?
Let’s consider the equation $x=\mathrm{-3}$. This equation has only one variable, $x$. The equation says that $x$ is always equal to $\mathrm{-3}$, so its value does not depend on $y$. No matter what $y$ is, the value of $x$ is always $\mathrm{-3}$.
So to make a table of values, write $\mathrm{-3}$ in for all the $x$ values. Then choose any values for $y$. Since $x$ does not depend on $y$, you can choose any numbers you like. But to fit the points on our coordinate graph, we’ll use 1, 2, and 3 for the y-coordinates. See Table 4.18.
$x=\mathrm{-3}$ | ||
$x$ | $y$ | $\left(x,y\right)$ |
$\mathrm{-3}$ | 1 | $\left(\mathrm{-3},1\right)$ |
$\mathrm{-3}$ | 2 | $\left(\mathrm{-3},2\right)$ |
$\mathrm{-3}$ | 3 | $\left(\mathrm{-3},3\right)$ |
Plot the points from Table 4.18 and connect them with a straight line. Notice in Figure 4.12 that we have graphed a vertical line.
Vertical Line
A vertical line is the graph of an equation of the form $x=a$.
The line passes through the x-axis at $\left(a,0\right)$.
Example 4.16
Graph the equation $x=2$.
Graph the equation $x=5$.
Graph the equation $x=\mathrm{-2}$.
What if the equation has $y$ but no $x$? Let’s graph the equation $y=4$. This time the y- value is a constant, so in this equation, $y$ does not depend on $x$. Fill in 4 for all the $y$’s in Table 4.20 and then choose any values for $x$. We’ll use 0, 2, and 4 for the x-coordinates.
$y=4$ | ||
$x$ | $y$ | $(x,y)$ |
0 | 4 | $\left(0,4\right)$ |
2 | 4 | $\left(2,4\right)$ |
4 | 4 | $\left(4,4\right)$ |
The graph is a horizontal line passing through the y-axis at 4. See Figure 4.14.
Horizontal Line
A horizontal line is the graph of an equation of the form $y=b$.
The line passes through the y-axis at $\left(0,b\right)$.
Example 4.17
Graph the equation $y=\mathrm{-1}.$
Graph the equation $y=\mathrm{-4}$.
Graph the equation $y=3$.
The equations for vertical and horizontal lines look very similar to equations like $y=4x.$ What is the difference between the equations $y=4x$ and $y=4$?
The equation $y=4x$ has both $x$ and $y$. The value of $y$ depends on the value of $x$. The y-coordinate changes according to the value of $x$. The equation $y=4$ has only one variable. The value of $y$ is constant. The y-coordinate is always 4. It does not depend on the value of $x$. See Table 4.22.
$y=4x$ | $y=4$ | |||||
$x$ | $y$ | $(x,y)$ | $x$ | $y$ | $(x,y)$ | |
0 | 0 | $\left(0,0\right)$ | 0 | 4 | $\left(0,4\right)$ | |
1 | 4 | $\left(1,4\right)$ | 1 | 4 | $\left(1,4\right)$ | |
2 | 8 | $\left(2,8\right)$ | 2 | 4 | $\left(2,4\right)$ |
Notice, in Figure 4.16, the equation $y=4x$ gives a slanted line, while $y=4$ gives a horizontal line.
Example 4.18
Graph $y=\mathrm{-3}x$ and $y=\mathrm{-3}$ in the same rectangular coordinate system.
Graph $y=\mathrm{-4}x$ and $y=\mathrm{-4}$ in the same rectangular coordinate system.
Graph $y=3$ and $y=3x$ in the same rectangular coordinate system.
Section 4.2 Exercises
Practice Makes Perfect
Recognize the Relationship Between the Solutions of an Equation and its Graph
In the following exercises, for each ordered pair, decide:
ⓐ Is the ordered pair a solution to the equation? ⓑ Is the point on the line?
$y=x+2$
- ⓐ $\left(0,2\right)$
- ⓑ $\left(1,2\right)$
- ⓒ $\left(\mathrm{-1},1\right)$
- ⓓ $\left(\mathrm{-3},\mathrm{-1}\right)$
$y=x-4$
- ⓐ $\left(0,\mathrm{-4}\right)$
- ⓑ $\left(3,\mathrm{-1}\right)$
- ⓒ $\left(2,2\right)$
- ⓓ $\left(1,\mathrm{-5}\right)$
$y=\frac{1}{2}x-3$
- ⓐ $\left(0,\mathrm{-3}\right)$
- ⓑ $\left(2,\mathrm{-2}\right)$
- ⓒ $\left(\mathrm{-2},\mathrm{-4}\right)$
- ⓓ $\left(4,1\right)$
$y=\frac{1}{3}x+2$
- ⓐ $\left(0,2\right)$
- ⓑ $\left(3,3\right)$
- ⓒ $\left(\mathrm{-3},2\right)$
- ⓓ $\left(\mathrm{-6},0\right)$
Graph a Linear Equation by Plotting Points
In the following exercises, graph by plotting points.
$y=2x+3$
$y=\mathrm{-3}x+1$
$y=x-3$
$y=\text{\u2212}x-2$
$y=3x$
$y=\mathrm{-2}x$
$y=\frac{1}{3}x-1$
$y=\frac{3}{2}x-3$
$y=-\frac{4}{5}x-1$
$y=-\frac{5}{3}x+4$
$x+y=4$
$x+y=\mathrm{-2}$
$x-y=1$
$x-y=\mathrm{-3}$
$5x+y=6$
$4x+y=\mathrm{-5}$
$\frac{1}{2}x+y=3$
$\frac{3}{4}x-y=6$
$4x+2y=12$
$2x-5y=10$
$x-4y=2$
$3x+5y=5$
Graph Vertical and Horizontal Lines
In the following exercises, graph each equation.
$x=3$
$x=\mathrm{-5}$
$y=1$
$y=\mathrm{-2}$
$x=\frac{5}{4}$
$y=-\frac{5}{3}$
In the following exercises, graph each pair of equations in the same rectangular coordinate system.
$y=5x$ and $y=5$
$y=-\frac{1}{3}x$ and $y=-\frac{1}{3}$
Mixed Practice
In the following exercises, graph each equation.
$y=2x$
$y=\frac{1}{4}x-2$
$y=x$
$x+y=\mathrm{-5}$
$2x+y=6$
$y=5$
$5x+2y=10$
$x=\mathrm{-4}$
Everyday Math
Motor home cost. The Robinsons rented a motor home for one week to go on vacation. It cost them $594 plus $0.32 per mile to rent the motor home, so the linear equation $y=594+0.32x$ gives the cost, $y$, for driving $x$ miles. Calculate the rental cost for driving 400, 800, and 1200 miles, and then graph the line.
Weekly earnings. At the art gallery where he works, Salvador gets paid $200 per week plus 15% of the sales he makes, so the equation $y=200+0.15x$ gives the amount, $y$, he earns for selling $x$ dollars of artwork. Calculate the amount Salvador earns for selling $900, $1600, and $2000, and then graph the line.
Writing Exercises
Explain how you would choose three x- values to make a table to graph the line $y=\frac{1}{5}x-2$.
What is the difference between the equations of a vertical and a horizontal line?
Self Check
ⓐ After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.
ⓑ After reviewing this checklist, what will you do to become confident for all goals?