# 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:

$x=\frac{y+9}{2}$

$y=2x-9$

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.

$\text{System\;of\;equations:}$

$2x-y=9\\3y-x=-2$

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:

$3(2x-9)-x=-2$

We now have a linear equation in one variable, which we know how to solve:

$3(2x-9)-x=-2\\6x-27-x=-2\\5x=25\\x=5$

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:

$2x-y=9\\2(5)-y=9\\10-y=9\\y=1$

If we had chosen to substitute x=5 into the second equation we would get the same answer:

$3y-x=-2\\3y-5=-2\\3y=3\\y=1$

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)$.

A 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 straight eastward 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 equal values on both sides of the equals sign. For example, when we substitute $(6,3)$ into the equation we have:

$y=2x-9\\3=2(6)-9\\3=12-9\\3=3$

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 is actually a bit more to the story. With a system of equations it is still possible to still get infinitely many solutions, or to get no solutions.

If your system is composed of two identical but differently phrased equations, each equation will line up at every point giving you infinitely many solutions. For example look at $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’d 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; therefore, there are infinite solutions.

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:

$2x-9=2x-9\\2x=2x\\0=0$

Now if you have two equations that are parallel but not equal, you will have a system with no solution. Examine the system:

$y=x+1$

$y=x-1$

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:

$x+1=x-1\\x=x-1\\0=-1\text{\;?}$

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:

$y=mx+b$,

where $m\;$ and $b\;$ a 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:

$2y-2=6x\\y-1=3x\\y=3x+1$

Now the equation is in slope intercept form; we have $3\;$ in place of $m\;$ and $1\;$  in place of $b$.

The term $m\;$ is called the slope of the line. If you think of a line as a hill, the value of the slop determines how steep the hill is and whether the hill 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:

$\text{Slope\;(m)}$  =  $\frac{y_{1}-y_{2}}{x_{1}-x_{2}}$

For example given the points $(-2,8)\;$ and $(1,-1)$, we can calculate the slope of the line running through them:

$m\;=\;\frac{(8)-(-1)}{(-2)-(1)}=\frac{9}{-3}=-3$

The order of the points does not matter as long as we’re consistent with the order of the coordinates:

$m\;=\;\frac{(-1)-(8)}{(1)-(-2)}=\frac{-9}{3}=-3$

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:

$m\;=\;\frac{(8)-(-1)}{(-2)-(1)}=\frac{9}{-3}=-3$

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:

$(-1)=-3(1)+b\\-1=-3+b\\b=2$

We could have also substituted $(x,y)=(-2,8)\;$ into the equation and gotten the same answer:

$(8)=-3(-2)+b\\8=6+b\\b=2$

Both ways solve that $b=2$, and lead to the final equation: $y=-3x+2$.

Practice Questions

Solve the system of equations.

1.) $x+y=3,\qquad 2y-1=-x$

2.) $x+2y=5, \qquad 2y-3x=1$

3.) $2x+4=6y, \qquad 3x-4y=9$

4.) $x+y=2,\qquad x-y=-1$

Use the graph to answer questions 5-12.

5.) What are the coordinates of the points (A-G) on the above graph?

6.) What is the slope of the line that passes through points A and C?

7.) What is the equation of the line that passes through the points C and D?

8.) What is the equation of the line that passes through the points A and B? What is the slope of this line?

9.) What is the equation of the line that passes through the points B and D? What is the slope of this line?

10.) What is the equation of the line that passes through the points C and E?

11.) 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$?

12.) 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?

13.) What is the slope of the line with the equation $7x+5y+3=0$?

14.) What is the equation of a line that has a slope 5 and intercepts the y-axis at (0,-8)?

15.) 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?