# Solving Systems of Linear Equations

### Solutions of Linear Systems

A system of linear equations can have zero, one, or infinitely many solutions. For two variables, they are represented graphically as parallel lines, intersecting lines, or lines that coincide. For three variables, they are represented as intersections of planes.

A system of equations is a set of equations that are used at the same time. A solution of a system of equations is an ordered pair (triple, etc.) that is a solution of every equation in the system.

For example:
$\begin{cases}x+y=9 \\\phantom{x+}y=2x \end{cases}$
The ordered pair $(3,6)$ is a solution of the system because when $x=3$ and $y=6$ are substituted into both equations, they are both true.
\begin{aligned} x+y&=9\\3+6&=9\\9&=9\end{aligned} \hspace{20pt} \begin{aligned}y&=2x\\6&=2(3)\\6&=6 \end{aligned}
The ordered pair $(5,4)$ is not a solution of the system because when $x=5$ and $y=4$ in both equations, the second equation is not true.
\begin{aligned} x+y&=9\\5+4&=9\\9&=9\end{aligned} \hspace{20pt} \begin{aligned}y&=2x\\4&\overset{?}{=}2(5)\\4&\neq10 \end{aligned}
A system of equations that has at least one solution is called a consistent system. A consistent system with only one solution is an independent system, and a consistent system with an infinite number of solutions is a dependent system. For some systems, there are no values that make each equation true. A system with no solution is called an inconsistent system.

A system of two equations in two variables can be represented by the graphs of the lines. The solutions of the system are points that are on both lines.

### Solutions of Systems of Linear Equations in Two Variables

Consistent and independent; one solution Consistent and dependent; infinite number of solutions Inconsistent; no solution
Two lines intersecting at one point Two lines that coincide with each other Two parallel lines that do not intersect

A system of three equations in three variables can represented by the graphs of three planes in three dimensions. The solutions of the system are the points that are in all three planes.

### Solutions of Systems of Linear Equations in Three Variables

Consistent and independent; one solution Consistent and dependent; infinite number of solutions Inconsistent; no solution
Three planes intersecting at one point Three planes that intersect at one line Three planes that do not intersect at a common point

### Graphing Systems of Linear Equations

The solution of a system of linear equations can be estimated from a graph and then confirmed by substituting the values into the equations.
Graphing systems of linear equations is helpful in approximating the solution before using another method to determine the precise solution. If an ordered pair that is graphed makes two equations true, then the graphs of those equations intersect at that point.
Step-By-Step Example
Solve a System of Linear Equations by Graphing
Solve the system of equations by graphing.
$\begin{cases}3x+6y=6\\2x-2y=4\end{cases}$
Step 1
Rewrite each equation in slope-intercept form, $y=mx+b$.
\begin{aligned}3x+6y&=6\\3x+6y-3x&=6-3x\\6y&=6-3x\\\frac{6y}{6}&=\frac{6}{6}-\frac{3x}{6}\\y&=1-\frac{x}{2}\\y&=-\frac{1}{2}x+1\\\phantom{0}\end{aligned}\hspace{20pt}\begin{aligned}2x-2y&=4\\2x-2y+2y&=4+2y\\2x&=4+2y\\2x-4&=4+2y-4\\2x-4&=2y\\\frac{2x}{2}-\frac{4}{2}&=\frac{2y}{2}\\x-2&=y\\y&=x-2\end{aligned}
Step 2

Graph each equation.

The first equation is:
$y=-\frac{1}{2}x+1$
The $y$-intercept is 1. The slope is $-\frac{1}{2}$. The second equation is:
$y=x-2$
The $y$-intercept is –2. The slope is 1.
Step 3
A point of intersection is a solution of both equations. Locate the point where the graphs intersect.
The graphs intersect at a single point, so the system is consistent and independent. The graphs appear to intersect at $(2,0)$.
Solution
To check that a point read from a graph is in fact a solution, substitute the values for $x$ and $y$ into both equations and simplify. If they both result in true equations, then the ordered pair is a solution.
\begin{aligned}y&=-\frac{1}{2}x+1\\0&=-\frac{1}{2}(2)+1\\0&=-1+1\\0&=0\end{aligned}\hspace{20pt}\begin{aligned}y&=x-2\\(0)&=(2)-2\\0&=0\\\phantom{0}\\\phantom{0}\end{aligned}
The solution is $(2,0)$.
Step-By-Step Example
Graph to Confirm a System Has No Solutions
Show that the system of equations has no solutions.
$\begin{cases}y=8x-2\\y=8x+5\end{cases}$
Step 1
Compare the slopes and $y$-intercepts.
$\begin{cases}y=8x-2\\y=8x+5\end{cases}$
The slope of each line is 8. The $y$-intercepts are different.
Step 2
Graph each equation. Locate any points of intersection.
The graphs of the equations are parallel lines that never intersect. So, the system is inconsistent.
Solution
The system is inconsistent. So, there are no solutions.
Step-By-Step Example
Graph to Confirm a System Has Infinitely Many Solutions
Show that the system of equations has infinitely many solutions.
$\begin{cases}\phantom{6}y=x-5\\6y=6x-30\end{cases}$
Step 1
Compare the equations.
$\begin{cases}\phantom{6}y=x-5\\6y=6x-30\end{cases}$
Each term in the second equation is 6 times a term in the first equation. The equation is a multiple of:
$y=x-5$
Step 2

Graph each equation. Locate any points of intersection.

Both equations are equivalent to:
$y=x-5$
The graphs coincide. So, there are infinitely many points of intersection. The system is consistent and dependent.
Solution
The system is consistent and dependent. So, there are infinitely many solutions.

### Substitution

A system of linear equations can be solved by solving an equation for one variable and substituting the resulting expression in the other equation(s).

The substitution method is a method for solving a system of equations by solving for one variable and then substituting the result back into the other equation or equations.

To solve by substitution:

1. Solve one of the equations for one of the variables.

2. Substitute that expression for the variable in the other equation.

3. Solve for the remaining variable.

4. Write the solution as an ordered pair.

Step-By-Step Example
Solve a System of Linear Equations by Substitution
Solve the system of equations by substitution.
$\begin{cases}3x-4y=13\\2x-6y=12\end{cases}$
Step 1
Solve one of the equations for one of the variables.
$\begin{cases}3x-4y=13\\2x-6y=12\end{cases}$
If possible, choose a variable and equation that will not result in the equation containing fractions. Solve the second equation for $x$.
\begin{aligned}2x-6y&=12\\2x-6y+6y&=12+6y\\2x&=12+6y\\\frac{2x}{2}&=\frac{12}{2}+\frac{6y}{2}\\x&=6+3y\end{aligned}
Step 2

Substitute the expression from Step 1 for the variable in the other equation.

Substitute $6+3y$ for $x$ in the first equation.
\begin{aligned}3x-4y&=13\\3(6+3y)-4y&=13\end{aligned}
Step 3
Solve for the remaining variable.
\begin{aligned}3(6+3y)-4y&=13\\18+9y-4y&=13\\18+5y-18&=13-18\\5y&=-5\\y&=-1\end{aligned}
Step 4

Substitute the value from Step 3 back into either of the original equations and solve for the other variable.

Substitute –1 for $y$ in the second equation:
\begin{aligned}2x-6y&=12\\2x-6(-1)&=12\\2x-(-6)&=12\\2x+6&=12\\2x+6-6&=12-6\\2x&=6\\x&=3\end{aligned}
Solution

Write the values of each variable as an ordered pair.
The solution is $(3, -1)$.

To check the solution, substitute the values for $x$ and $y$ back into both equations and simplify. If they both result in true equations, then the solution is correct.
\begin{aligned}3x-4y&=13\\3(3)-4(-1)&=13\\9-(-4)&=13\\9+4&=13\\13&=13\end{aligned}\hspace{20pt}\begin{aligned}2x-6y&=12\\2(3)-6(-1)&=12\\6-(-6)&=12\\6+6&=12\\12&=12\end{aligned}

### Elimination

Equations in a system can be added, subtracted, and/or multiplied by a nonzero constant in order to eliminate a variable.

Although the substitution method can be used to solve any system of linear equations, this method sometimes results in equations containing fractions. If it is not possible to solve one of the equations in the system for one of the variables without generating fractions, it may be easier to use another algebraic method to solve the system.

The elimination method is a method for solving systems of equations that involves combining multiples of equations to eliminate variables.

To solve by elimination:

1. Multiply both sides of one equation (or both equations, if necessary) by a constant so that one of its terms is the opposite of a term in the other equation.

2. Add the equations to eliminate one of the variables.

3. Solve for the remaining variable.

4. Substitute the value found in Step 3 into either of the original equations and solve for the other variable.

5. Write the solution as an ordered pair.

The elimination method can be expanded and repeated as necessary for a system with two or more equations and variables.

Step-By-Step Example
Solve a System of Linear Equations in Two Variables by Elimination
Solve the system of equations by elimination.
$\begin{cases}\phantom{4}x-3y=10\ \ [1]\\4x+9y=19\ \ [2] \end{cases}$
Step 1
Multiply both sides of one equation (or both equations, if necessary) by a constant so that one of its terms is the opposite of a term in the other equation.
$\begin{cases}\phantom{4}x-3y=10\ \ [1]\\4x+9y=19\ \ [2] \end{cases}$
Multiply equation [1] by 3 so that the $y$-term has a coefficient of –9, making it the opposite of $9y$ in equation [2]. Label the resulting equation as [3].
\begin{aligned}3(x-3y)&=3(10)\\3x-9y&=30\hspace{20pt}[3]\end{aligned}
Step 2
Add equations [3] and [2] to eliminate $y$.
\begin{aligned}\begin{cases}3x-9y=30 \hspace{10pt} [3]\\\underline{4x+9y=19} \hspace{10pt}[2]\end{cases}\\\phantom{\lbrack}7x+0y=49 \hspace{10pt}\phantom{[2]} \end{aligned}
Step 3
Solve the resulting equation for $x$.
\begin{aligned}7x&=49\\\frac{7x}{7}&=\frac{49}{7}\\x&=7\end{aligned}
Step 4

Substitute the value of $x$ found in Step 3 into either of the original equations, then solve for $y$.

Substitute 7 for $x$ in $x-3y=10$.
\begin{aligned}x-3y&=10\\(7)-3y&=10\\7-3y-7&=10-7\\-3y&=3\\\frac{-3y}{-3}&=\frac{3}{-3}\\y&=-1\end{aligned}
Solution

Write the values of each variable as an ordered pair.
The solution is $(7, -1)$.

To check the solution, substitute the values for $x$ and $y$ back into both equations and simplify. If they both result in true equations, then the solution is correct.
\begin{aligned}x-3y&=10\\(7)-3(-1)&=10\\7-(-3)&=10\\7+3&=10\\10&=10\end{aligned}\hspace{20pt}\begin{aligned}4x+9y&=19\\4(7)+9(-1)&=19\\28+(-9)&=19\\28-9&=19\\19&=19\end{aligned}
Step-By-Step Example
Solve a System of Linear Equations in Three Variables by Elimination
Solve the system of equations by elimination.
$\begin{cases}\phantom{5}x+\phantom{2}y+\phantom{6}z=8 & [1]\\ 5x+2y-6z=2 & [2]\\ -x-4y+\phantom{6}z=6 &[3] \end{cases}$
Step 1

Combine two equations to eliminate one of the variables. If necessary, multiply both sides of one equation (or both equations) by a constant so that one of its terms is the opposite of a term in the other equation.

The $x$-terms in equations [1] and [3] are opposites. Add to eliminate the $x$-term. Label the resulting equation as [4].
\begin{aligned}\begin{cases}\phantom{-}x+\phantom{4}y+z=8\phantom{4}\hspace{10pt}[1]\\\underline{-x-4y+z=6\phantom{4}}\hspace{10pt}[3]\end{cases}\\\phantom{\begin{cases}\end{cases}-}-3y+2z=14\hspace{10pt}[4]\end{aligned}
Step 2

Eliminate the $x$-term from the remaining equation.

Multiply equation [3] by 5 so that its $x$-term is the opposite of the $x$-term in equation [2]. Label the resulting equation as [5].
$\begin{cases}5x+2y-6z=2&[2] \\ 5(-x-4y+z=6) &[3] \end{cases} \rightarrow \begin{cases} \phantom{-}5x+2y-6z=2&[2] \\ -5x-20y+5z=30 &[5] \end{cases}$
Step 3
Add equations [2] and [5], and label the resulting equation as [6].
\begin{aligned}\begin{cases}\phantom{-}5x+\phantom{2}2y-6z=2\phantom{0}\hspace{10pt}[2]\\\underline{-5x-20y+5z=30}\hspace{10pt}[5]\end{cases}\\\phantom{\lbrack-5x}-18y-\phantom{5}z=32\hspace{10pt}[6]\end{aligned}
Step 4

Solve for one of the remaining variables.

Multiply equation [6] by 2 so that its $z$-term is the opposite of the $z$-term in equation [4] from Step 1. Label the resulting equation as [7].
$\begin{cases}-3y+2z=14&[4] \\ 2(-18y-z=32) &[6] \end{cases} \rightarrow \begin{cases} -3y+2z=14&[4] \\ -36y-2z=64 &[7] \end{cases}$
Step 5
Add equations [4] and [7] to eliminate $z$.
\begin{aligned}\begin{cases}-\phantom{3}3y+2z=14\hspace{10pt}[4]\\\underline{-36y-2z=64}\hspace{10pt}[7]\end{cases}\\\phantom{\begin{cases}\end{cases}}-39y\phantom{-2z}=78\hspace{10pt}[6]\end{aligned}
Step 6
Solve for $y$.
\begin{aligned}-39y&=78\\y&=-2\end{aligned}
Step 7

Substitute the value found in Step 6 into either of the equations with only two variables, and solve for the other variable.

Substitute –2 for $y$ in equation [4].
\begin{aligned}-3y+2z&=14\\-3(-2)+2z&=14\\6+2z&=14\\2z&=8\\z&=4\end{aligned}
Step 8

Substitute the values that have been found into one of the original equations and solve for the remaining variable.

Substitute –2 for $y$ and 4 for $z$ in equation [1].
\begin{aligned}x+y+z&=8\\x+(-2)+(4)&=8\\x+2&=8\\x&=6\end{aligned}
Solution

Write the values of each variable as an ordered triple.

The solution is $(6,-2,4)$.

The solution can be checked by substituting the values for $x$, $y$, and $z$ back into the original equations. If all result in true equations, then the solution is correct.