Linear equations in two variables
Systems of equations
To solve a linear equation in two variables you need to have two distinct equations. Given \( 2x-y=9 \) we can only solve for \( x \) or \( y \) in terms of the other variable:
If we add the equation \( 3y-x=-2 \) we now have a system of two equations in two variables, and it is possible to solve for numerical values of \( x \) and \( y \).
There are several ways to solve a system of equations like this one, but we will focus on using substitution. This is similar to the substitution we did in an earlier lesson, but will involve two steps.
For the first step we need to solve one equation for one variable in terms of the other variable. There will be four different ways to do this depending on which equation and variable you choose; go whichever route is the easiest. Two of the possibilities are given above, and we will choose \( y=2x-9 \). Since this was derived from the first equation, we will substitute this into the second equation. We do this by replacing the \( y \) in \( 3y-x=-2 \) with \( 2x-9 \), to get:
We now have a linear equation in one variable, which we know how to solve:
Now we have solved the value of \( x \), and we can find \( y \) by substituting \( x=5 \) into either of the original equations. Using the first equation we’d have:
If we had chosen to substitute \( x=5 \) into the second equation we would get the same answer:
Now we have our solution set of \( x=5 \) and \( y=1 \) this will often be written as the ‘ordered pair’ \( (x,y)=(5,1) \), or simply as \( (5,1) \).
Graphical representation
When given one linear equation in two variables, like \( 2x-y=9 \), there are many different values of \( (x,y) \) that we could plug into the equation and maintain equality; \( (5,1) \), \( (6,3) \), \( (0,-9) \), and \( (-1,-11) \) are all some of the infinite examples. We can represent the set of solutions as a line on a graph.
Observe the point on the line that we’ve highlighted in black. If you move directly downwards from this point you’ll hit the x-axis of the graph at \( 6 \), and if you move leftward from the point you’ll hit the y-axis at \( 3 \). This point graphically represents the ordered pair \( (6,3) \), and is one the infinitely many points on this line that all represent solutions to the equation: \( y=2x-9 \).
In other words, if you take any point \( (x,y) \) on this line and substitute the \( (x,y) \) values into the equation \( y=2x-9 \), you’ll get the same values on both sides of the equals sign. For example, when we substitute \( (6,3) \) into the equation we have:
When we combine the first equation with the equation \( 3y-x=-2 \) we have a system of equations with a unique solution. Graphically this solution is represented by the intersection of the lines for each single equation.
As you can see, the point of intersection is \( (5,1) \), just as we solved. Each equation on its own had infinitely many solutions, but when you combine the two equations in a system, you get a unique solution at the point of intersection. This is the point that solves both of the individual equations.
There are two special cases to consider. It is possible to get infinitely many solutions, and it is possible to get no solutions.
Infinite solutions
A system composed of two equivalent equations has infinitely many solutions. The equivalent equations will line up at every point giving you infinitely many solutions. For example take \( y=2x-9 \) and \( 2y=4x-18 \). The second equation is equal to the first equation multiplied by \( 2 \). To solve the second equation for \( y \) we divide both sides by \( 2 \) to get \( y=2x-9 \), which is equal to the first equation.
Graphing these ‘two’ equations would give you two identical lines on top of each other, intersecting at every point. Hence, there each of the infinite points along the line solves the system of equations.
When trying to solve a system like this using substitution, everything will cancel out. In this case, when we substitute one equation into the other we get:
No solutions
Now if you have two equations that are parallel but not equal, you will have a system with no solution. Examine the system:
If we graph these lines we get:
The two lines are parallel and will never intersect, hence the system has no solution. If you tried to solve the system by substitution you’d get:
Clearly \( 0\neq-1 \) so we can conclude that the system has no solution. If substitution ever leads to a similar inequality you can conclude there is no solution to the system (although you may want to check your work once first).
Slope intercept form
To draw the line representing any equation it is helpful to convert the equation into ‘slope intercept form.’ This means rearranging the terms of your equation so that they’re in the order:
where \( m \) and \( b \) are constants. For example take the equation \( 2y-2=6x \), we can convert this into slope intercept form by dividing both sides by \( 2 \), then adding \( 1 \) to both sides:
Now the equation is in slope intercept form, with \( m=3 \) and \( b=1 \).
The term \( m \) is called the slope of the line. If you think of a line as a hill, the value of the slope determines how steep the hill is and whether the hill is going up or down. Larger absolute values of slope indicate steeper hills. Positive slopes (like all the above graphs) indicate the line is going “uphill,” while a negative slope would produce a line going “downhill.” The below graph shows different equations with different slopes; compare the slope values to the steepness and direction of the graphs.
Did you notice the relationship between the slopes and the steepness of the lines? The slope is the rise over the run (\( \frac{\text{Rise}}{\text{Run}}\)), where the run is the horizontal distance between two points and the rise is the vertical distance between the same two points. If you are given two points on a line, \((x_{1},y_{1}) \), \( (x_{2},y_{2}) \) you can calculate the line’s slope by using the formula:
For example given the points \( (-2,8) \) and \( (1,-1) \), we can calculate the slope of the line running through them:
The order of the points does not matter as long as we’re consistent with the order of the coordinates:
The following graph shows the slope of two lines in terms of the rise and runs.
When we graph linear equations with only one variable we get horizontal and vertical lines. The following graph shows the lines representing \( x=3 \) and \( y=-4 \). The line \( x=3 \) is said to have “no slope,” and the line \( y=-4 \) is said to have “zero slope.”
In slope-intercept form the term \( b \) is called the y-intercept, and it gives the y-coordinate at which the line crosses the y-axis. The y-axis has a x-coordinate of zero, so the point at which any line crosses the y-axis is always \( (0,b) \).
Observe the above graphs and notice how they cross the y-axis at the “height” of their \( b \) term. The only lines that do not cross the y-axis are those with no slope, like \( x=3 \) above.
When we have an equation in slope intercept form, we can easily graph the line representing it using the y-intercept and slope. Take the equation \( y=2x+1 \) for example. Because \( b=1 \), we know the line will cross the y-axis at \( (0,1) \), so we can put a point there. Now the slope of \( 2 \) means that if we move \( 1 \) to the right we must move up \( 2 \), so \( (0+1,1+2)=(1,3) \) must also be a point on the line. Now we have two points, and can draw a straight line through them.
If given two points it is possible to derive the equation of the line that connects them. Say we’re given the points \( (-2,8) \) and \( (1,-1) \). As demonstrated above, we can calculate the slope of this line to be:
Now we’ve found the value of m, and just need to find the value of b. We can do this by substituting the coordinates for either point into our equation \( y=-3x+b \), then solving for \( b \). If we substitute \( (x,y)=(1,-1) \) into the equation we get:
We could have also substituted \( (x,y)=(-2,8) \) into the equation and gotten the same answer:
Both ways solve that \( b=2 \), and lead to the final equation: \( y=-3x+2 \).
Practice questions
- \( \begin{align*} & x+y=3 \\ & 2y-1=-x \end{align*} \)
- \( \begin{align*} & x+2y=5 \\ & 2y-3x=1 \end{align*} \)
- \( \begin{align*} & 2x+4=6y \\ & 3x-4y=9 \end{align*} \)
- \( \begin{align*} & x+y=2 \\ & x-y=-1 \end{align*} \)
- What are the coordinates of the points (A-G) on the above graph?
- What is the slope of the line that passes through points A and C?
- What is the equation of the line that passes through the points C and D?
- What is the equation of the line that passes through the points A and B? What is the slope of this line?
- What is the equation of the line that passes through the points B and D? What is the slope of this line?
- What is the equation of the line that passes through the points C and E?
- Parallel lines have the same slope. What is the equation of the line that passes through point D and is parallel to the line \( y=-\frac{1}{4}x+5 \)?
- If \( y=mx+b \) is a line and \( y=Mx+B \) is another line perpendicular to the first line, then \( M=-\frac{1}{m} \). In other words, the slopes of two perpendicular lines are inverses and have opposite signs. What is the equation of the line that is perpendicular to \( y=\frac{2}{3}x-1 \) and passes through point A?
- What is the slope of the line with the equation \( 7x+5y+3=0 \)?
- What is the equation of a line that has a slope \( 5 \) and intercepts the y-axis at \( (0,-8) \)?
- If Li spends \( $10 \) more than Jeb and Jeb spends \( \frac{4}{5} \) as much as Li, how much did each Li and Jeb spend?
Solve the system of equations
Use the graph to answer questions 5-12
Solutions
- There are multiple routes to solving these types of problems but here is one way to do it. From the first equation we get: $$ x=3-y $$ Now substituting this into the second equation we have: $$ \begin{align*} 2y-1 &= -(3-y) \\ 2y-1 &= y-3 \\ 2y &= y-2 \\ y &= -2 \end{align*} $$ Finally we can substitute \( y=-2 \) into the first equation to get: $$ \begin{align*} x+(-2) &= 3 \\ x &= 5 \end{align*} $$ The solution to the system is \( (x,y)=(5,-2) \).
- Similar to problem 1, solve \( x \) in terms of \( y \): $$ \begin{align*} x+2y &= 5 \\ \rightarrow x &= 5-2y \end{align*} $$ Substitute into other equation: $$ \begin{align*} 2y-3(5-2y) &= 1 \\ 2y-15+6y &= 1 \\ 8y &= 16 \\ y &= 2 \end{align*} $$ Substitute value of y into original equation: $$ \begin{align*} x+2(2) &= 5 \\ x+4 &= 5 \\ x &= 1 \end{align*} $$ Hence, the solution is \( (1,2) \).
- Dividing both sides of the first equation by 2 gives: $$ x+2=3y $$ Solving this for x gives: \( x=3y-2 \), which we can substitute into the second equation to solve for \( y \): $$ \begin{align*} 3(3y-2)-4y &= 9 \\ 9y-6-4y &= 9 \\ 5y &= 15 \\ y &= 3 \end{align*} $$ Now we can substitute \( y=3 \) into either of the original equations to solve for \( x \): $$ \begin{align*} x+2 &= 3(3) \\ x+2 &= 9 \\ x &= 7 \end{align*} $$ The solution to the system is \( (7,3) \).
- Solve for \( y \) in terms of \( x \): $$ \begin{align*} x+y &= 2 \\ \rightarrow y &= 2-x \end{align*} $$ Substitute for \( y \) and solve for \( x \): $$ \begin{align*} x-(2-x) &= -1 \\ 2x-2 &= -1 \\ 2x &= 1 \\ x &= \frac{1}{2} \end{align*} $$ Substitute \( x \) and solve for \( y \): $$ \begin{align*} \frac{1}{2}+y &= 2 \\ y &= \frac{3}{2} \end{align*} $$ The final solution is \( (\frac{1}{2},\frac{3}{2}) \).
- $$ \begin{align*} A &= (-6,5) \\ B &= (-6,2) \\ C &= (-3,-1) \\ D &= (0,2) \\ E &= (3,0) \\ F &= (4,5) \\ G &= (7,-3) \end{align*} $$
- Using the rise over run equation for slope we have: $$ \text{Slope}=\frac{(5)-(-1)}{(-6)-(-3)}=\frac{6}{-3}=-2 $$
- First we’ll calculate the slope: $$ m=\frac{(2)-(-1)}{(0)-(-3)}=\frac{3}{3}=1 $$ The line crosses the y-axis at \( (0,2) \), so \( b=2 \), and the equation is \( y=x+2 \).
- \( x=-6 \), no slope.
- \( y=2 \), zero slope.
- First calculate the slope: $$ m=\frac{(0)-(-1)}{(3)-(-3)}=\frac{1}{6} $$ Now substitute the values of one point into the equation \( y=\frac{1}{6}x+b \) and solve for \( b \): $$ \begin{align*} (0) &= \frac{1}{6}(3)+b \\ 0 &= \frac{1}{2}+b \\ b &= -\frac{1}{2} \end{align*} $$ The equation is \( y=\frac{1}{6}x-\frac{1}{2} \).
- Since the lines are parallel we know the slope are the same: \( -\frac{1}{4} \), and from point D we know the y-intercept is at \( (0,2) \), so the answer is \( y=-\frac{1}{4}x+2 \).
- The line perpendicular to \( y=\frac{2}{3}x-1 \) has a slope that is the negative inverse of \( \frac{2}{3} \), which is \( -\frac{3}{2} \). So our line is of the form: \( y=-\frac{3}{2}x+b \). To find \( b \) we can substitute the \( (x,y) \) values of point A into this equation and solve for \( b \): $$ \begin{align*} 5 &= -\frac{3}{2}(-6)+b \\ 5 &= 9+b \\ b &= -4 \end{align*} $$ Therefore the perpendicular line is represented by the equation \( y=-\frac{3}{2}x-4 \).
- Convert the equation into slope intercept form: $$ \begin{align*} 7x+5y+3 &= 0 \\ 5y &= -7x-3 \\ y &= -\frac{7}{5}x-\frac{3}{5} \end{align*} $$ From this we can easily see that the slope is \( -\frac{7}{5} \).
- Plugging \( m=5 \) and \( b=-8 \) directly into slope intercept you get the equation \( y=5x-8 \).
- Let \( L \) represent the amount of money Li spent, and \( J \) represent the amount of money Jeb spent. From the text we know that \( J=\frac{4}{5}L \) and \( J=L-10 \). Equating these two equations we get the solvable equation: $$ \begin{align*} \frac{4}{5}L &= L-10 \\ -\frac{1}{5}L &= -10 \\ L &= 50 \end{align*} $$ Now substituting \( L=50 \) into \( J=L-10 \) we get: $$ J=50-10=40 $$ Hence, Li spent \( $50 \) and Jeb spent \( $40 \).