Learning

open
close

Systems of Linear Equations: Three Variables

June 23, 2024 | by Bloom Code Studio

Learning Objectives

In this section, you will:

  • Solve systems of three equations in three variables.
  • Identify inconsistent systems of equations containing three variables.
  • Express the solution of a system of dependent equations containing three variables.

Figure 1 (credit: β€œElembis,” Wikimedia Commons)

Jordi received an inheritance of $12,000 that he divided into three parts and invested in three ways: in a money-market fund paying 3% annual interest; in municipal bonds paying 4% annual interest; and in mutual funds paying 7% annual interest. Jordi invested $4,000 more in mutual funds than in municipal bonds. He earned $670 in interest the first year. How much did Jordi invest in each type of fund?

Understanding the correct approach to setting up problems such as this one makes finding a solution a matter of following a pattern. We will solve this and similar problems involving three equations and three variables in this section. Doing so uses similar techniques as those used to solve systems of two equations in two variables. However, finding solutions to systems of three equations requires a bit more organization and a touch of visualization.

Solving Systems of Three Equations in Three Variables

In order to solve systems of equations in three variables, known as three-by-three systems, the primary tool we will be using is called Gaussian elimination, named after the prolific German mathematician Karl Friedrich Gauss. While there is no definitive order in which operations are to be performed, there are specific guidelines as to what type of moves can be made. We may number the equations to keep track of the steps we apply. The goal is to eliminate one variable at a time to achieve upper triangular form, the ideal form for a three-by-three system because it allows for straightforward back-substitution to find a solution (x,y,z),(π‘₯,𝑦,𝑧), which we call an ordered triple. A system in upper triangular form looks like the following:

Ax+By+Cz=DEy+Fz=GHz=K𝐴π‘₯+𝐡𝑦+𝐢𝑧=𝐷𝐸𝑦+𝐹𝑧=𝐺𝐻𝑧=𝐾

The third equation can be solved for z,𝑧, and then we back-substitute to find y𝑦 and x.π‘₯. To write the system in upper triangular form, we can perform the following operations:

  1. Interchange the order of any two equations.
  2. Multiply both sides of an equation by a nonzero constant.
  3. Add a nonzero multiple of one equation to another equation.

The solution set to a three-by-three system is an ordered triple {(x,y,z)}.{(π‘₯,𝑦,𝑧)}. Graphically, the ordered triple defines the point that is the intersection of three planes in space. You can visualize such an intersection by imagining any corner in a rectangular room. A corner is defined by three planes: two adjoining walls and the floor (or ceiling). Any point where two walls and the floor meet represents the intersection of three planes.

NUMBER OF POSSIBLE SOLUTIONS

Figure 2Β andΒ Figure 3Β illustrate possible solution scenarios for three-by-three systems.

  • Systems that have a single solution are those which, after elimination, result in aΒ solution setΒ consisting of an ordered tripleΒ {(x,y,z)}.{(π‘₯,𝑦,𝑧)}.Β Graphically, the ordered triple defines a point that is the intersection of three planes in space.
  • Systems that have an infinite number of solutions are those which, after elimination, result in an expression that is always true, such asΒ 0=0.0=0.Β Graphically, an infinite number of solutions represents a line or coincident plane that serves as the intersection of three planes in space.
  • Systems that have no solution are those that, after elimination, result in a statement that is a contradiction, such asΒ 3=0.3=0.Β Graphically, a system with no solution is represented by three planes with no point in common.

Figure 2 (a)Three planes intersect at a single point, representing a three-by-three system with a single solution. (b) Three planes intersect in a line, representing a three-by-three system with infinite solutions.

Figure 3 All three figures represent three-by-three systems with no solution. (a) The three planes intersect with each other, but not at a common point. (b) Two of the planes are parallel and intersect with the third plane, but not with each other. (c) All three planes are parallel, so there is no point of intersection.

EXAMPLE 1

Determining Whether an Ordered Triple Is a Solution to a System

Determine whether the ordered triple (3,βˆ’2,1)(3,βˆ’2,1) is a solution to the system.

x+y+z=26xβˆ’4y+5z=315x+2y+2z=13π‘₯+𝑦+𝑧=26π‘₯βˆ’4𝑦+5𝑧=315π‘₯+2𝑦+2𝑧=13

Solution

We will check each equation by substituting in the values of the ordered triple for x,y,π‘₯,𝑦, and z.𝑧.

x+y+z=2(3)+(βˆ’2)+(1)=2True6xβˆ’4y+5z=316(3)βˆ’4(βˆ’2)+5(1)=3118+8+5=31True5x+2y+2z=135(3)+2(βˆ’2)+2(1)=1315βˆ’4+2=13Trueπ‘₯+𝑦+𝑧=2(3)+(βˆ’2)+(1)=2True6π‘₯βˆ’4𝑦+5𝑧=316(3)βˆ’4(βˆ’2)+5(1)=3118+8+5=31True5π‘₯+2𝑦+2𝑧=135(3)+2(βˆ’2)+2(1)=1315βˆ’4+2=13True

The ordered triple (3,βˆ’2,1)(3,βˆ’2,1) is indeed a solution to the system.

HOW TO

Given a linear system of three equations, solve for three unknowns.

  1. Pick any pair of equations and solve for one variable.
  2. Pick another pair of equations and solve for the same variable.
  3. You have created a system of two equations in two unknowns. Solve the resulting two-by-two system.
  4. Back-substitute known variables into any one of the original equations and solve for the missing variable.

EXAMPLE 2

Solving a System of Three Equations in Three Variables by Elimination

Find a solution to the following system:

xβˆ’2y+3z=9βˆ’x+3yβˆ’z=βˆ’62xβˆ’5y+5z=17(1)(2)(3)π‘₯βˆ’2𝑦+3𝑧=9(1)βˆ’π‘₯+3π‘¦βˆ’π‘§=βˆ’6(2)2π‘₯βˆ’5𝑦+5𝑧=17(3)

Solution

There will always be several choices as to where to begin, but the most obvious first step here is to eliminate xπ‘₯ by adding equations (1) and (2).

xβˆ’2y+3z=9βˆ’x+3yβˆ’z=βˆ’6(1)(2)y+2z=3(4)π‘₯βˆ’2𝑦+3𝑧=9(1)βˆ’π‘₯+3π‘¦βˆ’π‘§=βˆ’6(2)𝑦+2𝑧=3(4)

The second step is multiplying equation (1) by βˆ’2βˆ’2 and adding the result to equation (3). These two steps will eliminate the variable x.π‘₯.

βˆ’2x+4yβˆ’6z=βˆ’182xβˆ’5y+5z=17(1)multipliedbyβˆ’2(3)____________________________________βˆ’yβˆ’z=βˆ’1(5)βˆ’2π‘₯+4π‘¦βˆ’6𝑧=βˆ’18(1)multipliedbyβˆ’22π‘₯βˆ’5𝑦+5𝑧=17(3)____________________________________βˆ’π‘¦βˆ’π‘§=βˆ’1(5)

In equations (4) and (5), we have created a new two-by-two system. We can solve for z𝑧 by adding the two equations.

y+2z=3(4)βˆ’yβˆ’z=βˆ’1(5)z=2(6)𝑦+2𝑧=3(4)βˆ’π‘¦βˆ’π‘§=βˆ’1(5)𝑧=2(6)

Choosing one equation from each new system, we obtain the upper triangular form:

xβˆ’2y+3z=9y+2z=3z=2(1)(4)(6)π‘₯βˆ’2𝑦+3𝑧=9(1)𝑦+2𝑧=3(4)𝑧=2(6)

Next, we back-substitute z=2𝑧=2 into equation (4) and solve for y.𝑦.

y+2(2)=3y+4=3y=βˆ’1𝑦+2(2)=3𝑦+4=3𝑦=βˆ’1

Finally, we can back-substitute z=2𝑧=2 and y=βˆ’1𝑦=βˆ’1 into equation (1). This will yield the solution for x.π‘₯.

xβˆ’2(βˆ’1)+3(2)=9x+2+6=9x=1π‘₯βˆ’2(βˆ’1)+3(2)=9π‘₯+2+6=9π‘₯=1

The solution is the ordered tripleΒ (1,βˆ’1,2).(1,βˆ’1,2).Β SeeΒ Figure 4.

Figure 4

EXAMPLE 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, Jordi 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; and the rest in mutual funds paying 7% annually. Jordi invested $4,000 more in mutual funds than he invested in municipal bonds. The total interest earned in one year was $670. How much did he invest in each type of fund?

Solution

To solve this problem, we use all of the information given and set up three equations. First, we assign a variable to each of the three investment amounts:

x=amount invested in money-market fundy=amount invested in municipal bondsz=amount invested in mutual fundsπ‘₯=amount invested in money-market fund𝑦=amount invested in municipal bonds𝑧=amount invested in mutual funds

The first equation indicates that the sum of the three principal amounts is $12,000.

x+y+z=12,000π‘₯+𝑦+𝑧=12,000

We form the second equation according to the information that Jordi invested $4,000 more in mutual funds than he invested in municipal bonds.

z=y+4,000𝑧=𝑦+4,000

The third equation shows that the total amount of interest earned from each fund equals $670.

0.03x+0.04y+0.07z=6700.03π‘₯+0.04𝑦+0.07𝑧=670

Then, we write the three equations as a system.

x+y+z=12,000βˆ’y+z=4,0000.03x+0.04y+0.07z=670π‘₯+𝑦+𝑧=12,000βˆ’π‘¦+𝑧=4,0000.03π‘₯+0.04𝑦+0.07𝑧=670

To make the calculations simpler, we can multiply the third equation by 100. Thus,

x+y+z=12,000βˆ’y+z=4,0003x+4y+7z=67,000(1)(2)(3)π‘₯+𝑦+𝑧=12,000(1)βˆ’π‘¦+𝑧=4,000(2)3π‘₯+4𝑦+7𝑧=67,000(3)

Step 1. Interchange equation (2) and equation (3) so that the two equations with three variables will line up.

x+y+z=12,0003x+4y+7z=67,000βˆ’y+z=4,000π‘₯+𝑦+𝑧=12,0003π‘₯+4𝑦+7𝑧=67,000βˆ’π‘¦+𝑧=4,000

Step 2. Multiply equation (1) by βˆ’3βˆ’3 and add to equation (2). Write the result as row 2.

x+y+z=12,000y+4z=31,000βˆ’y+z=4,000π‘₯+𝑦+𝑧=12,000𝑦+4𝑧=31,000βˆ’π‘¦+𝑧=4,000

Step 3. Add equation (2) to equation (3) and write the result as equation (3).

x+y+z=12,000y+4z=31,0005z=35,000π‘₯+𝑦+𝑧=12,000𝑦+4𝑧=31,0005𝑧=35,000

Step 4. Solve for z𝑧 in equation (3). Back-substitute that value in equation (2) and solve for y.𝑦. Then, back-substitute the values for z𝑧 and y𝑦 into equation (1) and solve for x.π‘₯.

5z=35,000z=7,000y+4(7,000)=31,000y=3,000x+3,000+7,000=12,000x=2,0005𝑧=35,000𝑧=7,000𝑦+4(7,000)=31,000𝑦=3,000π‘₯+3,000+7,000=12,000π‘₯=2,000

Jordi invested $2,000 in a money-market fund, $3,000 in municipal bonds, and $7,000 in mutual funds.

TRY IT #1

Solve the system of equations in three variables.

2x+yβˆ’2z=βˆ’13xβˆ’3yβˆ’z=5xβˆ’2y+3z=62π‘₯+π‘¦βˆ’2𝑧=βˆ’13π‘₯βˆ’3π‘¦βˆ’π‘§=5π‘₯βˆ’2𝑦+3𝑧=6

Identifying Inconsistent Systems of Equations Containing Three Variables

Just as with systems of equations in two variables, we may come across an inconsistent system of equations in three variables, which means that it does not have a solution that satisfies all three equations. The equations could represent three parallel planes, two parallel planes and one intersecting plane, or three planes that intersect the other two but not at the same location. The process of elimination will result in a false statement, such as 3=73=7 or some other contradiction.

EXAMPLE 4

Solving an Inconsistent System of Three Equations in Three Variables

Solve the following system.

xβˆ’3y+z=4βˆ’x+2yβˆ’5z=35xβˆ’13y+13z=8(1)(2)(3)π‘₯βˆ’3𝑦+𝑧=4(1)βˆ’π‘₯+2π‘¦βˆ’5𝑧=3(2)5π‘₯βˆ’13𝑦+13𝑧=8(3)

Solution

Looking at the coefficients of x,π‘₯, we can see that we can eliminate xπ‘₯ by adding equation (1) to equation (2).

xβˆ’3y+z=4(1)βˆ’x+2yβˆ’5z=3(2)βˆ’yβˆ’4z=7(4)π‘₯βˆ’3𝑦+𝑧=4(1)βˆ’π‘₯+2π‘¦βˆ’5𝑧=3(2)βˆ’π‘¦βˆ’4𝑧=7(4)

Next, we multiply equation (1) by βˆ’5βˆ’5 and add it to equation (3).

βˆ’5x+15yβˆ’5z=βˆ’205xβˆ’13y+13z=8(1)multipliedbyβˆ’5(3)______________________________________2y+8z=βˆ’12(5)βˆ’5π‘₯+15π‘¦βˆ’5𝑧=βˆ’20(1)multipliedbyβˆ’55π‘₯βˆ’13𝑦+13𝑧=8(3)______________________________________2𝑦+8𝑧=βˆ’12(5)

Then, we multiply equation (4) by 2 and add it to equation (5).

βˆ’2yβˆ’8z=14(4)multipliedby22y+8z=βˆ’12(5)_______________________________________0=2βˆ’2π‘¦βˆ’8𝑧=14(4)multipliedby22𝑦+8𝑧=βˆ’12(5)_______________________________________0=2

The final equation 0=20=2 is a contradiction, so we conclude that the system of equations in inconsistent and, therefore, has no solution.

Analysis

In this system, each plane intersects the other two, but not at the same location. Therefore, the system is inconsistent.

TRY IT #2

Solve the system of three equations in three variables.

x+y+z=2yβˆ’3z=12x+y+5z=0π‘₯+𝑦+𝑧=2π‘¦βˆ’3𝑧=12π‘₯+𝑦+5𝑧=0

Expressing the Solution of a System of Dependent Equations Containing Three Variables

We know from working with systems of equations in two variables that a dependent system of equations has an infinite number of solutions. The same is true for dependent systems of equations in three variables. An infinite number of solutions can result from several situations. The three planes could be the same, so that a solution to one equation will be the solution to the other two equations. All three equations could be different but they intersect on a line, which has infinite solutions. Or two of the equations could be the same and intersect the third on a line.

EXAMPLE 5

Finding the Solution to a Dependent System of Equations

Find the solution to the given system of three equations in three variables.

2x+yβˆ’3z=04x+2yβˆ’6z=0xβˆ’y+z=0(1)(2)(3)2π‘₯+π‘¦βˆ’3𝑧=0(1)4π‘₯+2π‘¦βˆ’6𝑧=0(2)π‘₯βˆ’π‘¦+𝑧=0(3)

Solution

First, we can multiply equation (1) by βˆ’2βˆ’2 and add it to equation (2).

βˆ’4xβˆ’2y+6z=0equation(1)multipliedbyβˆ’2​​​​4x+2yβˆ’6z=0(2)____________________________________________0=0βˆ’4π‘₯βˆ’2𝑦+6𝑧=0equation(1)multipliedbyβˆ’2​​​​4π‘₯+2π‘¦βˆ’6𝑧=0(2)____________________________________________0=0

We do not need to proceed any further. The result we get is an identity, 0=0,0=0, which tells us that this system has an infinite number of solutions. There are other ways to begin to solve this system, such as multiplying equation (3) by βˆ’2,βˆ’2, and adding it to equation (1). We then perform the same steps as above and find the same result, 0=0.0=0.

When a system is dependent, we can find general expressions for the solutions. Adding equations (1) and (3), we have

2x+yβˆ’3z=0xβˆ’y+z=0_____________3xβˆ’2z=02π‘₯+π‘¦βˆ’3𝑧=0π‘₯βˆ’π‘¦+𝑧=0_____________3π‘₯βˆ’2𝑧=0

We then solve the resulting equation for z.𝑧.

3xβˆ’2z=0z=32×3π‘₯βˆ’2𝑧=0𝑧=32π‘₯

We back-substitute the expression for z𝑧 into one of the equations and solve for y.𝑦.

2x+yβˆ’3(32x)=02x+yβˆ’92x=0y=92xβˆ’2xy=52×2π‘₯+π‘¦βˆ’3(32π‘₯)=02π‘₯+π‘¦βˆ’92π‘₯=0𝑦=92π‘₯βˆ’2π‘₯𝑦=52π‘₯

So the general solution is (x,52x,32x).(π‘₯,52π‘₯,32π‘₯). In this solution, xπ‘₯ can be any real number. The values of y𝑦 and z𝑧 are dependent on the value selected for x.π‘₯.

Analysis

As shown inΒ Figure 5, two of the planes are the same and they intersect the third plane on a line. The solution set is infinite, as all points along the intersection line will satisfy all three equations.

Figure 5

Q&A

Does the generic solution to a dependent system always have to be written in terms of x?π‘₯?

No, you can write the generic solution in terms of any of the variables, but it is common to write it in terms of x and if neededΒ xπ‘₯Β andΒ y.𝑦.

TRY IT #3

Solve the following system.

x+y+z=73xβˆ’2yβˆ’z=4x+6y+5z=24

RELATED POSTS

View all

view all