Graphing a Linear Equation By Plotting Points
Graphing 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: How To Graph an Equation By Plotting Points
Graph the equation \(y=2x+1\) by plotting points.
Solution
The steps to take when graphing a linear equation by plotting points are summarized below.
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. Look at the difference between part (a) and part (b) in the figure below.
Let’s do another example. This time, we’ll show the last two steps all on one grid.
Example
Graph the equation \(y=-3x\).
Solution
Find three points that are solutions to the equation. Here, again, it’s easier to choose values for \(x\). Do you see why?
We list the points in the table below.
| \(y=-3x\) | ||
| \(x\) | \(y\) | \(\left(x,y\right)\) |
| 0 | 0 | \(\left(0,0\right)\) |
| 1 | \(-3\) | \(\left(1,-3\right)\) |
| \(-2\) | 6 | \(\left(-2,6\right)\) |
Plot the points, check that they line up, and draw the line.
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
Graph the equation \(y=\frac{1}{2}x+3\).
Solution
Find three points that are solutions to the equation. Since this equation has the fraction \(\frac{1}{2}\) as a coefficient of \(x,\) we will choose values of \(x\) carefully. We will use zero as one choice and multiples of 2 for the other choices. Why are multiples of 2 a good choice for values of \(x\)?
The points are shown in the table below.
| \(y=\frac{1}{2}x+3\) | ||
| \(x\) | \(y\) | \(\left(x,y\right)\) |
| 0 | 3 | \(\left(0,3\right)\) |
| 2 | 4 | \(\left(2,4\right)\) |
| 4 | 5 | \(\left(4,5\right)\) |
Plot the points, check that they line up, and draw the line.
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=-1\) are shown in the the table below. The graph is shown in the figure below.
| \(2x+y=3\) | ||
| \(x\) | \(y\) | \(\left(x,y\right)\) |
| 0 | 3 | \(\left(0,3\right)\) |
| 1 | 1 | \(\left(1,1\right)\) |
| \(-1\) | 5 | \(\left(-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
Graph the equation \(3x+y=-1\).
Solution
\(\begin{array}{cccccc}\text{Find three points that are solutions to the equation.}\hfill & & & \hfill 3x+y& =\hfill & -1\hfill \\ \text{First solve the equation for}\phantom{\rule{0.2em}{0ex}}y.\hfill & & & \hfill y& =\hfill & -3x-1\hfill \end{array}\)
We’ll let \(x\) be 0, 1, and \(-1\) to find 3 points. The ordered pairs are shown in the table below. Plot the points, check that they line up, and draw the line. See the figure below.
| \(3x+y=-1\) | ||
| \(x\) | \(y\) | \(\left(x,y\right)\) |
| 0 | \(-1\) | \(\left(0,-1\right)\) |
| 1 | \(-4\) | \(\left(1,-4\right)\) |
| \(-1\) | 2 | \(\left(-1,2\right)\) |
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 the example above 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
Graph the equation \(2x-3y=6\).
Solution
\(\begin{array}{cccccc}\begin{array}{c}\text{Find three points that are solutions to the}\hfill \\ \text{equation.}\hfill \end{array}\hfill & & & \hfill 2x-3y& =\hfill & 6\hfill \\ \text{First let}\phantom{\rule{0.2em}{0ex}}x=0.\hfill & & & \hfill 2\left(0\right)-3y& =\hfill & 6\hfill \\ \text{Solve for}\phantom{\rule{0.2em}{0ex}}y.\hfill & & & \hfill -3y& =\hfill & 6\hfill \\ & & & \hfill y& =\hfill & -2\hfill \\ \\ \\ \text{Now let}\phantom{\rule{0.2em}{0ex}}y=0.\hfill & & & \hfill 2x-3\left(0\right)& =\hfill & 6\hfill \\ \text{Solve for}\phantom{\rule{0.2em}{0ex}}x.\hfill & & & \hfill 2x& =\hfill & 6\hfill \\ & & & \hfill x& =\hfill & 3\hfill \\ \begin{array}{c}\text{We need a third point. Remember, we can}\hfill \\ \text{choose any value for}\phantom{\rule{0.2em}{0ex}}x\phantom{\rule{0.2em}{0ex}}\text{or}\phantom{\rule{0.2em}{0ex}}y.\phantom{\rule{0.2em}{0ex}}\text{We’ll let}\phantom{\rule{0.2em}{0ex}}x=6.\hfill \end{array}\hfill & & & \hfill 2\left(6\right)-3y& =\hfill & 6\hfill \\ \text{Solve for}\phantom{\rule{0.2em}{0ex}}y.\hfill & & & \hfill 12-3y& =\hfill & 6\hfill \\ & & & \hfill -3y& =\hfill & -6\hfill \\ & & & \hfill y& =\hfill & 2\hfill \end{array}\)
We list the ordered pairs in the table below. Plot the points, check that they line up, and draw the line. See the figure below.
| \(2x-3y=6\) | ||
| \(x\) | \(y\) | \(\left(x,y\right)\) |
| 0 | \(-2\) | \(\left(0,-2\right)\) |
| 3 | 0 | \(\left(3,0\right)\) |
| 6 | 2 | \(\left(6,2\right)\) |
This lesson is part of:
Graphs and Equations