Mathwarehouse Logo

How to solve systems of 3 variable equations

Using Elimination

Types of solutions for systems of planes (3 variable equations)

What is a solution of system of equations with 3 variables.

Solution icon

Solution for system of lines

Just as the solution system of lines is where those lines meet, a solution for a system of 3 variable equations (planes), is again, just where these planes meet.

types of solutions

read more here

Why 3 planes?

If you want to solve a linear equation with 2 variables, you need 2 equations.

You can's solve $$ x + y = 1$$ , right? That's because you need equations to solve for 2 variables.

Similarly, if you have an equation with 3 variables, ( graphically represented by 3 planes), you're going to need 3 equations to solve it.

Two important terms

Means that there is at least 1 intersection (solutions).

Means that there are no intersections (solutions).

Ok, so how do we find that point of intersection?

Before attempting to solve systems of three variable equations using elimination, you should probably be comfortable solving 2 variable systems of linear equations using elimination .

Video Tutorial on using Elimination

Example of how to solve a system of three variable equations using elimination.

Steps to solve system of 3 equations

Practice Problems

Use elimination to solve the following system of three variable equations.

  • A) 4x + 2y – 2z = 10
  • B) 2x + 8y + 4z = 32
  • C) 30x + 12y – 4z = 24

steps to solve 3 variable system by elimination

  • A) x - y + z = -1
  • B) x + y + z = 3
  • C) 4x + 2y + z = 8
  • A) 2x + 2y + 2z = -4

Although you can indeed solve 3 variable systems using elimination and substitution as shown on this page, you may have noticed that this method is quite tedious. The most efficient method is to use matrices or, of course, you can use this online system of equations solver . ( all of our pictures on this topic )

Ultimate Math Solver (Free) Free Algebra Solver ... type anything in there!

Popular pages @ mathwarehouse.com.

Surface area of a Cylinder

Logo for BCcampus Open Publishing

Want to create or adapt books like this? Learn more about how Pressbooks supports open publishing practices.

Chapter 5: Systems of Equations

5.4 Solving for Three Variables

When given three variables, you are given the equation for a plane or a flat surface similar to a sheet of paper. Some of the possible solutions to the intersections of these equations can be visualized below.

Visualizations of different planes

In solving systems of equations with three variables, use the strategies that are used to solve systems of two equations. One recommended method is to eliminate one variable at the onset, thus turning the set of three equations with three unknowns into two equations with two unknowns. The standard method to work with three equations or more is to use subtraction and/or addition.

Example 5.4.1

Find the intersection or the solution to the following system of equations: [latex]3x+2y-z=-1, -2x-2y+3z=5,[/latex] and [latex]5x+2y-z=3.[/latex]

As we did with a set of two equations, first line up the equations to choose the variable that we wish to eliminate:

[latex]\left\{ \begin{array}{rrrrrrr} 3x&+&2y&-&z&=&-1 \\ -2x&-&2y&+&3z&=&5 \\ 5x&+&2y&-&z&=&3 \end{array} \right.[/latex]

For these equations, it looks easiest to eliminate the [latex]y[/latex]-variable. To do this, add the first and second equations together and then add the second and third equations together:

[latex]\begin{array}{rr} \begin{array}{rrrrrrrr} &3x&+&2y&-&z&=&-1 \\ +&-2x&-&2y&+&3z&=&5 \\ \hline &&&x&+&2z&=&4 \end{array} &\hspace{0.25in} \begin{array}{rrrrrrrr} &-2x&-&2y&+&3z&=&5 \\ +&5x&+&2y&-&z&=&3 \\ \hline &&&3x&+&2z&=&8 \end{array} \end{array}[/latex]

Now, you are left with [latex]x+2z=4[/latex] and [latex]3x + 2z = 8.[/latex] We now solve these as done previously with a set of two equations:

[latex]\left\{ \begin{array}{rrrrr} x&+&2z&=&4 \\ 3x&+&2z&=&8 \end{array}\right.[/latex]

Multiply either the top or the bottom equation by −1 to eliminate the [latex]z[/latex]-variable.

[latex]\begin{array}{rrrrrrr} &(x&+&2z&=&4)&(-1) \\ &3x&+&2z&=&8& \\ \\ &-x&-&2z&=&-4& \\ +&3x&+&2z&=&8& \\ \hline &&&\dfrac{2x}{2}&=&\dfrac{4}{2}& \\ \\ &&&x&=&2& \end{array}[/latex]

Next, find [latex]z[/latex] using one of [latex]x+2z=4[/latex] or [latex]3x+2z=8[/latex] and the solution [latex]x= 2.[/latex] [latex]x+2z=4[/latex] looks to be the easiest to work with.

[latex]\begin{array}{rrrrr} x&+&2z&=&4 \\ 2&+&2z&=&4 \\ -2&&&&-2 \\ \hline &&\dfrac{2z}{2}&=&\dfrac{2}{2} \\ \\ &&z&=&1 \end{array}[/latex]

Finally,  find [latex]y[/latex] using one of the original three equations:

[latex]\begin{array}{rrrrrrr} 3x&+&2y&-&z&=&-1 \\ 3(2)&+&2y&-&(1)&=&-1 \\ 6&+&2y&-&1&=&-1 \\ &&5&+&2y&=&-1 \\ &&-5&&&=&-5 \\ \hline &&&&\dfrac{2y}{2}&=&\dfrac{-6}{2} \\ \\ &&&&y&=&-3 \end{array}[/latex]

These planes intersect at the point [latex]x = 2,[/latex] [latex]y = -3,[/latex] and [latex]z = 1[/latex], or the coordinate [latex](2, -3, 1).[/latex]

Sometimes, you are given a set of three equations with missing variables. These systems of equations require slightly more thought to solve than the previous problems.

Example 5.4.2

Find the intersection or the solution to the following system of equations: [latex]x+2y-z=0, 3x-2y=-2,[/latex] and [latex]y+z=3.[/latex]

First, line up the equations to choose the variable that we wish to eliminate:

[latex]\left\{ \begin{array}{rrrrrrr} x&+&2y&-&z&=&0 \\ 3x&-&2y&&&=&-2 \\ &&y&+&z&=&3 \end{array}\right.[/latex]

In this example, adding the first and last equations eliminates the variable [latex]z,[/latex] without having to modify any of the equations:

[latex]\begin{array}{rrrrrrrr} &x&+&2y&-&z&=&0 \\ +&&&y&+&z&=&3 \\ \hline &&&x&+&3y&=&3 \\ \end{array}[/latex]

Now, there are two equations left:

[latex]\left\{ \begin{array}{rrrrr} 3x&-&2y&=&-2 \\ x&+&3y&=&3 \end{array}\right.[/latex]

First multiply the bottom equation by −3, then add it to the top equation, to eliminate the variable [latex]x[/latex]:

[latex]\begin{array}{rrrrrrr} &(x&+&3y&=&3)&(-3) \\ \\ &3x&-&2y&=&-2& \\ +&-3x&-&9y&=&-9& \\ \hline &&&-11y&=&-11& \\ &&&y&=&1& \\ \end{array}[/latex]

Now choose one of the two remaining equations, [latex]3x-2y=-2[/latex] or [latex]x+3y=3,[/latex] to find the variable [latex]x.[/latex] Choosing [latex]x+3y= 3,[/latex] leaves:

[latex]\begin{array}{rrrrr} x&+&3(1)&=&3 \\ x&+&3&=&3 \\ &-&3&=&-3 \\ \hline &&x&=&0 \end{array}[/latex]

Finally, to find the third variable, use one of the original three equations: [latex]x+2y-z=0, 3x-2y=-2,[/latex]  or [latex]y+z=3.[/latex] Choosing [latex]y + z = 3,[/latex] gives:

[latex]\begin{array}{rrrrr} (1)&+&z&=&3 \\ &&z&=&2 \end{array}[/latex]

These planes intersect at the point [latex]x = 0, y = 1,[/latex] and [latex]z = 2,[/latex] or the coordinate [latex](0, 1, 2).[/latex]

Solve each of the following systems of equations.

  • [latex]\left\{ \begin{array}{rrrrrrr} a&-&b&+&2c&=&2 \\ 2a&+&b&-&c&=&2 \\ a&+&b&+&c&=&3 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} 2a&+&3b&-&c&=&12 \\ 3a&+&4b&+&c&=&19 \\ a&-&2b&+&c&=&-3 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} 3x&+&y&-&z&=&7 \\ x&+&3y&-&z&=&5 \\ x&+&y&+&2z&=&3 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&y&+&z&=&4 \\ x&+&2y&+&3z&=&10 \\ x&-&y&+&4z&=&20 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&2y&-&z&=&0 \\ 2x&-&y&+&z&=&15 \\ 3x&-&2y&-&4z&=&-5 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&-&y&+&2z&=&-3 \\ x&+&2y&+&3z&=&4 \\ 2x&+&y&+&z&=&-3 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&y&+&z&=&6 \\ 2x&-&y&-&z&=&-3 \\ x&-&2y&+&3z&=&6 \end{array}\right.[/latex]
  • [latex]\text{tricky:} \left\{ \begin{array}{rrrrrrr} x&+&y&-&z&=&0 \\ x&+&2y&-&4z&=&0 \\ 2x&+&y&+&z&=&0 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&y&+&z&=&2 \\ 2x&-&y&+&3z&=&9 \\ &&y&-&z&=&-3 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} 6x&-&y&-&2z&=&-1 \\ 4x&&&+&z&=&3 \\ -2x&+&3y&&&=&5 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} &&y&+&z&=&5 \\ 2x&-&3y&+&z&=&-1 \\ x&&&-&z&=&-2 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} 3x&+&4y&-&z&=&11 \\ &&y&+&2z&=&-4 \\ -2x&+&y&&&=&-6 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&6y&+&3z&=&30 \\ 2x&&&+&2z&=&4 \\ &&-2y&+&z&=&-6 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&-&y&+&2z&=&0 \\ x&+&2y&&&=&1 \\ 2x&&&+&z&=&4 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&y&+&z&=&4 \\ &&-y&-&z&=&-4 \\ x&-&2y&&&=&0 \end{array}\right.[/latex]
  • [latex]\left\{ \begin{array}{rrrrrrr} x&+&y&-&z&=&2 \\ &&2y&-&4z&=&-4 \\ 2x&&&+&z&=&6 \end{array}\right.[/latex]

Answer Key 5.4

Intermediate Algebra by Terrance Berg is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License , except where otherwise noted.

Share This Book

how to solve a problem with three variables

SOLVING WORD PROBLEMS WITH THREE VARIABLES

Problem 1 :

Vani, her father and her grand father have an average age of 53. One-half of her grand father’s age plus one-third of her father’s age plus one fourth of Vani’s age is 65. Four years ago if Vani’s grandfather was four times as old as Vani then how old are they all now ?

Let x, y and z be the ages of Vani, her father, her grand father respectively.

Given : Average age of them is 53.

Then, we have

(x + y + z) / 3  =  53

Multiply each side by 3. 

  x + y + z  =  159 -----(1)

Given :  One-half of her grand father’s age plus one-third of her father’s age plus one fourth of Vani’s age is 65. 

(1/2)z + (1/3)y + (1/4)x  =  65

(x/4) + (y/3) + (z/2)  =  65

L.C.M of (2, 3, 2) is 12. So, multiply each side by 12.

3x + 4y + 6z  =  65(12)

3x + 4y + 6z  =  780 -----(2)

Given : Four years ago, Vani’s grandfather was four times as old as Vani.

z - 4  =  4(x - 4)

  z - 4  =  4x - 16

4x - z  =  16 - 4

4x - z  =  12   -----(3)

In order to eliminate y, subtract (2) from 4 times of (1). 

4(1) - (2) :

- x + 2z  =  - 144 -----(4)

Add 2 times of (3) and (4).

2(3) + (4) : 

7x  =  168

Divide each side by 7. 

x  =  24

Substitute 24 for x in (3). 

(3)-----> 4(24) - z  =  12

96 - z  =  12

Subtract 96 from each side. 

- z  =  - 84

Multiply each side by (-1). 

z  =  84

Substitute 24 for x and 84 for y in (1). 

(1)----->    x + y + z  =  159

24 + y + 84  =  159

y + 108  =  159

Subtract 108 from each side. 

y  =  51

The values of x, y and z are 

So, Vani is 24 years old,  his father is 51 years old and and his grandfather is 84 years old.

Problem 2 :

The sum of the digits of a three-digit number is 11. If the digits are reversed, the new number is 46 more than five times the former number. If the hundreds digit plus twice the tens digit is equal to the units digit, then find the original three digit number ?

Let x, y and z be the digits in hundreds place, tens place and one place in the three digit number. 

Then, the required three digit number is 

Given : The sum of the digits 11.

x + y + z  =  11  -----(1)

Given : If the digits are reversed, the new number is 46 more than five times the former number.

zyx  =  5(xyz) + 46

100z + 10y + 1x  =  5(100x + 10y + z) + 46

Simplify. 

100z + 10y + 1x  =  500x + 50y + 5z + 46

-499x - 40y + 95z  =  46 -----(2)

Given :   If the hundreds digit plus twice the tens digit is equal to the units digit.

x + 2y  =  z 

x + 2y - z  = 0 -----(3)

In order to eliminate y in (1) and (2), subtract (2) from 40 times (1).

40(1) - (2) : 

- 459x + 135z  =  486 -----(4)

In order to eliminate y in (1) and (3), subtract (3) from 2 times (1).

2(1) - (3) : 

x + 3z  =  22 -----(5)

In order to eliminate z in (4) and (5), subtract 45 times of (5) from (4).

(4) - 45(5) : 

- 504x  =  - 504

Divide each side by -504.

x  =  1

Substitute 1 for x in (5). 

(5)-----> 1 + 3z  =  22

Subtract 1 from each side.

3z  =  21

Divide each side by 3.

z  =  7

Substitute 1 for x and 7 for z in (1). 

(1)-----> 1 + y + 7  =  11

y + 8  =  11

Subtract 8 from each side. 

y  =  3

xyz  =  137

So, the required three digit number is 137.

Problem 3 :

There are 12 pieces of five, ten and twenty dollar currencies whose total value is $105. When first 2 sorts are interchanged in their numbers its value will be increased by $20. Find the number of currencies in each sort. 

Let x, y and z be the number of pieces of five, ten, and twenty rupee currencies.

x + y + z  =  12 -----(1)

Given : The total value of the currencies is $108.

5x + 10y + 20z  =  105

Divide each side by 5. 

x + 2y + 4z  =  21 -----(2)

Given :  When first 2 sorts are interchanged in their numbers, its value will be increased by $20.

10x + 5y + 20z  =  105 + 20

10x + 5y + 20z  =  125

2x + y + 4z  =  25 -----(3)

In order to eliminate z in (1) and (2), subtract (2) from 4 times of (1).

4(1) - (2) : 

3x + 2y  =  27 -----(4)

In order to eliminate z in (2) and (3), subtract (3) from (2).

(2) - (3) : 

- x + y  =  - 4 -----(5)

In order to eliminate x in (4) and (5), add (4) and 3 times of (5). 

(4) + 3(5) : 

5y  =  15

Substitute 3 for y in (4).

(4)-----> 3x + 2(3)  =  27

3x + 6  =  27

Subtract 6 from each side. 

3x  =  21

x  =  7

Substitute 7 for x and 3 for y in (1). 

(1)-----> 7 + 3 + z  =  12

10 + z  =  12

Subtract 10 from each side. 

z  =  2

So, the number of 5 rupee note is 7,  number of ten rupee note is 3 and  number of twenty rupee note is 2.

how to solve a problem with three variables

Apart from the stuff given in this section ,  if you need any other stuff in math, please use our google custom search here.

Kindly mail your feedback to   [email protected]

We always appreciate your feedback.

© All rights reserved. onlinemath4all.com

  • Sat Math Practice
  • SAT Math Worksheets
  • PEMDAS Rule
  • BODMAS rule
  • GEMDAS Order of Operations
  • Math Calculators
  • Transformations of Functions
  • Order of rotational symmetry
  • Lines of symmetry
  • Compound Angles
  • Quantitative Aptitude Tricks
  • Trigonometric ratio table
  • Word Problems
  • Times Table Shortcuts
  • 10th CBSE solution
  • PSAT Math Preparation
  • Privacy Policy
  • Laws of Exponents

Recent Articles

RSS

Easy Way to Find Square Root of a Number

Feb 15, 24 09:19 AM

sqrt1p2.png

Percent Proportion Worksheet

Feb 14, 24 09:47 PM

tutoring.png

Continuous Compounding Formula

Feb 13, 24 10:56 PM

  • PRO Courses Guides New Tech Help Pro Expert Videos About wikiHow Pro Upgrade Sign In
  • EDIT Edit this Article
  • EXPLORE Tech Help Pro About Us Random Article Quizzes Request a New Article Community Dashboard This Or That Game Popular Categories Arts and Entertainment Artwork Books Movies Computers and Electronics Computers Phone Skills Technology Hacks Health Men's Health Mental Health Women's Health Relationships Dating Love Relationship Issues Hobbies and Crafts Crafts Drawing Games Education & Communication Communication Skills Personal Development Studying Personal Care and Style Fashion Hair Care Personal Hygiene Youth Personal Care School Stuff Dating All Categories Arts and Entertainment Finance and Business Home and Garden Relationship Quizzes Cars & Other Vehicles Food and Entertaining Personal Care and Style Sports and Fitness Computers and Electronics Health Pets and Animals Travel Education & Communication Hobbies and Crafts Philosophy and Religion Work World Family Life Holidays and Traditions Relationships Youth
  • Browse Articles
  • Learn Something New
  • Quizzes Hot
  • This Or That Game New
  • Train Your Brain
  • Explore More
  • Support wikiHow
  • About wikiHow
  • Log in / Sign up
  • Education and Communications
  • Mathematics

How to Solve Systems of Algebraic Equations Containing Two Variables

Last Updated: July 30, 2023 Fact Checked

This article was reviewed by Grace Imson, MA . Grace Imson is a math teacher with over 40 years of teaching experience. Grace is currently a math instructor at the City College of San Francisco and was previously in the Math Department at Saint Louis University. She has taught math at the elementary, middle, high school, and college levels. She has an MA in Education, specializing in Administration and Supervision from Saint Louis University. There are 8 references cited in this article, which can be found at the bottom of the page. This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources. This article has been viewed 1,047,176 times.

In a "system of equations," you are asked to solve two or more equations at the same time. When these have two different variables in them, such as x and y, or a and b, it can be tricky at first glance to see how to solve them. [1] X Research source Fortunately, once you know what to do, all you need is basic algebra skills (and sometimes some knowledge of fractions) to solve the problem. If you are a visual learner or if your teacher requires it, learn how to graph the equations as well. Graphing can be useful to "see what's going on" or to check your work, but it can be slower than the other methods, and doesn't work well for all systems of equations.

Using the Substitution Method

Step 1 Move the variables to different sides of the equation.

  • This method often uses fractions later on. You can try the elimination method below instead if you don't like fractions.

Step 2 Divide both sides of the equation to

  • 4x = 8 - 2y
  • (4x)/4 = (8/4) - (2y/4)

Step 3 Plug this back into the other equation.

  • You know that x = 2 - ½y .
  • Your second equation, that you haven't yet altered, is 5x + 3y = 9 .
  • In the second equation, replace x with "2 - ½y": 5(2 - ½y) + 3y = 9 .

Step 4 Solve for the remaining variable.

  • 5(2 - ½y) + 3y = 9
  • 10 – (5/2)y + 3y = 9
  • 10 – (5/2)y + (6/2)y = 9 (If you don't understand this step, learn how to add fractions . This is often, but not always, necessary for this method.)
  • 10 + ½y = 9

Step 5 Use the answer to solve for the other variable.

  • You know that y = -2
  • One of the original equations is 4x + 2y = 8 . (You can use either equation for this step.)
  • Plug in -2 instead of y: 4x + 2(-2) = 8 .

Step 6 Know what to do when both variables cancel out.

  • If you end up with an equation that has no variables and isn't true (for instance, 3 = 5), the problem has no solution . (If you graphed both of the equations, you'd see they were parallel and never intersect.)
  • If you end up with an equation without variables that is true (such as 3 = 3), the problem has infinite solutions . The two equations are exactly equal to each other. (If you graphed the two equations, you'd see they were the same line.)

Using the Elimination Method

Step 1 Find the variable that cancels out.

  • You have the system of equations 3x - y = 3 and -x + 2y = 4 .
  • Let's change the first equation so that the y variable will cancel out. (You can choose x instead, and you'll get the same answer in the end.)
  • The - y on the first equation needs to cancel with the + 2y in the second equation. We can make this happen by multiplying - y by 2.
  • Multiply both sides of the first equation by 2, like this: 2(3x - y)=2(3) , so 6x - 2y = 6 . Now the - 2y will cancel out with the +2y in the second equation.

Step 3 Combine the two equations.

  • Your equations are 6x - 2y = 6 and -x + 2y = 4 .
  • Combine the left sides: 6x - 2y - x + 2y = ?
  • Combine the right sides: 6x - 2y - x + 2y = 6 + 4 .

Step 4 Solve for the last variable.

  • You have 6x - 2y - x + 2y = 6 + 4 .
  • Group the x and y variables together: 6x - x - 2y + 2y = 6 + 4 .
  • Simplify: 5x = 10
  • Solve for x: (5x)/5 = 10/5 , so x = 2 .

Step 5 Solve for the other variable.

  • You know that x = 2 , and one of your original equations is 3x - y = 3 .
  • Plug in 2 instead of x: 3(2) - y = 3 .
  • Solve for y in the equation: 6 - y = 3
  • 6 - y + y = 3 + y , so 6 = 3 + y

Step 6 Know what to do when both variables cancel out.

  • If your combined equation has no variables and is not true (like 2 = 7), there is no solution that will work on both equations. (If you graph both equations, you'll see they're parallel and never cross.)
  • If your combined equation has no variables and is true (like 0 = 0), there are infinite solutions . The two equations are actually identical. (If you graph them, you'll see that they're the same line.)

Graphing the Equations

Step 1 Only use this method when told to do so.

  • The basic idea is to graph both equations, and find the point where they intersect. The x and y values at this point will give us the value of x and the value of y in the system of equations.

Step 2 Solve both equations for y.

  • Your first equation is 2x + y = 5 . Change this to y = -2x + 5 .
  • Your second equation is -3x + 6y = 0 . Change this to 6y = 3x + 0 , then simplify to y = ½x + 0 .
  • If both equations are identical , the entire line will be an "intersection". Write infinite solutions .

Step 3 Draw coordinate axes.

  • If you don't have graph paper, use a ruler to make sure the numbers are spaced precisely apart.
  • If you are using large numbers or decimals, you may need to scale your graph differently. (For example, 10, 20, 30 or 0.1, 0.2, 0.3 instead of 1, 2, 3).

Step 4 Draw the y-intercept for each line.

  • In our examples from earlier, one line ( y = -2x + 5 ) intercepts the y-axis at 5 . The other ( y = ½x + 0 ) intercepts at 0 . (These are points (0,5) and (0,0) on the graph.)
  • Use different colored pens or pencils if possible for the two lines.

Step 5 Use the slope to continue the lines.

  • In our example, the line y = -2x + 5 has a slope of -2 . At x = 1, the line moves down 2 from the point at x = 0. Draw the line segment between (0,5) and (1,3).
  • The line y = ½x + 0 has a slope of ½ . At x = 1, the line moves up ½ from the point at x=0. Draw the line segment between (0,0) and (1,½).
  • If the lines have the same slope , the lines will never intersect, so there is no answer to the system of equations. Write no solution .

Step 6 Continue plotting the lines until they intersect.

  • If the lines are moving toward each other, keep plotting points in that direction.
  • If the lines are moving away from each other, move back and plot points in the other direction, starting at x = -1.
  • If the lines are nowhere near each other, try jumping ahead and plotting more distant points, such as at x = 10.

Step 7 Find the answer at the intersection.

Practice Problems and Answers

how to solve a problem with three variables

Community Q&A

Donagan

Video . By using this service, some information may be shared with YouTube.

  • You can check your work by plugging the answers back into the original equations. If the equations end up true (for instance, 3 = 3), your answer is correct. Thanks Helpful 3 Not Helpful 1
  • In the elimination method, you will sometimes have to multiply one equation by a negative number in order to get a variable to cancel out. Thanks Helpful 1 Not Helpful 1

how to solve a problem with three variables

  • These methods cannot be used if there is a variable raised to an exponent, such as x 2 . For more information on equations of this type, look up a guide to factoring quadratics with two variables. [11] X Research source Thanks Helpful 0 Not Helpful 0

You Might Also Like

Calculate Frequency

  • ↑ https://www.mathsisfun.com/definitions/system-of-equations.html
  • ↑ https://calcworkshop.com/systems-equations/substitution-method/
  • ↑ https://www.cuemath.com/algebra/substitution-method/
  • ↑ https://tutorial.math.lamar.edu/Classes/Alg/SystemsTwoVrble.aspx
  • ↑ http://www.purplemath.com/modules/systlin2.htm
  • ↑ http://www.virtualnerd.com/algebra-2/linear-systems/graphing/solve-by-graphing/equations-solution-by-graphing
  • ↑ https://www.khanacademy.org/math/algebra/multiplying-factoring-expression/factoring-quadratics-in-two-vari/v/factoring-quadratics-with-two-variables

About This Article

Grace Imson, MA

To solve systems of algebraic equations containing two variables, start by moving the variables to different sides of the equation. Then, divide both sides of the equation by one of the variables to solve for that variable. Next, take that number and plug it into the formula to solve for the other variable. Finally, take your answer and plug it into the original equation to solve for the other variable. To learn how to solve systems of algebraic equations using the elimination method, scroll down! Did this summary help you? Yes No

  • Send fan mail to authors

Reader Success Stories

Anonymous

Jan 8, 2018

Did this article help you?

Anonymous

Jul 24, 2017

Kaurovandu Uozondo

Kaurovandu Uozondo

Apr 19, 2018

Nahid Shafreen Shareef

Nahid Shafreen Shareef

Feb 12, 2018

May 15, 2017

Am I a Narcissist or an Empath Quiz

Featured Articles

Ask Better Questions

Trending Articles

Everything You Need to Know to Rock the Corporate Goth Aesthetic

Watch Articles

Cook Fresh Cauliflower

  • Terms of Use
  • Privacy Policy
  • Do Not Sell or Share My Info
  • Not Selling Info

wikiHow Tech Help Pro:

Level up your tech skills and stay ahead of the curve

how to solve a problem with three variables

  • My Preferences
  • My Reading List
  • Study Guides
  • Linear Equations: Solutions Using Matrices with Three Variables
  • Linear Equations
  • Quiz: Linear Equations
  • Quiz: Formulas
  • Absolute Value Equations
  • Quiz: Absolute Value Equations
  • Linear Inequalities
  • Quiz: Linear Inequalities
  • Compound Inequalities
  • Quiz: Compound Inequalities
  • Absolute Value Inequalities
  • Quiz: Absolute Value Inequalities
  • Rectangular Coordinate System
  • Quiz: Rectangular Coordinate System
  • Distance Formula
  • Quiz: Distance Formula
  • Midpoint Formula
  • Quiz: Midpoint Formula
  • Slope of a Line
  • Quiz: Slope of a Line
  • Slopes of Parallel and Perpendicular Lines
  • Quiz: Slopes of Parallel and Perpendicular Lines
  • Equations of Lines
  • Quiz: Equations of Lines
  • Graphs of Linear Inequalities
  • Quiz: Graphs of Linear Inequalities
  • Linear Equations: Solutions Using Graphing with Two Variables
  • Quiz: Linear Equations: Solutions Using Graphing with Two Variables
  • Linear Equations: Solutions Using Substitution with Two Variables
  • Quiz: Linear Equations: Solutions Using Substitution with Two Variables
  • Linear Equations: Solutions Using Elimination with Two Variables
  • Quiz: Linear Equations: Solutions Using Elimination with Two Variables
  • Linear Equations: Solutions Using Matrices with Two Variables
  • Quiz: Linear Equations: Solutions Using Matrices with Two Variables
  • Linear Equations: Solutions Using Determinants with Two Variables
  • Quiz: Linear Equations: Solutions Using Determinants with Two Variables
  • Linear Inequalities: Solutions Using Graphing with Two Variables
  • Quiz: Linear Inequalities: Solutions Using Graphing with Two Variables
  • Quiz: Linear Equations: Solutions Using Elimination with Three Variables
  • Linear Equations: Solutions Using Elimination with Three Variables
  • Quiz: Linear Equations: Solutions Using Matrices with Three Variables
  • Linear Equations: Solutions Using Determinants with Three Variables
  • Quiz: Linear Equations: Solutions Using Determinants with Three Variables
  • Adding and Subtracting Polynomials
  • Quiz: Adding and Subtracting Polynomials
  • Multiplying Polynomials
  • Quiz: Multiplying Polynomials
  • Special Products of Binomials
  • Quiz: Special Products of Binomials
  • Dividing Polynomials
  • Quiz: Dividing Polynomials
  • Synthetic Division
  • Quiz: Synthetic Division
  • Greatest Common Factor
  • Quiz: Greatest Common Factor
  • Difference of Squares
  • Quiz: Difference of Squares
  • Sum or Difference of Cubes
  • Quiz: Sum or Difference of Cubes
  • Trinomials of the Form x^2 + bx + c
  • Quiz: Trinomials of the Form x^2 + bx + c
  • Trinomials of the Form ax^2 + bx + c
  • Quiz: Trinomials of the Form ax^2 + bx + c
  • Square Trinomials
  • Quiz: Square Trinomials
  • Factoring by Regrouping
  • Quiz: Factoring by Regrouping
  • Summary of Factoring Techniques
  • Solving Equations by Factoring
  • Quiz: Solving Equations by Factoring
  • Examples of Rational Expressions
  • Quiz: Examples of Rational Expressions
  • Simplifying Rational Expressions
  • Quiz: Simplifying Rational Expressions
  • Multiplying Rational Expressions
  • Quiz: Multiplying Rational Expressions
  • Dividing Rational Expressions
  • Quiz: Dividing Rational Expressions
  • Adding and Subtracting Rational Expressions
  • Quiz: Adding and Subtracting Rational Expressions
  • Complex Fractions
  • Quiz: Complex Fractions
  • Solving Rational Equations
  • Quiz: Solving Rational Equations
  • Proportion, Direct Variation, Inverse Variation, Joint Variation
  • Quiz: Proportion, Direct Variation, Inverse Variation, Joint Variation
  • Graphing Rational Functions
  • Quiz: Graphing Rational Functions
  • Basic Definitions
  • Quiz: Basic Definitions
  • Function Notation
  • Quiz: Function Notation
  • Compositions of Functions
  • Quiz: Compositions of Functions
  • Algebra of Functions
  • Quiz: Algebra of Functions
  • Inverse Functions
  • Quiz: Inverse Functions
  • Polynomial Function
  • Quiz: Polynomial Function
  • Remainder Theorem
  • Quiz: Remainder Theorem
  • Factor Theorem
  • Quiz: Factor Theorem
  • Zeros of a Function
  • Quiz: Zeros of a Function
  • Rational Zero Theorem
  • Quiz: Rational Zero Theorem
  • Graphing Polynomial Functions
  • Quiz: Graphing Polynomial Functions
  • What Are Radicals?
  • Quiz: Radicals
  • Simplifying Radicals
  • Quiz: Simplifying Radicals
  • Adding and Subtracting Radical Expressions
  • Quiz: Adding and Subtracting Radical Expressions
  • Multiplying Radical Expressions
  • Quiz: Multiplying Radical Expressions
  • Dividing Radical Expressions
  • Quiz: Dividing Radical Expressions
  • Rational Exponents
  • Quiz: Rational Exponents
  • Complex Numbers
  • Quiz: Complex Numbers
  • Quadratic Equations
  • Solving Quadratics by Factoring
  • Quiz: Solving Quadratics by Factoring
  • Solving Quadratics by the Square Root Property
  • Quiz: Solving Quadratics by the Square Root Property
  • Solving Quadratics by Completing the Square
  • Quiz: Solving Quadratics by Completing the Square
  • Solving Quadratics by the Quadratic Formula
  • Quiz: Solving Quadratics by the Quadratic Formula
  • Solving Equations in Quadratic Form
  • Quiz: Solving Equations in Quadratic Form
  • Solving Radical Equations
  • Quiz: Solving Radical Equations
  • Solving Quadratic Inequalities
  • Quiz: Solving Quadratic Inequalities
  • The Four Conic Sections
  • Quiz: The Four Conic Sections
  • Quiz: Circle
  • Quiz: Parabola
  • Quiz: Ellipse
  • Quiz: Hyperbola
  • Systems of Equations Solved Algebraically
  • Quiz: Systems of Equations Solved Algebraically
  • Systems of Equations Solved Graphically
  • Quiz: Systems of Equations Solved Graphically
  • Systems of Inequalities Solved Graphically
  • Exponential Functions
  • Quiz: Exponential Functions
  • Logarithmic Functions
  • Quiz: Logarithmic Functions
  • Properties of Logarithms
  • Quiz: Properties of Logarithms
  • Exponential and Logarithmic Equations
  • Quiz: Exponential and Logarithmic Equations
  • Definition and Examples of Sequences
  • Quiz: Definition and Examples of Sequences
  • Arithmetic Sequence
  • Quiz: Arithmetic Sequence
  • Arithmetic Series
  • Quiz: Arithmetic Series
  • Geometric Sequence
  • Quiz: Geometric Sequence
  • Geometric Series
  • Quiz: Geometric Series
  • Summation Notation
  • Quiz: Summation Notation
  • Quiz: Factorials
  • Binomial Coefficients and the Binomial Theorem
  • Quiz: Binomial Coefficients and the Binomial Theorem
  • Permutations
  • Quiz: Permutations
  • Combinations
  • Quiz: Combinations
  • General Strategy
  • Simple Interest
  • Quiz: Simple Interest
  • Compound Interest
  • Quiz: Compound Interest
  • Quiz: Mixture
  • Quiz: Motion
  • Arithmetic/Geometric Series
  • Quiz: Arithmetic/Geometric Series
  • Algebra II Quiz

Solving a system of equations by using matrices is merely an organized manner of using the elimination method.

Solve this system of equations by using matrices.

how to solve a problem with three variables

The goal is to arrive at a matrix of the following form.

how to solve a problem with three variables

To do this, you use row multiplications, row additions, or row switching, as shown in the following.

Put the equation in matrix form.

how to solve a problem with three variables

Eliminate the x ‐coefficient below row 1. 

how to solve a problem with three variables

Eliminate the y ‐coefficient below row 5. 

how to solve a problem with three variables

Equation (9) now can be solved for z . That result is substituted into equation (8), which is then solved for y . The values for z and y then are substituted into equation (7), which then is solved for x . 

how to solve a problem with three variables

The check is left to you. The solution is x = 2, y = 1, z = 3. 

Solve the following system of equations, using matrices.

how to solve a problem with three variables

Put the equations in matrix form.

how to solve a problem with three variables

Eliminate the y‐ coefficient below row 5. 

how to solve a problem with three variables

Equation (9) can be solved for z.

how to solve a problem with three variables

Previous Linear Equations: Solutions Using Elimination with Three Variables

Next Quiz: Linear Equations: Solutions Using Matrices with Three Variables

  • Online Quizzes for CliffsNotes Algebra II Quick Review, 2nd Edition

has been added to your

Reading List!

Removing #book# from your Reading List will also remove any bookmarked pages associated with this title.

Are you sure you want to remove #bookConfirmation# and any corresponding bookmarks?

  • 4.1 Solve Systems of Linear Equations with Two Variables
  • Introduction
  • 1.1 Use the Language of Algebra
  • 1.2 Integers
  • 1.3 Fractions
  • 1.4 Decimals
  • 1.5 Properties of Real Numbers
  • Key Concepts
  • Review Exercises
  • Practice Test
  • 2.1 Use a General Strategy to Solve Linear Equations
  • 2.2 Use a Problem Solving Strategy
  • 2.3 Solve a Formula for a Specific Variable
  • 2.4 Solve Mixture and Uniform Motion Applications
  • 2.5 Solve Linear Inequalities
  • 2.6 Solve Compound Inequalities
  • 2.7 Solve Absolute Value Inequalities
  • 3.1 Graph Linear Equations in Two Variables
  • 3.2 Slope of a Line
  • 3.3 Find the Equation of a Line
  • 3.4 Graph Linear Inequalities in Two Variables
  • 3.5 Relations and Functions
  • 3.6 Graphs of Functions
  • 4.2 Solve Applications with Systems of Equations
  • 4.3 Solve Mixture Applications with Systems of Equations
  • 4.4 Solve Systems of Equations with Three Variables
  • 4.5 Solve Systems of Equations Using Matrices
  • 4.6 Solve Systems of Equations Using Determinants
  • 4.7 Graphing Systems of Linear Inequalities
  • 5.1 Add and Subtract Polynomials
  • 5.2 Properties of Exponents and Scientific Notation
  • 5.3 Multiply Polynomials
  • 5.4 Dividing Polynomials
  • Introduction to Factoring
  • 6.1 Greatest Common Factor and Factor by Grouping
  • 6.2 Factor Trinomials
  • 6.3 Factor Special Products
  • 6.4 General Strategy for Factoring Polynomials
  • 6.5 Polynomial Equations
  • 7.1 Multiply and Divide Rational Expressions
  • 7.2 Add and Subtract Rational Expressions
  • 7.3 Simplify Complex Rational Expressions
  • 7.4 Solve Rational Equations
  • 7.5 Solve Applications with Rational Equations
  • 7.6 Solve Rational Inequalities
  • 8.1 Simplify Expressions with Roots
  • 8.2 Simplify Radical Expressions
  • 8.3 Simplify Rational Exponents
  • 8.4 Add, Subtract, and Multiply Radical Expressions
  • 8.5 Divide Radical Expressions
  • 8.6 Solve Radical Equations
  • 8.7 Use Radicals in Functions
  • 8.8 Use the Complex Number System
  • 9.1 Solve Quadratic Equations Using the Square Root Property
  • 9.2 Solve Quadratic Equations by Completing the Square
  • 9.3 Solve Quadratic Equations Using the Quadratic Formula
  • 9.4 Solve Equations in Quadratic Form
  • 9.5 Solve Applications of Quadratic Equations
  • 9.6 Graph Quadratic Functions Using Properties
  • 9.7 Graph Quadratic Functions Using Transformations
  • 9.8 Solve Quadratic Inequalities
  • 10.1 Finding Composite and Inverse Functions
  • 10.2 Evaluate and Graph Exponential Functions
  • 10.3 Evaluate and Graph Logarithmic Functions
  • 10.4 Use the Properties of Logarithms
  • 10.5 Solve Exponential and Logarithmic Equations
  • 11.1 Distance and Midpoint Formulas; Circles
  • 11.2 Parabolas
  • 11.3 Ellipses
  • 11.4 Hyperbolas
  • 11.5 Solve Systems of Nonlinear Equations
  • 12.1 Sequences
  • 12.2 Arithmetic Sequences
  • 12.3 Geometric Sequences and Series
  • 12.4 Binomial Theorem

Learning Objectives

By the end of this section, you will be able to:

  • Determine whether an ordered pair is a solution of a system of equations
  • Solve a system of linear equations by graphing
  • Solve a system of equations by substitution
  • Solve a system of equations by elimination
  • Choose the most convenient method to solve a system of linear equations

Be Prepared 4.1

Before you get started, take this readiness quiz.

For the equation y = 2 3 x − 4 , y = 2 3 x − 4 , ⓐ Is ( 6 , 0 ) ( 6 , 0 ) a solution? ⓑ Is ( −3 , −2 ) ( −3 , −2 ) a solution? If you missed this problem, review Example 3.2 .

Be Prepared 4.2

Find the slope and y -intercept of the line 3 x − y = 12 . 3 x − y = 12 . If you missed this problem, review Example 3.16 .

Be Prepared 4.3

Find the x- and y -intercepts of the line 2 x − 3 y = 12 . 2 x − 3 y = 12 . If you missed this problem, review Example 3.8 .

Determine Whether an Ordered Pair is a Solution of a System of Equations

In Solving Linear Equations , we learned how to solve linear equations with one variable. Now we will work with two or more linear equations grouped together, which is known as a system of linear equations .

System of Linear Equations

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

In this section, we will focus our work on systems of two linear equations in two unknowns. We will solve larger systems of equations later in this chapter.

An example of a system of two linear equations is shown below. We use a brace to show the two equations are grouped together to form a system of equations.

A linear equation in two variables, such as 2 x + y = 7 , 2 x + y = 7 , has an infinite number of solutions. Its graph is a line. Remember, every point on the line is a solution to the equation and every solution to the equation is a point on the line.

To solve a system of two linear equations, we want to find the values of the variables that are solutions to both equations. In other words, we are looking for the ordered pairs ( x , y ) ( x , y ) that make both equations true. These are called the solutions of a system of equations .

Solutions of a System of Equations

The 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 to a system of two equations, we substitute the values of the variables into each equation. If the ordered pair makes both equations true, it is a solution to the system.

Example 4.1

Determine whether the ordered pair is a solution to the system { x − y = −1 2 x − y = −5 . { x − y = −1 2 x − y = −5 .

ⓐ ( −2 , −1 ) ( −2 , −1 ) ⓑ ( −4 , −3 ) ( −4 , −3 )

Determine whether the ordered pair is a solution to the system { 3 x + y = 0 x + 2 y = −5 . { 3 x + y = 0 x + 2 y = −5 .

ⓐ ( 1 , −3 ) ( 1 , −3 ) ⓑ ( 0 , 0 ) ( 0 , 0 )

Determine whether the ordered pair is a solution to the system { x − 3 y = −8 − 3 x − y = 4 . { x − 3 y = −8 − 3 x − y = 4 .

ⓐ ( 2 , −2 ) ( 2 , −2 ) ⓑ ( −2 , 2 ) ( −2 , 2 )

Solve a System of Linear Equations by Graphing

In this section, 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.

Each time we demonstrate a new method, we will use it on the same system of linear equations. At the end of the section you’ll decide which method was the most convenient way to solve this system.

Example 4.2

How to solve a system of equations by graphing.

Solve the system by graphing { 2 x + y = 7 x − 2 y = 6 . { 2 x + y = 7 x − 2 y = 6 .

Solve the system by graphing: { x − 3 y = −3 x + y = 5 . { x − 3 y = −3 x + y = 5 .

Solve the system by graphing: { − x + y = 1 3 x + 2 y = 12 . { − x + y = 1 3 x + 2 y = 12 .

The steps to use to solve a system of linear equations by graphing are shown here.

Solve a system of linear equations by graphing.

  • Step 1. Graph the first equation.
  • Step 2. Graph the second equation on the same rectangular coordinate system.
  • Step 3. Determine whether the lines intersect, are parallel, or are the same line.
  • If the lines intersect, identify the point of intersection. 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.
  • Step 5. Check the solution in both equations.

In the next example, we’ll first re-write the equations into slope–intercept form as this will make it easy for us to quickly graph the lines.

Example 4.3

Solve the system by graphing: { 3 x + y = − 1 2 x + y = 0 . { 3 x + y = − 1 2 x + y = 0 .

We’ll solve both of these equations for y y so that we can easily graph them using their slopes and y -intercepts.

Solve the system by graphing: { − x + y = 1 2 x + y = 10 . { − x + y = 1 2 x + y = 10 .

Solve the system by graphing: { 2 x + y = 6 x + y = 1 . { 2 x + y = 6 x + y = 1 .

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 4.4

Solve the system by graphing: { y = 1 2 x − 3 x − 2 y = 4 . { y = 1 2 x − 3 x − 2 y = 4 .

Solve the system by graphing: { y = − 1 4 x + 2 x + 4 y = − 8 . { y = − 1 4 x + 2 x + 4 y = − 8 .

Solve the system by graphing: { y = 3 x − 1 6 x − 2 y = 6 . { y = 3 x − 1 6 x − 2 y = 6 .

Sometimes the equations in a system represent the same line. 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 the system.

Example 4.5

Solve the system by graphing: { y = 2 x − 3 − 6 x + 3 y = − 9 . { y = 2 x − 3 − 6 x + 3 y = − 9 .

If you write the second equation in slope-intercept form, you may recognize that the equations have the same slope and same y -intercept.

Solve the system by graphing: { y = − 3 x − 6 6 x + 2 y = − 12 . { y = − 3 x − 6 6 x + 2 y = − 12 .

Try It 4.10

Solve the system by graphing: { y = 1 2 x − 4 2 x − 4 y = 16 . { y = 1 2 x − 4 2 x − 4 y = 16 .

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.

The systems of equations in Example 4.2 and Example 4.3 each had two intersecting lines. Each system had one solution.

In Example 4.5 , the equations gave coincident lines, and so the system had infinitely many solutions.

The systems in those three examples had at least one solution. A system of equations that has at least one solution is called a consistent system.

A system with parallel lines, like Example 4.4 , has no solution. We call a system of equations like this inconsistent. It has no solution.

Consistent and Inconsistent Systems

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

An inconsistent system of equations is a system of equations with no solution.

We also categorize the equations in a system of equations by calling the equations independent or dependent . If two equations are independent, they each have their own set of solutions. Intersecting lines and parallel lines are independent.

If two equations are dependent, all the solutions of one equation are also solutions of the other equation. When we graph two dependent equations, we get coincident lines.

Let’s sum this up by looking at the graphs of the three types of systems. See below and Table 4.1 .

Example 4.6

Without graphing, determine the number of solutions and then classify the system of equations.

ⓐ { y = 3 x − 1 6 x − 2 y = 12 { y = 3 x − 1 6 x − 2 y = 12 ⓑ { 2 x + y = − 3 x − 5 y = 5 { 2 x + y = − 3 x − 5 y = 5

ⓐ We will compare the slopes and intercepts of the two lines.

A system of equations whose graphs are parallel lines has no solution and is inconsistent and independent.

ⓑ We will compare the slope and intercepts of the two lines.

A system of equations whose graphs are intersect has 1 solution and is consistent and independent.

Try It 4.11

ⓐ { y = −2 x − 4 4 x + 2 y = 9 { y = −2 x − 4 4 x + 2 y = 9 ⓑ { 3 x + 2 y = 2 2 x + y = 1 { 3 x + 2 y = 2 2 x + y = 1

Try It 4.12

ⓐ { y = 1 3 x − 5 x − 3 y = 6 { y = 1 3 x − 5 x − 3 y = 6 ⓑ { x + 4 y = 12 − x + y = 3 { x + 4 y = 12 − x + y = 3

Solving systems of linear equations by graphing is a good way to visualize the types of solutions that may result. However, there are many cases where solving a system by graphing is inconvenient or imprecise. If the graphs extend beyond the small grid with x and y both between −10 −10 and 10, graphing the lines may be cumbersome. And if the solutions to the system are not integers, it can be hard to read their values precisely from a graph.

Solve a System of Equations by Substitution

We will now solve systems of linear equations by the substitution method.

We will use the same system we used first for graphing.

We will first solve one of the equations for either x or y . We can choose either equation and solve for either variable—but we’ll try to make a choice that will keep the work easy.

Then we substitute that expression into the other equation. The result is an equation with just one variable—and we know how to solve those!

After we find the value of one variable, we will substitute that value into one of the original equations and solve for the other variable. Finally, we check our solution and make sure it makes both equations true.

Example 4.7

How to solve a system of equations by substitution.

Solve the system by substitution: { 2 x + y = 7 x − 2 y = 6 . { 2 x + y = 7 x − 2 y = 6 .

Try It 4.13

Solve the system by substitution: { − 2 x + y = −11 x + 3 y = 9 . { − 2 x + y = −11 x + 3 y = 9 .

Try It 4.14

Solve the system by substitution: { 2 x + y = −1 4 x + 3 y = 3 . { 2 x + y = −1 4 x + 3 y = 3 .

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 in Step 3 into either 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.

Be very careful with the signs in the next example.

Example 4.8

Solve the system by substitution: { 4 x + 2 y = 4 6 x − y = 8 . { 4 x + 2 y = 4 6 x − y = 8 .

We need to solve one equation for one variable. We will solve the first equation for y .

Try It 4.15

Solve the system by substitution: { x − 4 y = −4 − 3 x + 4 y = 0 . { x − 4 y = −4 − 3 x + 4 y = 0 .

Try It 4.16

Solve the system by substitution: { 4 x − y = 0 2 x − 3 y = 5 . { 4 x − y = 0 2 x − 3 y = 5 .

Solve a System of Equations by Elimination

We have solved systems of linear equations by graphing and by substitution. Graphing works well when the variable coefficients are small and the solution has integer values. Substitution works well when we can easily solve one equation for one of the variables and not have too many fractions in the resulting expression.

The third method of solving systems of linear equations is called the Elimination Method. When we solved a system by substitution, we started with two equations and two variables and reduced it to one equation with one variable. This is what we’ll do with the elimination method, too, but we’ll have a different way to get there.

The Elimination Method is based on the Addition Property of Equality. The Addition Property of Equality says that when you add the same quantity to both sides of an equation, you still have equality. We will extend the Addition Property of Equality to say that when you add equal quantities to both sides of an equation, the results are equal.

For any expressions a, b, c, and d .

To solve a system of equations by elimination, we start with both equations in standard form. Then we decide which variable will be easiest to eliminate. How do we decide? We want to have the coefficients of one variable be opposites, so that we can add the equations together and eliminate that variable.

Notice how that works when we add these two equations together:

The y ’s add to zero and we have one equation with one variable.

Let’s try another one:

This time we don’t see a variable that can be immediately eliminated if we add the equations.

But if we multiply the first equation by −2 , −2 , we will make the coefficients of x opposites. We must multiply every term on both sides of the equation by −2 . −2 .

Then rewrite the system of equations.

Now we see that the coefficients of the x terms are opposites, so x will be eliminated when we add these two equations.

Once we get an equation with just one variable, we solve it. Then we substitute that value into one of the original equations to solve for the remaining variable. And, as always, we check our answer to make sure it is a solution to both of the original equations.

Now we’ll see how to use elimination to solve the same system of equations we solved by graphing and by substitution.

Example 4.9

How to solve a system of equations by elimination.

Solve the system by elimination: { 2 x + y = 7 x − 2 y = 6 . { 2 x + y = 7 x − 2 y = 6 .

Try It 4.17

Solve the system by elimination: { 3 x + y = 5 2 x − 3 y = 7 . { 3 x + y = 5 2 x − 3 y = 7 .

Try It 4.18

Solve the system by elimination: { 4 x + y = − 5 − 2 x − 2 y = − 2 . { 4 x + y = − 5 − 2 x − 2 y = − 2 .

The steps are listed here for easy reference.

Solve a system of equations by elimination.

  • Step 1. Write both equations in standard form. If any coefficients are fractions, clear them.
  • Decide which variable you will eliminate.
  • 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.

Now we’ll do an example where we need to multiply both equations by constants in order to make the coefficients of one variable opposites.

Example 4.10

Solve the system by elimination: { 4 x − 3 y = 9 7 x + 2 y = −6 . { 4 x − 3 y = 9 7 x + 2 y = −6 .

In this example, we cannot multiply just one equation by any constant to get opposite coefficients. So we will strategically multiply both equations by different constants to get the opposites.

Try It 4.19

Solve the system by elimination: { 3 x − 4 y = − 9 5 x + 3 y = 14 . { 3 x − 4 y = − 9 5 x + 3 y = 14 .

Try It 4.20

Solve each system by elimination: { 7 x + 8 y = 4 3 x − 5 y = 27 . { 7 x + 8 y = 4 3 x − 5 y = 27 .

When the system of equations contains fractions, we will first clear the fractions by multiplying each equation by the LCD of all the fractions in the equation.

Example 4.11

Solve the system by elimination: { x + 1 2 y = 6 3 2 x + 2 3 y = 17 2 . { x + 1 2 y = 6 3 2 x + 2 3 y = 17 2 .

In this example, both equations have fractions. Our first step will be to multiply each equation by the LCD of all the fractions in the equation to clear the fractions.

Try It 4.21

Solve each system by elimination: { 1 3 x − 1 2 y = 1 3 4 x − y = 5 2 . { 1 3 x − 1 2 y = 1 3 4 x − y = 5 2 .

Try It 4.22

Solve each system by elimination: { x + 3 5 y = − 1 5 − 1 2 x − 2 3 y = 5 6 . { x + 3 5 y = − 1 5 − 1 2 x − 2 3 y = 5 6 .

When we solved the system by graphing, we saw that not all systems of linear equations have a single ordered pair as a solution. When the two equations were really the same line, there were infinitely many solutions. We called that a consistent system. When the two equations described parallel lines, there was no solution. We called that an inconsistent system.

The same is true using substitution or elimination. If the equation at the end of substitution or elimination is a true statement, we have a consistent but dependent system and the system of equations has infinitely many solutions. If the equation at the end of substitution or elimination is a false statement, we have an inconsistent system and the system of equations has no solution.

Example 4.12

Solve the system by elimination: { 3 x + 4 y = 12 y = 3 − 3 4 x . { 3 x + 4 y = 12 y = 3 − 3 4 x .

This is a true statement. The equations are consistent but dependent. Their graphs would be the same line. The system has infinitely many solutions.

After we cleared the fractions in the second equation, did you notice that the two equations were the same? That means we have coincident lines.

Try It 4.23

Solve the system by elimination: { 5 x − 3 y = 15 y = − 5 + 5 3 x . { 5 x − 3 y = 15 y = − 5 + 5 3 x .

Try It 4.24

Solve the system by elimination: { x + 2 y = 6 y = − 1 2 x + 3 . { x + 2 y = 6 y = − 1 2 x + 3 .

Choose the Most Convenient Method to Solve a System of Linear Equations

When you solve a system of linear equations in in an application, you will not be told which method to use. You will need to make that decision yourself. So you’ll want to choose the method that is easiest to do and minimizes your chance of making mistakes.

Example 4.13

For each system of linear equations, decide whether it would be more convenient to solve it by substitution or elimination. Explain your answer.

ⓐ { 3 x + 8 y = 40 7 x − 4 y = −32 { 3 x + 8 y = 40 7 x − 4 y = −32 ⓑ { 5 x + 6 y = 12 y = 2 3 x − 1 { 5 x + 6 y = 12 y = 2 3 x − 1

Since both equations are in standard form, using elimination will be most convenient.

Since one equation is already solved for y , using substitution will be most convenient.

Try It 4.25

For each system of linear equations decide whether it would be more convenient to solve it by substitution or elimination. Explain your answer.

ⓐ { 4 x − 5 y = −32 3 x + 2 y = −1 { 4 x − 5 y = −32 3 x + 2 y = −1 ⓑ { x = 2 y − 1 3 x − 5 y = −7 { x = 2 y − 1 3 x − 5 y = −7

Try It 4.26

ⓐ { y = 2 x − 1 3 x − 4 y = − 6 { y = 2 x − 1 3 x − 4 y = − 6 ⓑ { 6 x − 2 y = 12 3 x + 7 y = −13 { 6 x − 2 y = 12 3 x + 7 y = −13

Section 4.1 Exercises

Practice makes perfect.

In the following exercises, determine if the following points are solutions to the given system of equations.

{ 2 x − 6 y = 0 3 x − 4 y = 5 { 2 x − 6 y = 0 3 x − 4 y = 5

ⓐ ( 3 , 1 ) ( 3 , 1 ) ⓑ ( −3 , 4 ) ( −3 , 4 )

{ − 3 x + y = 8 − x + 2 y = −9 { − 3 x + y = 8 − x + 2 y = −9

ⓐ ( −5 , −7 ) ( −5 , −7 ) ⓑ ( −5 , 7 ) ( −5 , 7 )

{ x + y = 2 y = 3 4 x { x + y = 2 y = 3 4 x

ⓐ ( 8 7 , 6 7 ) ( 8 7 , 6 7 ) ⓑ ( 1 , 3 4 ) ( 1 , 3 4 )

{ 2 x + 3 y = 6 y = 2 3 x + 2 { 2 x + 3 y = 6 y = 2 3 x + 2 ⓐ ( −6 , 2 ) ( −6 , 2 ) ⓑ ( −3 , 4 ) ( −3 , 4 )

In the following exercises, solve the following systems of equations by graphing.

{ 3 x + y = −3 2 x + 3 y = 5 { 3 x + y = −3 2 x + 3 y = 5

{ − x + y = 2 2 x + y = −4 { − x + y = 2 2 x + y = −4

{ y = x + 2 y = −2 x + 2 { y = x + 2 y = −2 x + 2

{ y = x − 2 y = −3 x + 2 { y = x − 2 y = −3 x + 2

{ y = 3 2 x + 1 y = − 1 2 x + 5 { y = 3 2 x + 1 y = − 1 2 x + 5

{ y = 2 3 x − 2 y = − 1 3 x − 5 { y = 2 3 x − 2 y = − 1 3 x − 5

{ x + y = −4 − x + 2 y = −2 { x + y = −4 − x + 2 y = −2

{ − x + 3 y = 3 x + 3 y = 3 { − x + 3 y = 3 x + 3 y = 3

{ − 2 x + 3 y = 3 x + 3 y = 12 { − 2 x + 3 y = 3 x + 3 y = 12

{ 2 x − y = 4 2 x + 3 y = 12 { 2 x − y = 4 2 x + 3 y = 12

{ x + 3 y = −6 y = − 4 3 x + 4 { x + 3 y = −6 y = − 4 3 x + 4

{ − x + 2 y = −6 y = − 1 2 x − 1 { − x + 2 y = −6 y = − 1 2 x − 1

{ − 2 x + 4 y = 4 y = 1 2 x { − 2 x + 4 y = 4 y = 1 2 x

{ 3 x + 5 y = 10 y = − 3 5 x + 1 { 3 x + 5 y = 10 y = − 3 5 x + 1

{ 4 x − 3 y = 8 8 x − 6 y = 14 { 4 x − 3 y = 8 8 x − 6 y = 14

{ x + 3 y = 4 − 2 x − 6 y = 3 { x + 3 y = 4 − 2 x − 6 y = 3

{ x = −3 y + 4 2 x + 6 y = 8 { x = −3 y + 4 2 x + 6 y = 8

{ 4 x = 3 y + 7 8 x − 6 y = 14 { 4 x = 3 y + 7 8 x − 6 y = 14

{ 2 x + y = 6 − 8 x − 4 y = −24 { 2 x + y = 6 − 8 x − 4 y = −24

{ 5 x + 2 y = 7 − 10 x − 4 y = −14 { 5 x + 2 y = 7 − 10 x − 4 y = −14

{ y = 2 3 x + 1 − 2 x + 3 y = 5 { y = 2 3 x + 1 − 2 x + 3 y = 5

{ y = 3 2 x + 1 2 x − 3 y = 7 { y = 3 2 x + 1 2 x − 3 y = 7

{ 5 x + 3 y = 4 2 x − 3 y = 5 { 5 x + 3 y = 4 2 x − 3 y = 5

{ y = − 1 2 x + 5 x + 2 y = 10 { y = − 1 2 x + 5 x + 2 y = 10

{ 5 x − 2 y = 10 y = 5 2 x − 5 { 5 x − 2 y = 10 y = 5 2 x − 5

In the following exercises, solve the systems of equations by substitution.

{ 2 x + y = −4 3 x − 2 y = −6 { 2 x + y = −4 3 x − 2 y = −6

{ 2 x + y = −2 3 x − y = 7 { 2 x + y = −2 3 x − y = 7

{ x − 2 y = −5 2 x − 3 y = −4 { x − 2 y = −5 2 x − 3 y = −4

{ x − 3 y = −9 2 x + 5 y = 4 { x − 3 y = −9 2 x + 5 y = 4

{ 5 x − 2 y = −6 y = 3 x + 3 { 5 x − 2 y = −6 y = 3 x + 3

{ − 2 x + 2 y = 6 y = −3 x + 1 { − 2 x + 2 y = 6 y = −3 x + 1

{ 2 x + 5 y = 1 y = 1 3 x − 2 { 2 x + 5 y = 1 y = 1 3 x − 2

{ 3 x + 4 y = 1 y = − 2 5 x + 2 { 3 x + 4 y = 1 y = − 2 5 x + 2

{ 2 x + y = 5 x − 2 y = −15 { 2 x + y = 5 x − 2 y = −15

{ 4 x + y = 10 x − 2 y = −20 { 4 x + y = 10 x − 2 y = −20

{ y = −2 x − 1 y = − 1 3 x + 4 { y = −2 x − 1 y = − 1 3 x + 4

{ y = x − 6 y = − 3 2 x + 4 { y = x − 6 y = − 3 2 x + 4

{ x = 2 y 4 x − 8 y = 0 { x = 2 y 4 x − 8 y = 0

{ 2 x − 16 y = 8 − x − 8 y = −4 { 2 x − 16 y = 8 − x − 8 y = −4

{ y = 7 8 x + 4 − 7 x + 8 y = 6 { y = 7 8 x + 4 − 7 x + 8 y = 6

{ y = − 2 3 x + 5 2 x + 3 y = 11 { y = − 2 3 x + 5 2 x + 3 y = 11

In the following exercises, solve the systems of equations by elimination.

{ 5 x + 2 y = 2 − 3 x − y = 0 { 5 x + 2 y = 2 − 3 x − y = 0

{ 6 x − 5 y = −1 2 x + y = 13 { 6 x − 5 y = −1 2 x + y = 13

{ 2 x − 5 y = 7 3 x − y = 17 { 2 x − 5 y = 7 3 x − y = 17

{ 5 x − 3 y = −1 2 x − y = 2 { 5 x − 3 y = −1 2 x − y = 2

{ 3 x − 5 y = −9 5 x + 2 y = 16 { 3 x − 5 y = −9 5 x + 2 y = 16

{ 4 x − 3 y = 3 2 x + 5 y = −31 { 4 x − 3 y = 3 2 x + 5 y = −31

{ 3 x + 8 y = −3 2 x + 5 y = −3 { 3 x + 8 y = −3 2 x + 5 y = −3

{ 11 x + 9 y = −5 7 x + 5 y = −1 { 11 x + 9 y = −5 7 x + 5 y = −1

{ 3 x + 8 y = 67 5 x + 3 y = 60 { 3 x + 8 y = 67 5 x + 3 y = 60

{ 2 x + 9 y = −4 3 x + 13 y = −7 { 2 x + 9 y = −4 3 x + 13 y = −7

{ 1 3 x − y = −3 x + 5 2 y = 2 { 1 3 x − y = −3 x + 5 2 y = 2

{ x + 1 2 y = 3 2 1 5 x − 1 5 y = 3 { x + 1 2 y = 3 2 1 5 x − 1 5 y = 3

{ x + 1 3 y = −1 1 3 x + 1 2 y = 1 { x + 1 3 y = −1 1 3 x + 1 2 y = 1

{ 1 3 x − y = −3 2 3 x + 5 2 y = 3 { 1 3 x − y = −3 2 3 x + 5 2 y = 3

{ 2 x + y = 3 6 x + 3 y = 9 { 2 x + y = 3 6 x + 3 y = 9

{ x − 4 y = −1 − 3 x + 12 y = 3 { x − 4 y = −1 − 3 x + 12 y = 3

{ − 3 x − y = 8 6 x + 2 y = −16 { − 3 x − y = 8 6 x + 2 y = −16

{ 4 x + 3 y = 2 20 x + 15 y = 10 { 4 x + 3 y = 2 20 x + 15 y = 10

In the following exercises, decide whether it would be more convenient to solve the system of equations by substitution or elimination.

ⓐ { 8 x − 15 y = −32 6 x + 3 y = −5 { 8 x − 15 y = −32 6 x + 3 y = −5 ⓑ { x = 4 y − 3 4 x − 2 y = −6 { x = 4 y − 3 4 x − 2 y = −6

ⓐ { y = 7 x − 5 3 x − 2 y = 16 { y = 7 x − 5 3 x − 2 y = 16 ⓑ { 12 x − 5 y = −42 3 x + 7 y = −15 { 12 x − 5 y = −42 3 x + 7 y = −15

ⓐ { y = 4 x + 9 5 x − 2 y = −21 { y = 4 x + 9 5 x − 2 y = −21 ⓑ { 9 x − 4 y = 24 3 x + 5 y = −14 { 9 x − 4 y = 24 3 x + 5 y = −14

ⓐ { 14 x − 15 y = −30 7 x + 2 y = 10 { 14 x − 15 y = −30 7 x + 2 y = 10 ⓑ { x = 9 y − 11 2 x − 7 y = −27 { x = 9 y − 11 2 x − 7 y = −27

Writing Exercises

In a system of linear equations, the two equations have the same intercepts. Describe the possible solutions to the system.

Solve the system of equations by substitution and explain all your steps in words: { 3 x + y = 12 x = y − 8 . { 3 x + y = 12 x = y − 8 .

Solve the system of equations by elimination and explain all your steps in words: { 5 x + 4 y = 10 2 x = 3 y + 27 . { 5 x + 4 y = 10 2 x = 3 y + 27 .

Solve the system of equations { x + y = 10 x − y = 6 { x + y = 10 x − y = 6

ⓐ by graphing ⓑ by substitution ⓒ Which method do you prefer? Why?

After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

If most of your checks were:

…confidently. Congratulations! You have achieved the objectives in this section. Reflect on the study skills you used so that you can continue to use them. What did you do to become confident of your ability to do these things? Be specific.

…with some help. This must be addressed quickly because topics you do not master become potholes in your road to success. In math every topic builds upon previous work. It is important to make sure you have a strong foundation before you move on. Whom can you ask for help?Your fellow classmates and instructor are good resources. Is there a place on campus where math tutors are available? Can your study skills be improved?

…no - I don’t get it! This is a warning sign and you must not ignore it. You should get help right away or you will quickly be overwhelmed. See your instructor as soon as you can to discuss your situation. Together you can come up with a plan to get you the help you need.

As an Amazon Associate we earn from qualifying purchases.

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax.

Access for free at https://openstax.org/books/intermediate-algebra-2e/pages/1-introduction
  • Authors: Lynn Marecek, Andrea Honeycutt Mathis
  • Publisher/website: OpenStax
  • Book title: Intermediate Algebra 2e
  • Publication date: May 6, 2020
  • Location: Houston, Texas
  • Book URL: https://openstax.org/books/intermediate-algebra-2e/pages/1-introduction
  • Section URL: https://openstax.org/books/intermediate-algebra-2e/pages/4-1-solve-systems-of-linear-equations-with-two-variables

© Jan 23, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.

Help Center Help Center

  • Help Center
  • Trial Software
  • Product Updates
  • Documentation

Equations and systems solver

Description

S = solve( eqn , var ) solves the equation eqn for the variable var . If you do not specify var , the symvar function determines the variable to solve for. For example, solve(x + 1 == 2, x) solves the equation x  + 1 = 2 for x .

S = solve( eqn , var , Name,Value ) uses additional options specified by one or more Name,Value pair arguments.

Y = solve( eqns , vars ) solves the system of equations eqns for the variables vars and returns a structure that contains the solutions. If you do not specify vars , solve uses symvar to find the variables to solve for. In this case, the number of variables that symvar finds is equal to the number of equations eqns .

Y = solve( eqns , vars , Name,Value ) uses additional options specified by one or more Name,Value pair arguments.

[ y1,...,yN ] = solve( eqns , vars ) solves the system of equations eqns for the variables vars . The solutions are assigned to the variables y1,...,yN . If you do not specify the variables, solve uses symvar to find the variables to solve for. In this case, the number of variables that symvar finds is equal to the number of output arguments N .

[ y1,...,yN ] = solve( eqns , vars , Name,Value ) uses additional options specified by one or more Name,Value pair arguments.

[ y1,...,yN , parameters , conditions ] = solve( eqns , vars ,' ReturnConditions ',true) returns the additional arguments parameters and conditions that specify the parameters in the solution and the conditions on the solution.

collapse all

Solve Quadratic Equation

Solve the quadratic equation without specifying a variable to solve for. solve chooses x to return the solution.

( - b + b 2 - 4   a   c 2   a - b - b 2 - 4   a   c 2   a )

Specify the variable to solve for and solve the quadratic equation for a .

- c + b   x x 2

Solve Polynomial and Return Real Solutions

Solve a fifth-degree polynomial. It has five solutions.

( 5 - σ 1 - 5 4 - 5   2   5 - 5   i 4 - σ 1 - 5 4 + 5   2   5 - 5   i 4 σ 1 - 5 4 - 5   2   5 + 5   i 4 σ 1 - 5 4 + 5   2   5 + 5   i 4 ) where    σ 1 = 5   5 4

Return only real solutions by setting 'Real' option to true . The only real solutions of this equation is 5 .

Numerically Solve Equations

When solve cannot symbolically solve an equation, it tries to find a numeric solution using vpasolve . The vpasolve function returns the first solution found.

Try solving the following equation. solve returns a numeric solution because it cannot find a symbolic solution.

Plot the left and the right sides of the equation. Observe that the equation also has a positive solution.

Figure contains an axes object. The axes object contains 2 objects of type functionline.

Find the other solution by directly calling the numeric solver vpasolve and specifying the interval.

Solve Multivariate Equations and Assign Outputs to Structure

When solving for multiple variables, it can be more convenient to store the outputs in a structure array than in separate variables. The solve function returns a structure when you specify a single output argument and multiple outputs exist.

Solve a system of equations to return the solutions in a structure array.

Access the solutions by addressing the elements of the structure.

Using a structure array allows you to conveniently substitute solutions into other expressions.

Use the subs function to substitute the solutions S into other expressions.

If solve returns an empty object, then no solutions exist.

Solve Inequalities

The solve function can solve inequalities and return solutions that satisfy the inequalities. Solve the following inequalities.

x 2 + y 2 + x y < 1

Set 'ReturnConditions' to true to return any parameters in the solution and conditions on the solution.

u - 3   v 2 2 - v 2

The parameters u and v do not exist in MATLAB® workspace and must be accessed using S.parameters .

Check if the values u = 7/2 and v = 1/2 satisfy the condition using subs and isAlways .

isAlways returns logical 1 ( true ) indicating that these values satisfy the condition. Substitute these parameter values into S.x and S.y to find a solution for x and y .

Solve Multivariate Equations and Assign Outputs to Variables

Solve the system of equations.

2 u 2 + v 2 = 0

When solving for more than one variable, the order in which you specify the variables defines the order in which the solver returns the solutions. Assign the solutions to variables solv and solu by specifying the variables explicitly. The solver returns an array of solutions for each variable.

( - 2 3 - 2   i 3 - 2 3 + 2   i 3 )

( 1 3 - 2   i 3 1 3 + 2   i 3 )

Entries with the same index form the pair of solutions.

( - 2 3 - 2   i 3 1 3 - 2   i 3 - 2 3 + 2   i 3 1 3 + 2   i 3 )

Use Parameters and Conditions to Refine Solution

Return the complete solution of an equation with parameters and conditions of the solution by specifying 'ReturnConditions' as true .

Solve the equation sin ( x ) = 0 . Provide two additional output variables for output arguments parameters and conditions .

The solution π k contains the parameter k , where k must be an integer. The variable k does not exist in the MATLAB® workspace and must be accessed using parameters .

Restrict the solution to 0 < x < 2 π . Find a valid value of k for this restriction. Assume the condition, conditions , and use solve to find k . Substitute the value of k found into the solution for x .

Alternatively, determine the solution for x by choosing a value of k . Check if the value chosen satisfies the condition on k using isAlways .

Check if k = 4 satisfies the condition on k .

isAlways returns logical 1( true ), meaning that 4 is a valid value for k . Substitute k with 4 to obtain a solution for x . Use vpa to obtain a numeric approximation.

Shorten Result with Simplification Rules

Solve the equation exp ( log ( x ) log ( 3 x ) ) = 4 .

By default, solve does not apply simplifications that are not valid for all values of x . In this case, the solver does not assume that x is a positive real number, so it does not apply the logarithmic identity log ( 3 x ) = log ( 3 ) + log ( x ) . As a result, solve cannot solve the equation symbolically.

Set 'IgnoreAnalyticConstraints' to true to apply simplification rules that might allow solve to find a solution. For details, see Algorithms .

( 3   e - log ( 256 ) + log ( 3 ) 2 2 3 3   e log ( 256 ) + log ( 3 ) 2 2 3 )

solve applies simplifications that allow the solver to find a solution. The mathematical rules applied when performing simplifications are not always valid in general. In this example, the solver applies logarithmic identities with the assumption that x is a positive real number. Therefore, the solutions found in this mode should be verified.

Ignore Assumptions on Variables

The sym and syms functions let you set assumptions for symbolic variables.

Assume that the variable x is positive.

When you solve an equation for a variable under assumptions, the solver only returns solutions consistent with the assumptions. Solve this equation for x .

Allow solutions that do not satisfy the assumptions by setting 'IgnoreProperties' to true .

For further computations, clear the assumption that you set on the variable x by recreating it using syms .

Solve Polynomial Equations of High Degree

When you solve a polynomial equation, the solver might use root to return the solutions. Solve a third-degree polynomial.

( root ( z 3 + z 2 + a , z , 1 ) root ( z 3 + z 2 + a , z , 2 ) root ( z 3 + z 2 + a , z , 3 ) )

Try to get an explicit solution for such equations by calling the solver with 'MaxDegree' . The option specifies the maximum degree of polynomials for which the solver tries to return explicit solutions. The default value is 2 . Increasing this value, you can get explicit solutions for higher order polynomials.

Solve the same equations for explicit solutions by increasing the value of 'MaxDegree' to 3 .

( 1 9   σ 1 + σ 1 - 1 3 - 1 18   σ 1 - σ 1 2 - 1 3 - 3   1 9   σ 1 - σ 1   i 2 - 1 18   σ 1 - σ 1 2 - 1 3 + 3   1 9   σ 1 - σ 1   i 2 ) where    σ 1 = a 2 + 1 27 2 - 1 729 - a 2 - 1 27 1 / 3

Return One Solution

Solve the equation sin ( x ) + cos ( 2 x ) = 1 .

Instead of returning an infinite set of periodic solutions, the solver picks three solutions that it considers to be the most practical.

( 0 π 6 5   π 6 )

Choose only one solution by setting 'PrincipalValue' to true .

Input Arguments

Eqn — equation to solve symbolic expression | symbolic equation.

Equation to solve, specified as a symbolic expression or symbolic equation. The relation operator == defines symbolic equations. If eqn is a symbolic expression (without the right side), the solver assumes that the right side is 0, and solves the equation eqn == 0 .

var — Variable for which you solve equation symbolic variable

Variable for which you solve an equation, specified as a symbolic variable. By default, solve uses the variable determined by symvar .

eqns — System of equations symbolic expressions | symbolic equations

System of equations, specified as symbolic expressions or symbolic equations. If any elements of eqns are symbolic expressions (without the right side), solve equates the element to 0 .

vars — Variables for which you solve an equation or system of equations symbolic vector | symbolic matrix

Variables for which you solve an equation or system of equations, specified as a symbolic vector or symbolic matrix. By default, solve uses the variables determined by symvar .

The order in which you specify these variables defines the order in which the solver returns the solutions.

Name-Value Arguments

Example: 'Real',true specifies that the solver returns real solutions.

Real — Flag for returning only real solutions false (default) | true

Flag for returning only real solutions, specified as the comma-separated pair consisting of 'Real' and one of these values.

See Solve Polynomial and Return Real Solutions .

ReturnConditions — Flag for returning parameters and conditions false (default) | true

Flag for returning parameters in solution and conditions under which the solution is true, specified as the comma-separated pair consisting of 'ReturnConditions' and one of these values.

See Solve Inequalities .

Example: [v1, v2, params, conditions] = solve(sin(x) +y == 0,y^2 == 3,'ReturnConditions',true) returns the parameters in params and conditions in conditions .

IgnoreAnalyticConstraints — Simplification rules applied to expressions and equations false (default) | true

Simplification rules applied to expressions and equations, specified as the comma-separated pair consisting of 'IgnoreAnalyticConstraints' and one of these values.

See Shorten Result with Simplification Rules .

IgnoreProperties — Flag for returning solutions inconsistent with properties of variables false (default) | true

Flag for returning solutions inconsistent with the properties of variables, specified as the comma-separated pair consisting of 'IgnoreProperties' and one of these values.

See Ignore Assumptions on Variables .

MaxDegree — Maximum degree of polynomial equations for which solver uses explicit formulas 2 (default) | positive integer smaller than 5

Maximum degree of polynomial equations for which solver uses explicit formulas, specified as a positive integer smaller than 5. The solver does not use explicit formulas that involve radicals when solving polynomial equations of a degree larger than the specified value.

See Solve Polynomial Equations of High Degree .

PrincipalValue — Flag for returning one solution false (default) | true

Flag for returning one solution, specified as the comma-separated pair consisting of 'PrincipalValue' and one of these values.

See Return One Solution .

Output Arguments

S — solutions of equation symbolic array.

Solutions of an equation, returned as a symbolic array. The size of a symbolic array corresponds to the number of the solutions.

Y — Solutions of system of equations structure

Solutions of a system of equations, returned as a structure. The number of fields in the structure correspond to the number of independent variables in a system. If 'ReturnConditions' is set to true , the solve function returns two additional fields that contain the parameters in the solution, and the conditions under which the solution is true.

y1,...,yN — Solutions of system of equations symbolic variables

Solutions of a system of equations, returned as symbolic variables. The number of output variables or symbolic arrays must be equal to the number of independent variables in a system. If you explicitly specify independent variables vars , then the solver uses the same order to return the solutions. If you do not specify vars , the toolbox sorts independent variables alphabetically, and then assigns the solutions for these variables to the output variables.

parameters — Parameters in solution vector of generated parameters

Parameters in a solution, returned as a vector of generated parameters. This output argument is only returned if ReturnConditions is true . If a single output argument is provided, parameters is returned as a field of a structure. If multiple output arguments are provided, parameters is returned as the second-to-last output argument. The generated parameters do not appear in the MATLAB ® workspace. They must be accessed using parameters .

Example: [solx, params, conditions] = solve(sin(x) == 0, 'ReturnConditions', true) returns the parameter k in the argument params .

conditions — Conditions under which solutions are valid vector of symbolic expressions

Conditions under which solutions are valid, returned as a vector of symbolic expressions. This output argument is only returned if ReturnConditions is true . If a single output argument is provided, conditions is returned as a field of a structure. If multiple output arguments are provided, conditions is returned as the last output argument.

Example: [solx, params, conditions] = solve(sin(x) == 0, 'ReturnConditions', true) returns the condition in(k, 'integer') in conditions . The solution in solx is valid only under this condition.

If solve cannot find a solution and ReturnConditions is false , the solve function internally calls the numeric solver vpasolve that tries to find a numeric solution. For polynomial equations and systems without symbolic parameters, the numeric solver returns all solutions. For nonpolynomial equations and systems without symbolic parameters, the numeric solver returns only one solution (if a solution exists).

If solve cannot find a solution and ReturnConditions is true , solve returns an empty solution with a warning. If no solutions exist, solve returns an empty solution without a warning.

If the solution contains parameters and ReturnConditions is true , solve returns the parameters in the solution and the conditions under which the solutions are true. If ReturnConditions is false , the solve function either chooses values of the parameters and returns the corresponding results, or returns parameterized solutions without choosing particular values. In the latter case, solve also issues a warning indicating the values of parameters in the returned solutions.

If a parameter does not appear in any condition, it means the parameter can take any complex value.

The output of solve can contain parameters from the input equations in addition to parameters introduced by solve .

Parameters introduced by solve do not appear in the MATLAB workspace. They must be accessed using the output argument that contains them. Alternatively, to use the parameters in the MATLAB workspace use syms to initialize the parameter. For example, if the parameter is k , use syms k .

The variable names parameters and conditions are not allowed as inputs to solve .

To solve differential equations, use the dsolve function.

When solving a system of equations, always assign the result to output arguments. Output arguments let you access the values of the solutions of a system.

MaxDegree only accepts positive integers smaller than 5 because, in general, there are no explicit expressions for the roots of polynomials of degrees higher than 4.

The output variables y1,...,yN do not specify the variables for which solve solves equations or systems. If y1,...,yN are the variables that appear in eqns , then there is no guarantee that solve(eqns) will assign the solutions to y1,...,yN using the correct order. Thus, when you run [b,a] = solve(eqns) , you might get the solutions for a assigned to b and vice versa.

To ensure the order of the returned solutions, specify the variables vars . For example, the call [b,a] = solve(eqns,b,a) assigns the solutions for a to a and the solutions for b to b .

When you use IgnoreAnalyticConstraints , the solver applies some of these rules to the expressions on both sides of an equation.

log( a ) + log( b ) = log( a · b ) for all values of a and b . In particular, the following equality is valid for all values of a , b , and c :

   ( a · b ) c  =  a c · b c .

log( a b ) =  b ·log( a ) for all values of a and b . In particular, the following equality is valid for all values of a , b , and c :

   ( a b ) c  =  a b · c .

If f and g are standard mathematical functions and f ( g ( x )) =  x for all small positive numbers, f ( g ( x )) =  x is assumed to be valid for all complex values x . In particular:

log( e x ) =  x

asin(sin( x )) =  x , acos(cos( x )) =  x , atan(tan( x )) =  x

asinh(sinh( x )) =  x , acosh(cosh( x )) =  x , atanh(tanh( x )) =  x

W k ( x · e x ) =  x for all branch indices k of the Lambert W function.

The solver can multiply both sides of an equation by any expression except 0 .

The solutions of polynomial equations must be complete.

Version History

R2018a: support for character vectors has been removed.

Support for character vector or string inputs has been removed. Instead, use syms to declare variables and replace inputs such as solve('2*x == 1','x') with solve(2*x == 1,x) .

  • dsolve | isolate | linsolve | root | subs | symvar | vpasolve

Live Editor Tasks

  • Solve Symbolic Equation
  • Solve Algebraic Equations
  • Solve System of Algebraic Equations
  • Solve System of Linear Equations
  • Solve Algebraic Equation Using Live Editor Task
  • Select Numeric or Symbolic Solver
  • Troubleshoot Equation Solutions from solve Function

External Websites

  • Beam Bending and Deflection ( MathWorks Teaching Resources)

Open Example

You have a modified version of this example. Do you want to open this example with your edits?

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

  • América Latina (Español)
  • Canada (English)
  • United States (English)
  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)

Contact your local office

Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons
  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Mathematics LibreTexts

4.1: Solve Systems of Linear Equations with Two Variables

  • Last updated
  • Save as PDF
  • Page ID 30838

Learning Objectives

By the end of this section, you will be able to:

  • Determine whether an ordered pair is a solution of a system of equations
  • Solve a system of linear equations by graphing
  • Solve a system of equations by substitution
  • Solve a system of equations by elimination
  • Choose the most convenient method to solve a system of linear equations

Before you get started, take this readiness quiz.

  • For the equation \(y=\frac{2}{3}x−4\), ⓐ Is \((6,0)\) a solution? ⓑ Is \((−3,−2)\) a solution? If you missed this problem, review [link] .
  • Find the slope and y -intercept of the line \(3x−y=12\). If you missed this problem, review [link] .
  • Find the x- and y -intercepts of the line \(2x−3y=12\). If you missed this problem, review [link] .

Determine Whether an Ordered Pair is a Solution of a System of Equations

In Solving Linear Equations , we learned how to solve linear equations with one variable. Now we will work with two or more linear equations grouped together, which is known as a system of linear equations .

SYSTEM OF LINEAR EQUATIONS

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

In this section, we will focus our work on systems of two linear equations in two unknowns. We will solve larger systems of equations later in this chapter.

An example of a system of two linear equations is shown below. We use a brace to show the two equations are grouped together to form a system of equations.

\[ \left\{ \begin{aligned} 2x+y & = 7 \\ x−2y & = 6 \end{aligned} \right. \nonumber \]

A linear equation in two variables, such as \(2x+y=7\), has an infinite number of solutions. Its graph is a line. Remember, every point on the line is a solution to the equation and every solution to the equation is a point on the line.

To solve a system of two linear equations, we want to find the values of the variables that are solutions to both equations. In other words, we are looking for the ordered pairs \((x,y)\) that make both equations true. These are called the solutions of a system of equations .

SolutionS OF A SYSTEM OF EQUATIONS

The 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)\).

To determine if an ordered pair is a solution to a system of two equations, we substitute the values of the variables into each equation. If the ordered pair makes both equations true, it is a solution to the system.

Example \(\PageIndex{1}\)

Determine whether the ordered pair is a solution to the system \(\left \{ \begin{array} {l} x−y = −1 \\ 2x−y = −5 \end{array} \right. \).

ⓐ \((−2,−1)\) ⓑ \((−4,−3)\)

The equations are x minus y equals minus 1 and 2 x minus y equals minus 5. We substitute x equal to minus 2 and y equal to minus 1 into both equations. So, x minus y equals minus 1 becomes minus 2 minus open parentheses minus 1 close parentheses equal to or not equal to minus 1. Simplifying, we get minus 1 equals minus 1 which is correct. The equation 2 x minus y equals minus 5 becomes 2 times minus 2 minus open parentheses minus 1 close parentheses equal to or not equal to minus 5. Simplifying, we get 5 not equal to minus 5. Hence, the ordered pair minus 2, minus 1 does not make both equations true. So, it is not a solution.

Example \(\PageIndex{2}\)

Determine whether the ordered pair is a solution to the system \(\left \{ \begin{array} 3x+y = 0 \\ x+2y = −5 \end{array} \right. \).

ⓐ \((1,−3)\) ⓑ \((0,0)\)

ⓐ yes ⓑ no

Example \(\PageIndex{3}\)

Determine whether the ordered pair is a solution to the system \(\left \{ \begin{array} x−3y = −8 \\ −3x−y = 4 \end{array} \right. \).

ⓐ \((2,−2)\) ⓑ \((−2,2)\)

ⓐ no ⓑ yes

Solve a System of Linear Equations by Graphing

In this section, 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.

Figure shows three graphs. In the first, the lines intersect at point 3, minus 1. The intersecting lines have one point in common. There is one solution to the system. In the second graph, the lines are parallel. Parallel lines have no points in common. There is no solution to the system. The third graph has only one line. Here, both equations give the same line. Because we have only one line, there are infinite many solutions.

Each time we demonstrate a new method, we will use it on the same system of linear equations. At the end of the section you’ll decide which method was the most convenient way to solve this system.

Example \(\PageIndex{4}\): How to Solve a System of Equations by Graphing

Solve the system by graphing \( \left\{ \begin{array} {l} 2x+y = 7 \\ x−2y = 6 \end{array} \right. \).

Step 1 is to graph the first equation. To graph the first line, write the equation in slope intercept form. So, 2 x plus y equals 7 becomes y equal to minus 2 x plus 7. Here, m is minus 2 and b is 7. So the graph will be a line with slope equal to minus 2 and y intercept equal to 7.

Example \(\PageIndex{5}\)

Solve the system by graphing: \( \left\{ \begin{array} {l} x−3y = −3 \\ x+y = 5 \end{array} \right. \).

Example \(\PageIndex{6}\)

Solve the system by graphing: \( \left\{ \begin{array} {l} −x+y = 1 \\ 3x+2y = 12 \end{array} \right.\)

The steps to use to solve a system of linear equations by graphing are shown here.

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.
  • If the lines intersect, identify the point of intersection. 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.
  • Check the solution in both equations.

In the next example, we’ll first re-write the equations into slope–intercept form as this will make it easy for us to quickly graph the lines.

Example \(\PageIndex{7}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} 3x+y = −1 \\ 2x+y = 0 \end{array}\right.\)

We’ll solve both of these equations for \(y\) so that we can easily graph them using their slopes and \(y\)-intercepts.

Example \(\PageIndex{8}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} −x+y = 1 \\2x+y = 10 \end{array}\right. \).

Example \(\PageIndex{9}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} 2x+y = 6 \\x+y = 1 \end{array}\right. \).

\((5,−4)\)

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 \(\PageIndex{10}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} y = \tfrac{1}{2}x-3 \\ x-2y = 4 \end{array}\right. \).

Example \(\PageIndex{11}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} y = -\tfrac{1}{4}x+2 \\ x+4y = 4 \end{array}\right. \).

no solution

Example \(\PageIndex{12}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} y = 3x-1 \\ 6x-2y = 6 \end{array}\right. \).

Sometimes the equations in a system represent the same line. 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 the system.

Example \(\PageIndex{13}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} y = 2x-3 \\ -6x+3y = 9 \end{array}\right. \).

If you write the second equation in slope-intercept form, you may recognize that the equations have the same slope and same y -intercept.

Example \(\PageIndex{14}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} y = -3x-6 \\ 6x+2y = -12 \end{array}\right. \).

infinitely many solutions

Example \(\PageIndex{15}\)

Solve the system by graphing: \(\left\{ \begin{array} {l} y = \tfrac{1}{2}x-4 \\ 2x-4y = 16 \end{array}\right. \).

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.

The systems of equations in Example and Example each had two intersecting lines. Each system had one solution.

In Example , the equations gave coincident lines, and so the system had infinitely many solutions.

The systems in those three examples had at least one solution. A system of equations that has at least one solution is called a consistent system.

A system with parallel lines, like Example , has no solution. We call a system of equations like this inconsistent. It has no solution.

CONSISTENT AND INCONSISTENT SYSTEMS

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

An inconsistent system of equations is a system of equations with no solution.

We also categorize the equations in a system of equations by calling the equations independent or dependent . If two equations are independent, they each have their own set of solutions. Intersecting lines and parallel lines are independent.

If two equations are dependent, all the solutions of one equation are also solutions of the other equation. When we graph two dependent equations, we get coincident lines.

Let’s sum this up by looking at the graphs of the three types of systems. See below and Table .

The figure shows three graphs. The first one has two intersecting line. The second one has two parallel lines. The third one has only one line. This is labeled coincident.

Example \(\PageIndex{16}\)

Without graphing, determine the number of solutions and then classify the system of equations.

ⓐ \( \left\{ \begin{array} {l} y = 3x−1 \\ 6x−2y = 12 \end{array}\right. \) ⓑ \( \left\{ \begin{array} {l} 2x+y=−3 \\ x−5y=5 \end{array} \right. \)

ⓐ We will compare the slopes and intercepts of the two lines.

\(\begin{array} {lll} {} &{} &{ \left\{ \begin{array} {l} {y=3x-1} \\ {6x−2y=12} \end{array} \right. } \\ {} &{} &{y = 3x-1} \\ {\text{The first equation is already in slope-intercept form.}} &{} &{} \\ {\text{Write the second equation in slope-intercept form.}} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{6x-2y=12} \\ {} &{} &{-2y=-6x+12} \\ {} &{} &{\frac{-2y}{-2}=\frac{-6x+12}{-2}} \\ {} &{} &{y=3x-6} \\ {} &{y=3x-1} &{y=3x-6} \\ {} &{m=3} &{m=3} \\ {} &{b=-1} &{b=-6} \\ {\text{Find the slope and intercept of each line.}} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{\text{Since the slopes are the same andy-intercepts are}} &{} \\ {} &{\text{different, the lines are parallel.}} &{} \\ \end{array}\)

ⓑ We will compare the slope and intercepts of the two lines.

\(\begin{array} {lll} {} &{} &{} \\ {} &{ \left\{ \begin{array} {l} 2x+y=-3 \\ x-5y=5 \\ \end{array} \right. } &{} \\ {\text{Write both equations in slope–intercept form.}} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{2x+y=-3} &{x-5y=5} \\ {} &{y=-2x-3} &{-5y=-x+5} \\ {} &{} &{\frac{-5y}{-5}=\frac{-x+5}{-5}} \\ {} &{} &{y=\frac{1}{5}-1} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {} &{} &{} \\ {\text{Find the slope and intercept of each line.}} &{} &{} \\ {} &{} &{} \\ {} &{y=-2x-3} &{y=\frac{1}{5}-1} \\ {} &{m=-2} &{m=\frac{1}{5}} \\ {} &{b=-3} &{b=-1} \\ {} &{} &{} \\ {} &{\text{Since the slopes are different, the lines intersect.}} &{} \\ \end{array}\)

A system of equations whose graphs are intersect has 1 solution and is consistent and independent.

Example \(\PageIndex{17}\)

ⓐ \(\left\{ \begin{array} {l} y=−2x−4 \\ 4x+2y=9 \end{array} \right. \) ⓑ \(\left\{ \begin{array} {l} 3x+2y=2 \\ 2x+y=1 \end{array} \right. \)

ⓐ no solution, inconsistent, independent ⓑ one solution, consistent, independent

Example \(\PageIndex{18}\)

ⓐ \(\left\{ \begin{array} {l} y=\frac{1}{3}x−5 \\ x−3y=6 \end{array} \right. \) ⓑ \(\left\{ \begin{array} {l} x+4y=12 \\ −x+y=3 \end{array} \right. \)

Solving systems of linear equations by graphing is a good way to visualize the types of solutions that may result. However, there are many cases where solving a system by graphing is inconvenient or imprecise. If the graphs extend beyond the small grid with x and y both between \(−10\) and 10, graphing the lines may be cumbersome. And if the solutions to the system are not integers, it can be hard to read their values precisely from a graph.

Solve a System of Equations by Substitution

We will now solve systems of linear equations by the substitution method.

We will use the same system we used first for graphing.

\[ \left\{ \begin{array} {l} 2x+y=7 \\ x−2y=6 \end{array} \right. \nonumber \]

We will first solve one of the equations for either x or y . We can choose either equation and solve for either variable—but we’ll try to make a choice that will keep the work easy.

Then we substitute that expression into the other equation. The result is an equation with just one variable—and we know how to solve those!

After we find the value of one variable, we will substitute that value into one of the original equations and solve for the other variable. Finally, we check our solution and make sure it makes both equations true.

Example \(\PageIndex{19}\): How to Solve a System of Equations by Substitution

Solve the system by substitution: \( \left\{ \begin{array} {l} 2x+y=7 \\ x−2y=6 \end{array} \right. \)

The equations are 2 x plus y equals 7 and x minus 2y equals 6. Step 1 is to solve one of the equations for either variable. We’ll solve the first equation for y. We get y equals 7 minus 2 x.

Example \(\PageIndex{20}\)

Solve the system by substitution: \( \left\{ \begin{array} {l} −2x+y=−11 \\ x+3y=9 \end{array} \right. \)

Example \(\PageIndex{21}\)

Solve the system by substitution: \( \left\{ \begin{array} {l} 2x+y=−1 \\ 4x+3y=3 \end{array} \right. \)

\((−3,5)\)

SOLVE A SYSTEM OF EQUATIONS BY SUBSTITUTION.

  • Solve one of the equations for either variable.
  • Substitute the expression from Step 1 into the other equation.
  • Solve the resulting equation.
  • Substitute the solution in Step 3 into either of the original equations to find the other variable.
  • Write the solution as an ordered pair.
  • Check that the ordered pair is a solution to both original equations.

Be very careful with the signs in the next example.

Example \(\PageIndex{22}\)

Solve the system by substitution: \( \left\{ \begin{array} {l} 4x+2y=4 \\ 6x−y=8 \end{array} \right. \)

We need to solve one equation for one variable. We will solve the first equation for y .

Example \(\PageIndex{23}\)

Solve the system by substitution: \( \left\{ \begin{array} {l} x−4y=−4 \\ −3x+4y=0 \end{array} \right. \)

Example \(\PageIndex{24}\)

Solve the system by substitution: \( \left\{ \begin{array} {l} 4x−y=0 \\ 2x−3y=5 \end{array} \right. \)

\((−12,−2)\)

Solve a System of Equations by Elimination

We have solved systems of linear equations by graphing and by substitution. Graphing works well when the variable coefficients are small and the solution has integer values. Substitution works well when we can easily solve one equation for one of the variables and not have too many fractions in the resulting expression.

The third method of solving systems of linear equations is called the Elimination Method. When we solved a system by substitution, we started with two equations and two variables and reduced it to one equation with one variable. This is what we’ll do with the elimination method, too, but we’ll have a different way to get there.

The Elimination Method is based on the Addition Property of Equality. The Addition Property of Equality says that when you add the same quantity to both sides of an equation, you still have equality. We will extend the Addition Property of Equality to say that when you add equal quantities to both sides of an equation, the results are equal.

For any expressions a, b, c, and d .

\[\begin{array} {ll} {\text{if}} &{a=b} \\ {\text{and}} &{c=d} \\ {\text{then}} &{a+c=b+d.} \\ \nonumber \end{array}\]

To solve a system of equations by elimination, we start with both equations in standard form. Then we decide which variable will be easiest to eliminate. How do we decide? We want to have the coefficients of one variable be opposites, so that we can add the equations together and eliminate that variable.

Notice how that works when we add these two equations together:

\[\left\{ \begin{array} {l} 3x+y=5 \\ \underline{2x−y=0} \end{array} \right. \nonumber\]

\[5x=5 \nonumber\]

The y ’s add to zero and we have one equation with one variable.

Let’s try another one:

\[ \left\{ \begin{array} x+4y=2 \\ 2x+5y=−2 \end{array} \right. \nonumber\]

This time we don’t see a variable that can be immediately eliminated if we add the equations.

But if we multiply the first equation by \(−2\), we will make the coefficients of x opposites. We must multiply every term on both sides of the equation by \(−2\).

Minus 2 open parentheses x plus 4y close parentheses is minus 2 times 2. And, 2 x plus 5y is minus 2.

Then rewrite the system of equations.

Minus 2 x minus 8y is minus 4 and 2 x plus 5y is minus 2.

Now we see that the coefficients of the x terms are opposites, so x will be eliminated when we add these two equations.

Minus 2 x minus 8y is minus 4 and 2 x plus 5y is minus 2. Adding these, we get minus 3y equals minus 6.

Once we get an equation with just one variable, we solve it. Then we substitute that value into one of the original equations to solve for the remaining variable. And, as always, we check our answer to make sure it is a solution to both of the original equations.

Now we’ll see how to use elimination to solve the same system of equations we solved by graphing and by substitution.

Exercise \(\PageIndex{25}\): How to Solve a System of Equations by Elimination

Solve the system by elimination: \(\left\{ \begin{array} {l} 2x+y=7 \\ x−2y=6 \end{array} \right. \)

The equations are 2 x plus y equals 7 and x minus 2y equals 6. Step 1 is to write both equations in standard form. Both equations are in standard form, Ax plus By equals C. If any coefficients are fractions, clear them. There are no fractions.

Exercise \(\PageIndex{26}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} 3x+y=5 \\ 2x−3y=7 \end{array} \right.\)

\((2,−1)\)

Exercise \(\PageIndex{27}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} 4x+y=−5 \\ −2x−2y=−2 \end{array} \right.\)

\((−2,3)\)

The steps are listed here for easy reference.

SOLVE A SYSTEM OF EQUATIONS BY ELIMINATION.

  • Write both equations in standard form. If any coefficients are fractions, clear them.
  • Decide which variable you will eliminate.
  • Multiply one or both equations so that the coefficients of that variable are opposites.
  • Add the equations resulting from Step 2 to eliminate one variable.
  • Solve for the remaining variable.
  • Substitute the solution from Step 4 into one of the original equations. Then solve for the other variable.

Now we’ll do an example where we need to multiply both equations by constants in order to make the coefficients of one variable opposites.

Exercise \(\PageIndex{28}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} 4x−3y=9 \\ 7x+2y=−6 \end{array} \right. \)

In this example, we cannot multiply just one equation by any constant to get opposite coefficients. So we will strategically multiply both equations by different constants to get the opposites.

Exercise \(\PageIndex{29}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} 3x−4y=−9 \\ 5x+3y=14\end{array} \right. \)

Exercise \(\PageIndex{30}\)

Solve each system by elimination: \(\left\{ \begin{array} {l} 7x+8y=4 \\ 3x−5y=27 \end{array} \right.\)

\((4,−3)\)

When the system of equations contains fractions, we will first clear the fractions by multiplying each equation by the LCD of all the fractions in the equation.

Exercise \(\PageIndex{31}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} x+\tfrac{1}{2}y=6 \\ \tfrac{3}{2}x+\tfrac{2}{3}y=\tfrac{17}{2} \end{array} \right.\)

In this example, both equations have fractions. Our first step will be to multiply each equation by the LCD of all the fractions in the equation to clear the fractions.

Exercise \(\PageIndex{32}\)

Solve each system by elimination: \(\left\{ \begin{array} {l} \tfrac{1}{3}x−\tfrac{1}{2}y=1 \\ \tfrac{3}{4}x−y=\tfrac{5}{2} \end{array} \right.\)

Exercise \(\PageIndex{33}\)

Solve each system by elimination: \(\left\{ \begin{array} {l} x+\tfrac{3}{5}y=−\tfrac{1}{5} \\ −\tfrac{1}{2}x−\tfrac{2}{3}y=\tfrac{5}{6} \end{array} \right.\)

\((1,−2)\)

When we solved the system by graphing, we saw that not all systems of linear equations have a single ordered pair as a solution. When the two equations were really the same line, there were infinitely many solutions. We called that a consistent system. When the two equations described parallel lines, there was no solution. We called that an inconsistent system.

The same is true using substitution or elimination. If the equation at the end of substitution or elimination is a true statement, we have a consistent but dependent system and the system of equations has infinitely many solutions. If the equation at the end of substitution or elimination is a false statement, we have an inconsistent system and the system of equations has no solution.

Exercise \(\PageIndex{34}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} 3x+4y=12 \\ y=3−\tfrac{3}{4}x \end{array} \right. \)

\(\begin{array} {ll} {} &{ \left\{ \begin{array} {l} 3x+4y=12 \\ y=3−\frac{3}{4}x \end{array} \right.} \\ {} &{} \\ {\text{Write the second equation in standard form.}} &{\left\{ \begin{array} {l} 3x+4y=12 \\ \frac{3}{4}x+y=3 \end{array} \right. } \\ {} &{} \\ {\text{Clear the fractions by multiplying the } \\ \text{second equation by 4.}} &{\left\{ \begin{array} {l} 3x+4y=12 \\ 4(\frac{3}{4}x+y)=4(3) \end{array} \right. } \\ {} &{} \\ {\text{Simplify.}} &{\left\{ \begin{array} {l} 3x+4y=12 \\ 3x+4y=12 \end{array} \right. } \\ {} &{} \\ {\text{To eliminate a variable, we multiply the} \\ \text{second equation by−1. Simplify and add.}} &{\begin{array} {l} {\left\{ \begin{array} {l} 3x+4y=12 \\ \underline{-3x-4y=-12 } \end{array} \right.} \\ {\hspace{16mm} 0=0} \end{array}} \\ \end{array} \)

This is a true statement. The equations are consistent but dependent. Their graphs would be the same line. The system has infinitely many solutions.

After we cleared the fractions in the second equation, did you notice that the two equations were the same? That means we have coincident lines.

Exercise \(\PageIndex{35}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} 5x−3y=15 \\ 5y=−5+\tfrac{5}{3}x \end{array} \right. \)

Exercise \(\PageIndex{36}\)

Solve the system by elimination: \(\left\{ \begin{array} {l} x+2y=6 \\ y=−\tfrac{1}{2}x+3\end{array} \right. \)

Choose the Most Convenient Method to Solve a System of Linear Equations

When you solve a system of linear equations in in an application, you will not be told which method to use. You will need to make that decision yourself. So you’ll want to choose the method that is easiest to do and minimizes your chance of making mistakes.

\[ \textbf{Choose the Most Convenient Method to Solve a System of Linear Equations} \\ \begin{array} {lll} {\underline{\textbf{Graphing}}} &{\underline{\textbf{Substitution}}} &{\underline{\textbf{Elimination}}} \\ {\text{Use when you need a}} &{\text{Use when one equation is}} &{\text{Use when the equations a}} \\ {\text{picture of the situation.}} &{\text{already solved or can be}} &{\text{rein standard form.}} \\ {\text{}} &{\text{easily solved for one}} &{\text{}} \\ {\text{}} &{\text{variable.}} &{\text{}} \\ \end{array} \nonumber \]

Example \(\PageIndex{37}\)

For each system of linear equations, decide whether it would be more convenient to solve it by substitution or elimination. Explain your answer.

ⓐ \(\left\{ \begin{array} {l} 3x+8y=40 \\ 7x−4y=−32 \end{array} \right.\) ⓑ \(\left\{ \begin{array} {l} 5x+6y=12 \\ y=\tfrac{2}{3}x−1 \end{array} \right.\)

\[\left\{ \begin{array} {l} 3x+8y=40 \\ 7x−4y=−32 \end{array} \right.\nonumber\]

Since both equations are in standard form, using elimination will be most convenient.

\[\left\{ \begin{array} {l} 5x+6y=12 \\ y=\tfrac{2}{3}x−1 \end{array} \right.\nonumber \]

Since one equation is already solved for y , using substitution will be most convenient.

Example \(\PageIndex{38}\)

For each system of linear equations decide whether it would be more convenient to solve it by substitution or elimination. Explain your answer.

ⓐ \(\left\{ \begin{array} {l} 4x−5y=−32 \\ 3x+2y=−1 \end{array} \right.\) ⓑ \(\left\{ \begin{array} {l} x=2y−1 \\ 3x−5y=−7 \end{array} \right.\)

ⓐ Since both equations are in standard form, using elimination will be most convenient. ⓑ Since one equation is already solved for x , using substitution will be most convenient.

Example \(\PageIndex{39}\)

ⓐ \(\left\{ \begin{array} {l} y=2x−1 \\ 3x−4y=−6 \end{array} \right.\) ⓑ \(\left\{ \begin{array} {l} 6x−2y=12 \\ 3x+7y=−13 \end{array} \right.\)

ⓐ Since one equation is already solved for y , using substitution will be most convenient. ⓑ Since both equations are in standard form, using elimination will be most convenient.

Key Concepts

  • Identify the solution to the system. If the lines intersect, identify the point of intersection. 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.
  • Make the coefficients of one variable opposites. Decide which variable you will eliminate. Multiply one or both equations so that the coefficients of that variable are opposites.
  • Check that the ordered pair is a solution to both original equations. \[ \textbf{Choose the Most Convenient Method to Solve a System of Linear Equations} \\ \begin{array} {lll} {\underline{\textbf{Graphing}}} &{\underline{\textbf{Substitution}}} &{\underline{\textbf{Elimination}}} \\ {\text{}} &{\text{Use when one equation is}} &{\text{}} \\ {\text{Use when you need a}} &{\text{already solved or can be}} &{\text{Use when the equations a}} \\ {\text{picture of the situation.}} &{\text{easily solved for one}} &{\text{rein standard form.}} \\ {\text{}} &{\text{variable.}} &{\text{}} \\ \end{array} \nonumber \]

IMAGES

  1. How to Solve a System of Three Equations with Three Variables

    how to solve a problem with three variables

  2. How to solve linear equations with three variable using casio fx 100 MS

    how to solve a problem with three variables

  3. How to Solve a System of Equations with Three Variables using Cramer's Rule

    how to solve a problem with three variables

  4. How to solve systems of 3 variable equations using elimination, step by

    how to solve a problem with three variables

  5. #51. How to Solve a System of Three Equations with Three Variables

    how to solve a problem with three variables

  6. How to solve systems of 3 variable equations using elimination, step by

    how to solve a problem with three variables

VIDEO

  1. solve three equations having three variable using // Casio fx-991MS # scientific calculator shorts

  2. Lecture 3.5

  3. Solve equations with variables on both sides

  4. Solve linear equations of three variables by Matrix method By Sonu Sir is live

  5. Class 10

  6. A good Olympiad problem

COMMENTS

  1. 7.3: Systems of Linear Equations with Three Variables

    Example \(\PageIndex{3}\): Solving a Real-World Problem Using a System of Three Equations in Three Variables. In the problem posed at the beginning of the section, John invested his inheritance of \($12,000\) in three different funds: part in a money-market fund paying \(3\%\) interest annually; part in municipal bonds paying \(4\%\) annually ...

  2. How to solve systems of 3 variable equations

    Problem 1 Use elimination to solve the following system of three variable equations. A) 4x + 2y - 2z = 10 B) 2x + 8y + 4z = 32 C) 30x + 12y - 4z = 24 Solution Problem 2 Use elimination to solve the following system of three variable equations. A) x - y + z = -1 B) x + y + z = 3 C) 4x + 2y + z = 8 Prev Next

  3. 4.4 Solve Systems of Equations with Three Variables

    To solve a system of three linear equations, we want to find the values of the variables that are solutions to all three equations.

  4. Linear Equations: Solutions Using Elimination with Three Variables

    Write all the equations in standard form cleared of decimals or fractions. Choose a variable to eliminate; then choose any two of the three equations and eliminate the chosen variable. Select a different set of two equations and eliminate the same variable as in Step 2. Solve the two equations from steps 2 and 3 for the two variables they contain.

  5. 3.4: Solving Linear Systems with Three Variables

    3: Solving Linear Systems 3.4: Solving Linear Systems with Three Variables Expand/collapse global location 3.4: Solving Linear Systems with Three Variables

  6. Solving linear systems with 3 variables (video)

    Here are the steps. 1. Turn on your graphing calculator. (It needs to be a TI-83 or better) 2. click 2nd, matrix. 3. click to the right until you are on the setting, EDIT. 4. select 1 of the matrices. It will bring up the matrix size on the top row and the matrix at the bottom. 5. change the matrix size to 3 x 4.

  7. Intro to linear systems with 3 variables (video)

    Systems with three variables © 2024 Khan Academy Terms of use Privacy Policy Cookie Notice Intro to linear systems with 3 variables Google Classroom About Transcript Sal discusses how we approach solving systems of three variables algebraically, and how we visualize it graphically.

  8. 4.5: Solve Systems of Equations with Three Variables

    Linear Equation in Three Variables: A linear equation with three variables, where a, b, c, and d are real numbers and a, b,and c are not all 0, is of the form \[ax+by+cz=d\nonumber \] Every solution to the equation is an ordered triple, \((x,y,z)\) that makes the equation true. How to solve a system of linear equations with three variables.

  9. 3-variable linear system word problem (video)

    Systems with three variables © 2024 Khan Academy Terms of use Privacy Policy Cookie Notice 3-variable linear system word problem Google Classroom About Transcript Sal solves a word problem about the angles of a given triangle by modeling the given information as a system of three equations and variables.

  10. 5.4 Solving for Three Variables

    In solving systems of equations with three variables, use the strategies that are used to solve systems of two equations. One recommended method is to eliminate one variable at the onset, thus turning the set of three equations with three unknowns into two equations with two unknowns.

  11. Solving Systems of Equations With 3 Variables & Word Problems

    The Organic Chemistry Tutor 7.39M subscribers Join Subscribe Subscribed 6.8K 587K views 6 years ago New Algebra Playlist This algebra video tutorial explains how to solve system of equations...

  12. Algebra

    Example 1 Solve the following system of equations. x−2y +3z =7 2x+y+z =4 −3x+2y −2z =−10 x − 2 y + 3 z = 7 2 x + y + z = 4 − 3 x + 2 y − 2 z = − 10 Show Solution That was a fair amount of work and in this case there was even less work than normal because in each case we only had to multiply a single equation to allow us to eliminate variables.

  13. Cramer's Rule With Three Variables

    Example 3: Solve the system with three variables by Cramer's Rule. This problem is much easier than the first two examples because of the presence of zero entries in the [latex]x[/latex], [latex]y[/latex], and constant columns.

  14. Solving Word Problems with Three Variables

    Solution : Let x, y and z be the ages of Vani, her father, her grand father respectively. Given : Average age of them is 53. Then, we have (x + y + z) / 3 = 53 Multiply each side by 3. x + y + z = 159 ----- (1) Given : One-half of her grand father's age plus one-third of her father's age plus one fourth of Vani's age is 65. Then, we have

  15. How to Solve Systems of Algebraic Equations Containing Two Variables

    1 Move the variables to different sides of the equation. This "substitution" method starts out by "solving for x" (or any other variable) in one of the equations. [2] For example, let's say your equations are 4x + 2y = 8 and 5x + 3y = 9. Start by looking just at the first equation.

  16. Linear Equations: Solutions Using Matrices with Three Variables

    The solution is x = 2, y = 1, z = 3. Example 2. Solve the following system of equations, using matrices. Put the equations in matrix form. Eliminate the x ‐coefficient below row 1. Eliminate the y‐ coefficient below row 5. Reinserting the variables, the system is now: Equation (9) can be solved for z.

  17. Solutions to 2-variable equations (video)

    The solution of an equation with one variable is a number. How does the solution of a 2-variable equation look like? Well, it is an ordered pair. Learn more about it and how to test solutions to 2-variable equations. Questions Tips & Thanks Want to join the conversation? Sort by: Top Voted yahy8760 6 years ago serious question .

  18. 4.1 Solve Systems of Linear Equations with Two Variables

    Try It 4.6. Solve the system by graphing: { 2 x + y = 6 x + y = 1. 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.

  19. 4.5: Solve Systems of Equations with Three Variables

    Step 3. Repeat Step 2 using two other equations and eliminate the same variable as in Step 2. Step 4. The two new equations form a system of two equations with two variables. Solve this system. Step 5. Use the values of the two variables found in Step 4 to find the third variable. Step 6.

  20. Equations and systems solver

    For a call with a single output variable, solve returns a structure with the fields parameters and conditions. For multiple output variables, solve assigns the parameters and conditions to the last two output variables. This behavior means that the number of output variables must be equal to the number of variables to solve for plus two.

  21. 3.4: Solve Systems of Equations with Three Variables

    Linear Equation in Three Variables: A linear equation with three variables, where a, b, c, and d are real numbers and a, b,and c are not all 0, is of the form \[ax+by+cz=d\nonumber \] Every solution to the equation is an ordered triple, \((x,y,z)\) that makes the equation true. How to solve a system of linear equations with three variables.

  22. 13.8: Optimization of Functions of Several Variables

    Problem-Solving Strategy: Using the second partials Test for Functions of Two Variables. Let \(z=f(x,y)\) be a function of two variables for which the first- and second-order partial derivatives are continuous on some disk containing the point \((x_0,y_0).\) To apply the second partials test to find local extrema, use the following steps:

  23. 4.1: Solve Systems of Linear Equations with Two Variables

    An example of a system of two linear equations is shown below. We use a brace to show the two equations are grouped together to form a system of equations. {2x + y x − 2y = 7 = 6 { 2 x + y = 7 x − 2 y = 6. A linear equation in two variables, such as 2x + y = 7 2 x + y = 7, has an infinite number of solutions.