MAT040 Beginning Algebra All classes

Systems of Equations · Chapter 13

Solving Systems of Equations

The numbered examples below are interactive: the numbers change every time you load the page. Type your answer, press Enter or Check, and use New numbers to practice again.

Is an Ordered Pair a Solution?

When two or more linear equations are grouped together, they form a system of linear equations.

We focus on systems of two linear equations in two unknowns. We use a brace to show the equations are grouped together. For example:

{2x+y=7x−2y=6\begin{cases}2x+y=7\\x-2y=6\end{cases}

A linear equation in two variables, like 2x+y=72x+y=7, has infinitely many solutions. Its graph is a line, and every point on the line is a solution to the equation, and every solution is a point on the line. To solve a system we find the ordered pairs (x,y)(x,y) that make both equations true.

Solutions of a system of equations are the values of the variables that make all the equations true. A solution of a system of two linear equations is represented by an ordered pair (x,y)(x,y).

To determine if an ordered pair is a solution, substitute the values into both equations. If the pair makes both equations true, it is a solution of the system. Consider the system

{3x−y=7x−2y=4\begin{cases}3x-y=7\\x-2y=4\end{cases}

Is (2,−1)(2,-1) a solution? Substitute x=2x=2 and y=−1y=-1:

3(2)−(−1)=6+1=7 ✓2−2(−1)=2+2=4 ✓3(2)-(-1)=6+1=7\ \checkmark\qquad\qquad2-2(-1)=2+2=4\ \checkmark

Both are true, so (2,−1)(2,-1) is a solution. Is (3,2)(3,2) a solution? Substitute x=3x=3 and y=2y=2:

3(3)−2=7 ✓3−2(2)=−1≠4 ×3(3)-2=7\ \checkmark\qquad\qquad3-2(2)=-1\neq4\ \times

It made one equation true but the other false, so (3,2)(3,2) is not a solution.

Example 1

Determine whether the ordered pair is a solution to the system

{x−y=−12x−y=−5\begin{cases}x-y=-1\\2x-y=-5\end{cases}

a. (−2,−1)b. (−4,−3)a.\ (-2,-1)\qquad\qquad b.\ (-4,-3)

a.a. Substitute x=−2x=-2, y=−1y=-1:

−2−(−1)=−1 ✓2(−2)−(−1)=−4+1=−3≠−5 ×-2-(-1)=-1\ \checkmark\qquad\qquad2(-2)-(-1)=-4+1=-3\neq-5\ \times

(−2,−1)(-2,-1) is not a solution.
b.b. Substitute x=−4x=-4, y=−3y=-3:

−4−(−3)=−1 ✓2(−4)−(−3)=−8+3=−5 ✓-4-(-3)=-1\ \checkmark\qquad\qquad2(-4)-(-3)=-8+3=-5\ \checkmark

(−4,−3)(-4,-3) is a solution.

Types of Systems

It is possible for a system to have no solution.

A consistent system of equations is a system with at least one solution.
An inconsistent system of equations is a system with no solution.

We also describe the equations in a system as independent or dependent.

Two equations are independent if they have different solutions.
Two equations are dependent if all the solutions of one equation are also solutions of the other equation.

Solving Systems of Equations by Substitution

Consider the system

{2x+y=7x−2y=6\begin{cases}2x+y=7\\x-2y=6\end{cases}

.Wefirstsolveoneoftheequationsforeither. We first solve one of the equations for eitherxorory,choosingwhicheverkeepstheworkeasy.Thenwesubstitutethatexpressionintotheotherequation.Theresultisanequationwithjustonevariable,whichweknowhowtosolve!Afterwefindonevariable,wesubstitutethatvalueintooneoftheoriginalequationsandsolvefortheothervariable.Finallywecheckthatoursolutionmakesbothequationstrue., choosing whichever keeps the work easy. Then we substitute that expression into the \emph{other} equation. The result is an equation with just one variable, which we know how to solve! After we find one variable, we substitute that value into one of the original equations and solve for the other variable. Finally we check that our solution makes both equations true.

How to solve a system of equations by substitution.
Step 1. Solve one of the equations for either variable.
Step 2. Substitute the expression from Step 1 into the other equation.
Step 3. Solve the resulting equation.
Step 4. Substitute the solution from Step 3 into one of the original equations to find the other variable.
Step 5. Write the solution as an ordered pair.
Step 6. Check that the ordered pair is a solution to both original equations.

Example 2

Solve by substitution.

{2x+y=7x−2y=6\begin{cases}2x+y=7\\x-2y=6\end{cases}
Step 1: solve the first equation for y:2x+y=7 → y=7−2xStep 2: substitute into the second equation:x−2(7−2x)=6Step 3: solve for x:x−14+4x=6 → 5x=20 → x=4Step 4: substitute into 2x+y=7:2(4)+y=7 → y=−1Step 5: ordered pair:(4,−1)\begin{align*} \text{Step 1: }&\text{solve the first equation for }y:\quad 2x+y=7\ \to\ y=7-2x\\ \text{Step 2: }&\text{substitute into the second equation:}\quad x-2(7-2x)=6\\ \text{Step 3: }&\text{solve for }x:\quad x-14+4x=6\ \to\ 5x=20\ \to\ x=4\\ \text{Step 4: }&\text{substitute into }2x+y=7:\quad 2(4)+y=7\ \to\ y=-1\\ \text{Step 5: }&\text{ordered pair:}\quad (4,-1) \end{align*}

Step 6, check: 2(4)+(−1)=7✓2(4)+(-1)=7\checkmark and 4−2(−1)=6✓4-2(-1)=6\checkmark. The solution is (4,−1)(4,-1).

If one of the equations is already solved for a variable, Step 1 is already done.

Example 3

Solve by substitution.

{x+y=−1y=x+5\begin{cases}x+y=-1\\y=x+5\end{cases}

The second equation is already solved for yy. Substitute x+5x+5 for yy in the first equation.

x+(x+5)=−12x+5=−12x=−6x=−3\begin{align*} x+(x+5)&=-1\\ 2x+5&=-1\\ 2x&=-6\\ x&=-3 \end{align*}

Substitute into y=x+5y=x+5: y=−3+5=2y=-3+5=2. The solution is (−3,2)(-3,2).
Check: −3+2=−1✓-3+2=-1\checkmark and 2=−3+5✓2=-3+5\checkmark.

When you have to solve for a variable first, choose one whose coefficient is 11 or −1-1. That avoids fractions, so look for one before you start.

Example 4

Solve by substitution.

{3x+y=52x+4y=−10\begin{cases}3x+y=5\\2x+4y=-10\end{cases}

Solve the first equation for yy: y=−3x+5y=-3x+5. Substitute into the second equation.

2x+4(−3x+5)=−102x−12x+20=−10−10x=−30x=3\begin{align*} 2x+4(-3x+5)&=-10\\ 2x-12x+20&=-10\\ -10x&=-30\\ x&=3 \end{align*}

Substitute x=3x=3 into 3x+y=53x+y=5: 9+y=59+y=5, so y=−4y=-4. The solution is (3,−4)(3,-4).

Example 5

Solve by substitution.

{x−2y=−23x+2y=34\begin{cases}x-2y=-2\\3x+2y=34\end{cases}

Solve the first equation for xx: x=2y−2x=2y-2. Substitute into the second equation.

3(2y−2)+2y=346y−6+2y=348y=40y=5\begin{align*} 3(2y-2)+2y&=34\\ 6y-6+2y&=34\\ 8y&=40\\ y&=5 \end{align*}

Substitute y=5y=5 into x−2y=−2x-2y=-2: x−10=−2x-10=-2, so x=8x=8. The solution is (8,5)(8,5).

When both equations are already solved for the same variable, it is easy to substitute.

Example 6

Solve by substitution.

{y=12xy=−2x+5\begin{cases}y=\frac12x\\y=-2x+5\end{cases}

Both equations are solved for yy, so substitute 12x\frac12x for yy in the second equation.

12x=−2x+52(12x)=2(−2x+5)clear the fractionx=−4x+105x=10x=2\begin{align*} \tfrac12x&=-2x+5\\ 2\left(\tfrac12x\right)&=2(-2x+5)&&\text{clear the fraction}\\ x&=-4x+10\\ 5x&=10\\ x&=2 \end{align*}

Substitute into y=12xy=\frac12x: y=12⋅2=1y=\frac12\cdot2=1. The solution is (2,1)(2,1).

Be very careful with the signs in the next example.

Example 7

Solve by substitution.

{4x+2y=46x−y=8\begin{cases}4x+2y=4\\6x-y=8\end{cases}

Solve the first equation for yy: 2y=−4x+42y=-4x+4, so y=−2x+2y=-2x+2. Substitute into the second equation.

6x−(−2x+2)=86x+2x−2=88x=10x=54\begin{align*} 6x-(-2x+2)&=8\\ 6x+2x-2&=8\\ 8x&=10\\ x&=\frac54 \end{align*}

Substitute into 4x+2y=44x+2y=4: 4(54)+2y=44\left(\frac54\right)+2y=4, so 5+2y=45+2y=4, 2y=−12y=-1 and y=−12y=-\frac12. The solution is (54,−12)\left(\frac54,-\frac12\right).

Example 8

Solve by substitution.

{4x−3y=615y−20x=−30\begin{cases}4x-3y=6\\15y-20x=-30\end{cases}

Solve the first equation for xx: 4x=3y+64x=3y+6, so x=34y+32x=\frac34y+\frac32. Substitute into the second equation.

15y−20(34y+32)=−3015y−15y−30=−30−30=−300=0\begin{align*} 15y-20\left(\tfrac34y+\tfrac32\right)&=-30\\ 15y-15y-30&=-30\\ -30&=-30\\ 0&=0 \end{align*}

Since 0=00=0 is a true statement, the system is consistent and the equations are dependent. The system has infinitely many solutions.

Example 9

Solve by substitution.

{5x−2y=−10y=52x\begin{cases}5x-2y=-10\\y=\frac52x\end{cases}

Substitute 52x\frac52x for yy in the first equation.

5x−2(52x)=−105x−5x=−100=−10\begin{align*} 5x-2\left(\tfrac52x\right)&=-10\\ 5x-5x&=-10\\ 0&=-10 \end{align*}

Since 0=−100=-10 is a false statement, the equations are inconsistent. The system has no solution.

If solving leaves a true statement like 0=00=0, the system is consistent and the equations are dependent. There are infinitely many solutions.
If solving leaves a false statement like 0=−100=-10, the system is inconsistent. There is no solution.

Solving Systems of Equations by Elimination

Substitution works well when we can easily solve one equation for a variable without too many fractions. The second method, elimination, is based on the Addition Property of Equality: when you add the same quantity to both sides of an equation you still have equality. We extend it to say that adding equal quantities to both sides keeps the equation equal.

For any expressions a,b,c,da,b,c,d: if a=ba=b and c=dc=d then a+c=b+da+c=b+d.

To solve a system by elimination, start with both equations in standard form, Ax+By=CAx+By=C. Then decide which variable is easiest to eliminate by making its coefficients opposites, so that adding the equations eliminates that variable. For example,

3x+y=5+  2x−y=05x+y=5\begin{array}{r}3x+y=5\\+\ \ 2x-y=0\\\hline5x\phantom{{}+y}=5\end{array}

The yy’s add to zero and we have one equation with one variable. Let’s try

{x+4y=22x+5y=−2\begin{cases}x+4y=2\\2x+5y=-2\end{cases}

We don’t see a variable we can eliminate by adding yet. But if we multiply the first equation by −2-2 (every term!), the coefficients of xx are opposites:

−2x−8y=−4+  2x+5y=−2−3y=−6\begin{array}{r}-2x-8y=-4\\+\ \ 2x+5y=-2\\\hline-3y=-6\end{array}

so y=2y=2. Substituting into x+4y=2x+4y=2 gives x+8=2x+8=2, so x=−6x=-6. The solution is (−6,2)(-6,2). Check: 2(−6)+5(2)=−12+10=−2✓2(-6)+5(2)=-12+10=-2\checkmark.

How to solve a system of equations by elimination.
Step 1. Write both equations in standard form. If any coefficients are fractions, clear them.
Step 2. Make the coefficients of one variable opposites. Decide which variable you will eliminate, then multiply one or both equations so that the coefficients of that variable are opposites.
Step 3. Add the equations resulting from Step 2 to eliminate one variable.
Step 4. Solve for the remaining variable.
Step 5. Substitute the solution from Step 4 into one of the original equations. Then solve for the other variable.
Step 6. Write the solution as an ordered pair.
Step 7. Check that the ordered pair is a solution to both original equations.

Sometimes we must multiply both equations by constants. For

{4x−3y=103x+5y=−7\begin{cases}4x-3y=10\\3x+5y=-7\end{cases}

we cannot get opposite coefficients by multiplying one equation by a constant unless we use fractions. Instead multiply the first equation by 33 and the second by −4-4 so that the xx terms become 12x12x and −12x-12x:

12x−9y=30−12x−20y=28−29y=58\begin{array}{r}12x-9y=30\\-12x-20y=28\\\hline-29y=58\end{array}

so y=−2y=-2, then 4x−3(−2)=104x-3(-2)=10 gives 4x=44x=4 and x=1x=1. The solution is (1,−2)(1,-2). Check: 3(1)+5(−2)=3−10=−7✓3(1)+5(-2)=3-10=-7\checkmark.

Example 10

Solve by elimination (the same system we solved by substitution).

{2x+y=7x−2y=6\begin{cases}2x+y=7\\x-2y=6\end{cases}

Steps 1–2. Both equations are in standard form with no fractions. Multiply the first equation by 22 so the yy coefficients are opposites:

2(2x+y)=2(7) → 4x+2y=14.2(2x+y)=2(7)\ \to\ 4x+2y=14.

Step 3. Add:

4x+2y=14x−2y=65x+2y=20\begin{array}{r}4x+2y=14\\x-2y=6\\\hline5x\phantom{{}+2y}=20\end{array}

Step 4. x=4x=4.
Step 5. Substitute into x−2y=6x-2y=6: 4−2y=64-2y=6, so −2y=2-2y=2 and y=−1y=-1.
Steps 6–7. The solution is (4,−1)(4,-1). Check: 2(4)+(−1)=7✓2(4)+(-1)=7\checkmark and 4−2(−1)=6✓4-2(-1)=6\checkmark. (The same answer as by substitution.)

Example 11

Solve by elimination.

{x+y=10x−y=12\begin{cases}x+y=10\\x-y=12\end{cases}

The coefficients of yy are already opposites. Add the equations:

x+y=10x−y=122x+y=22\begin{array}{r}x+y=10\\x-y=12\\\hline2x\phantom{{}+y}=22\end{array}

So x=11x=11. Substitute into x+y=10x+y=10: 11+y=1011+y=10, so y=−1y=-1. The solution is (11,−1)(11,-1).
Check: 11+(−1)=10✓11+(-1)=10\checkmark and 11−(−1)=12✓11-(-1)=12\checkmark.

Example 12

Solve by elimination.

{3x−2y=−25x−6y=10\begin{cases}3x-2y=-2\\5x-6y=10\end{cases}

Multiply the first equation by −3-3 to make the yy coefficients opposites:

−3(3x−2y)=−3(−2) → −9x+6y=6.-3(3x-2y)=-3(-2)\ \to\ -9x+6y=6.

Add to the second equation:

−9x+6y=65x−6y=10−4x+6y=16\begin{array}{r}-9x+6y=6\\5x-6y=10\\\hline-4x\phantom{{}+6y}=16\end{array}

So x=−4x=-4. Substitute into 3x−2y=−23x-2y=-2: −12−2y=−2-12-2y=-2, so −2y=10-2y=10 and y=−5y=-5. The solution is (−4,−5)(-4,-5).
Check: 3(−4)−2(−5)=−12+10=−2✓3(-4)-2(-5)=-12+10=-2\checkmark and 5(−4)−6(−5)=−20+30=10✓5(-4)-6(-5)=-20+30=10\checkmark.

Example 13

Solve by elimination.

{4x−3y=97x+2y=−6\begin{cases}4x-3y=9\\7x+2y=-6\end{cases}

We multiply both equations by constants. To make the yy coefficients opposites, multiply the first equation by 22 and the second by 33:

8x−6y=1821x+6y=−1829x+6y=0\begin{array}{r}8x-6y=18\\21x+6y=-18\\\hline29x\phantom{{}+6y}=0\end{array}

So x=0x=0. Substitute into 7x+2y=−67x+2y=-6: 2y=−62y=-6, so y=−3y=-3. The solution is (0,−3)(0,-3).
Check: 4(0)−3(−3)=9✓4(0)-3(-3)=9\checkmark and 7(0)+2(−3)=−6✓7(0)+2(-3)=-6\checkmark.

When the system contains fractions, first clear them by multiplying each equation by its LCD.

Example 14

Solve by elimination.

{x+12y=632x+23y=172\begin{cases}x+\frac12y=6\\\frac32x+\frac23y=\frac{17}2\end{cases}

Clear the fractions: multiply the first equation by 22 and the second by 66.

2(x+12y)=2(6)→2x+y=126(32x+23y)=6(172)→9x+4y=51\begin{align*} 2\left(x+\tfrac12y\right)&=2(6)&\to\quad2x+y&=12\\ 6\left(\tfrac32x+\tfrac23y\right)&=6\left(\tfrac{17}2\right)&\to\quad9x+4y&=51 \end{align*}

Eliminate yy by multiplying the top equation by −4-4:

−8x−4y=−489x+4y=51x+4y=3\begin{array}{r}-8x-4y=-48\\9x+4y=51\\\hline x\phantom{{}+4y}=3\end{array}

Substitute x=3x=3 into x+12y=6x+\frac12y=6: 3+12y=63+\frac12y=6, so 12y=3\frac12y=3 and y=6y=6. The solution is (3,6)(3,6).
Check: 3+12(6)=6✓3+\frac12(6)=6\checkmark and 32(3)+23(6)=92+4=172✓\frac32(3)+\frac23(6)=\frac92+4=\frac{17}2\checkmark.

Example 15

Solve by elimination.

{3x+4y=12y=3−34x\begin{cases}3x+4y=12\\y=3-\frac34x\end{cases}

Write the second equation in standard form: 34x+y=3\frac34x+y=3. Clear the fractions by multiplying by 44: 3x+4y=123x+4y=12. Now the system is

{3x+4y=123x+4y=12\begin{cases}3x+4y=12\\3x+4y=12\end{cases}

To eliminate a variable, multiply the second equation by −1-1 and add:

3x+4y=12−3x−4y=−120=0\begin{array}{r}3x+4y=12\\-3x-4y=-12\\\hline0=0\end{array}

This is a true statement. The equations are consistent but dependent. The system has infinitely many solutions.

Example 16

Solve by elimination.

{−6x+15y=102x−5y=−5\begin{cases}-6x+15y=10\\2x-5y=-5\end{cases}

The equations are in standard form. Multiply the second equation by 33 to eliminate a variable:

−6x+15y=106x−15y=−150=−5\begin{array}{r}-6x+15y=10\\6x-15y=-15\\\hline0=-5\end{array}

This statement is false. The equations are inconsistent. The system has no solution.

Worked-example videos

Adapted from OpenStax Elementary Algebra, licensed under CC BY 4.0.