Solving a System of Linear Equations By Graphing
Solving a System of Linear Equations By Graphing
In this tutorial we will use three methods to solve a system of linear equations. The first method we’ll use is graphing.
The graph of a linear equation is a line. Each point on the line is a solution to the equation. For a system of two equations, we will graph two lines. Then we can see all the points that are solutions to each equation. And, by finding what the lines have in common, we’ll find the solution to the system.
Most linear equations in one variable have one solution, but we saw that some equations, called contradictions, have no solutions and for other equations, called identities, all numbers are solutions.
Similarly, when we solve a system of two linear equations represented by a graph of two lines in the same plane, there are three possible cases, as shown in the figure below:
For the first example of solving a system of linear equations in this section and in the next two sections, we will solve the same system of two linear equations. But we’ll use a different method in each section. After seeing the third method, you’ll decide which method was the most convenient way to solve this system.
Example: How to Solve a System of Linear Equations by Graphing
Solve the system by graphing: \(\begin{array}{c}2x+y=7\hfill \\ x-2y=6\hfill \end{array}.\)
Solution
The steps to use to solve a system of linear equations by graphing are shown below.
To solve a system of linear equations by graphing.
- Graph the first equation.
- Graph the second equation on the same rectangular coordinate system.
- Determine whether the lines intersect, are parallel, or are the same line.
- Identify the solution to the system.
- If the lines intersect, identify the point of intersection. Check to make sure it is a solution to both equations. This is the solution to the system.
- If the lines are parallel, the system has no solution.
- If the lines are the same, the system has an infinite number of solutions.
Example
Solve the system by graphing: \(\begin{array}{c}y=2x+1\hfill \\ y=4x-1\hfill \end{array}.\)
Solution
Both of the equations in this system are in slope-intercept form, so we will use their slopes and y-intercepts to graph them. \(\begin{array}{c}y=2x+1\hfill \\ y=4x-1\hfill \end{array}\)
| Find the slope and y-intercept of the first equation. | |
| Find the slope and y-intercept of the first equation. | |
| Graph the two lines. | |
| Determine the point of intersection. | The lines intersect at (1, 3). |
| Check the solution in both equations. | \(\begin{array}{cccc}\begin{array}{ccc}\hfill y& =\hfill & 2x+1\hfill \\ \hfill 3& \stackrel{?}{=}\hfill & 2·1+1\hfill \\ \hfill 3& =\hfill & 3\phantom{\rule{0.2em}{0ex}}✓\hfill \end{array}& & & \begin{array}{ccc}\hfill y& =\hfill & 4x-1\hfill \\ \hfill 3& \stackrel{?}{=}\hfill & 4·1-1\hfill \\ \hfill 3& =\hfill & 3\phantom{\rule{0.2em}{0ex}}✓\hfill \end{array}\end{array}\) |
| The solution is (1, 3). |
Both equations in the example above were given in slope–intercept form. This made it easy for us to quickly graph the lines. In the next example, we’ll first re-write the equations into slope–intercept form.
Example
Solve the system by graphing: \(\begin{array}{c}3x+y=-1\hfill \\ 2x+y=0\hfill \end{array}.\)
Solution
We’ll solve both of these equations for \(y\) so that we can easily graph them using their slopes and y-intercepts. \(\begin{array}{c}3x+y=-1\hfill \\ 2x+y=0\hfill \end{array}\)
| Solve the first equation for y. Find the slope and y-intercept. Solve the second equation for y. Find the slope and y-intercept. |
\(\begin{array}{c}\begin{array}{ccc}\hfill 3x+y& =\hfill & -1\hfill \\ \hfill y& =\hfill & -3x-1\hfill \\ \\ \hfill m& =\hfill & -3\hfill \\ \hfill b& =\hfill & -1\hfill \\ \\ \hfill 2x+y& =\hfill & 0\hfill \\ \hfill y& =\hfill & -2x\hfill \\ \\ \hfill m& =\hfill & -2\hfill \\ \hfill b& =\hfill & 0\hfill \\ \hfill \end{array}\end{array}\) |
| Graph the lines. | |
| Determine the point of intersection. | The lines intersect at (−1, 2). |
| Check the solution in both equations. | \(\begin{array}{cccc}\begin{array}{ccc}\hfill 3x+y& =\hfill & -1\hfill \\ \hfill 3\left(-1\right)+2& \stackrel{?}{=}\hfill & -1\hfill \\ \hfill -1& =\hfill & -1\phantom{\rule{0.2em}{0ex}}✓\hfill \end{array}& & & \begin{array}{ccc}\hfill 2x+y& =\hfill & 0\hfill \\ \hfill 2\left(-1\right)+2& \stackrel{?}{=}\hfill & 0\hfill \\ \hfill 0& =\hfill & 0\phantom{\rule{0.2em}{0ex}}✓\hfill \end{array}\end{array}\) |
| The solution is (−1, 2). |
Usually when equations are given in standard form, the most convenient way to graph them is by using the intercepts. We’ll do this in the example below.
Example
Solve the system by graphing: \(\begin{array}{c}x+y=2\hfill \\ x-y=4\hfill \end{array}.\)
Solution
We will find the x- and y-intercepts of both equations and use them to graph the lines.
| To find the intercepts, let x = 0 and solve for y, then let y = 0 and solve for x. | \(\begin{array}{cccc}\begin{array}{ccc}\hfill x+y& =\hfill & 2\hfill \\ 0+y& =\hfill & 2\hfill \\ y& =\hfill & 2\hfill \end{array}& & & \begin{array}{ccc}\hfill x+y& =\hfill & 2\hfill \\ x+0& =\hfill & 2\hfill \\ x& =\hfill & 2\hfill \end{array}\end{array}\) | |
| To find the intercepts, let x = 0 then let y = 0. | \(\begin{array}{cccc}\begin{array}{ccc}\hfill x-y& =\hfill & 4\hfill \\ \hfill 0-y& =\hfill & 4\hfill \\ \hfill -y& =\hfill & 4\hfill \\ \hfill y& =\hfill & -4\hfill \end{array}& & & \begin{array}{ccc}\hfill x-y& =\hfill & 4\hfill \\ \hfill x-0& =\hfill & 4\hfill \\ \hfill x& =\hfill & 4\hfill \\ \end{array}\end{array}\) |
|
| Graph the line. | ||
| Determine the point of intersection. | The lines intersect at (3, −1). | |
| Check the solution in both equations. | \(\begin{array}{cccccccc}\hfill x+y& =\hfill & 2\hfill & & & \hfill x-y& =\hfill & 4\hfill \\ 3+\left(-1\right)\hfill & \stackrel{?}{=}\hfill & 2\hfill & & & \hfill 3-\left(-1\right)& \stackrel{?}{=}\hfill & 4\hfill \\ \hfill 2& =\hfill & 2✓\hfill & & & \hfill 4& =\hfill & 4✓\hfill \end{array}\) The solution is (3, −1). |
Do you remember how to graph a linear equation with just one variable? It will be either a vertical or a horizontal line.
Example
Solve the system by graphing: \(\begin{array}{c}y=6\hfill \\ 2x+3y=12\hfill \end{array}.\)
Solution
| We know the first equation represents a horizontal line whose y-intercept is 6. | |
| The second equation is most conveniently graphed using intercepts. | |
| To find the intercepts, let x = 0 and then y = 0. | |
| Graph the lines. | |
| Determine the point of intersection. | The lines intersect at (−3, 6). |
| Check the solution to both equations. | \(\begin{array}{cccccccc}\hfill y& =\hfill & 6\hfill & & & \hfill 2x+3y& =\hfill & 12\hfill \\ \hfill 6& \stackrel{?}{=}\hfill & 6✓\hfill & & & \hfill 2\left(-3\right)+3\left(6\right)& \stackrel{?}{=}\hfill & 12\hfill \\ \hfill 2& =\hfill & 2\hfill & & & \hfill -6+18& \stackrel{?}{=}\hfill & 12\hfill \\ & & & & & \hfill 12& =\hfill & 12✓\hfill \end{array}\) |
| The solution is (−3, 6). |
In all the systems of linear equations so far, the lines intersected and the solution was one point. In the next two examples, we’ll look at a system of equations that has no solution and at a system of equations that has an infinite number of solutions.
Example
Solve the system by graphing: \(\begin{array}{c}y=\frac{1}{2}x-3\hfill \\ x-2y=4\hfill \end{array}.\)
Solution
| To graph the first equation, we will use its slope and y-intercept. | |
| To graph the second equation, we will use the intercepts. | |
| Graph the lines. | |
| Determine the point of intersection. | The lines are parallel. |
| Since no point is on both lines, there is no ordered pair that makes both equations true. There is no solution to this system. |
Example
Solve the system by graphing: \(\begin{array}{c}y=2x-3\hfill \\ -6x+3y=-9\hfill \end{array}.\)
Solution
| Find the slope and y-intercept of the first equation. | |
| Find the intercepts of the second equation. | |
| Graph the lines. | |
| Determine the point of intersection. | The lines are the same! |
| Since every point on the line makes both equations true, there are infinitely many ordered pairs that make both equations true. | |
| There are infinitely many solutions to this system. |
If you write the second equation in the example above in slope-intercept form, you may recognize that the equations have the same slope and same y-intercept.
When we graphed the second line in the last example, we drew it right over the first line. We say the two lines are coincident. Coincident lines have the same slope and same y-intercept.
Coincident Lines
Coincident lines have the same slope and same y-intercept.
This lesson is part of:
Systems of Linear Equations I