Solving Systems with Three Variables


Three equations. Three unknown variables. If they aren't found in time, the whole world's supply of Silly Putty will go up in flames. Only one person can find them in time—and she just called in sick. Uh-oh.

As our top Shmoop agent, you've been called into duty to learn how to solve systems of equations with three variables and save the world's Silly Putty, which is pretty close to saving the world itself.

Luckily, solving a system in three variables uses the same methods as with two variables—we just have to hit that sucker more than once. Sometimes it will be easier using elimination, sometimes a quick substitution cuts through the problem in a jiffy, and sometimes both methods team up to solve the system, and then fight crime together.

The types of answers we can find are the same, too: there can be zero, one, or infinite solutions.

Quickly now, to the training room. Da-na-nana-na-na.

Sample Problem

Solve the system of equations:

x + 2y – 3z = -3

2x + y + z = -2

2xy + 4z = 4

Stay sharp, Shmooper. We can start this problem off with either substitution or elimination. We're going to use elimination this time. When we have three equations, we can only add or subtract two equations at a time. We can't juggle that much at once.

Let's use the third equation to get rid of y in the first and second equations. For instance, let's add:

2x + y + z = -2

2xy + 4z = 4

This gives us:

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

4x + 5z = 2

A little bit of multiplication on the third equation will help us eliminate the other y from the first equation.

x + 2y – 3z = -3

2(2xy + 4z = 4)

Check it.

x + 2y – 3z = -3

4x – 2y + 8z = 8

Now we can add 'em like a boss.

(x + 4x) + (2y – 2y) + (-3z + 8z) = (-3 + 8)

5x + 5z = 5

Now we have a system of equations with two variables, just like we did, so long ago. Two sections ago.

4x + 5z = 2

5x + 5z = 5

Remember your training, secret Shmooping agent. While substitution is often useful when we work down to only two variables, in this case we can eliminate z from these equations by multiplying 4x + 5z = 2 by -1.

-4x – 5z = -2

5x + 5z = 5

Adding our two equations together, we get:

x = 3

Excellent. Now we're getting somewhere; not sure where, though. We can plug x = 3 into any of our previous equations. We recommend one of the ones without y, so that we can solve for z.

4x + 5z = 2

4(3) + 5z = 2

12 + 5z = 2

5z = -10

z = -2

Now we bring it all home by plugging x = 3 and z = -2 into one of the original three equations. Let's use x + 2y – 3z = -3.

3 + 2y – 3(-2) = -3

2y + 9 = -3

2y = -12

y = -6

We found the one and only solution, so it's an ordered triplet in the form of (3, -6, -2). This means there's one point where all the planes meet (like the airport).

This isn't the only possible outcome for a system of three equations, though. Sometimes there won't be any solutions, because at least two of the planes are parallel to each other.

Sample Problem

Solve the system of equations.

x + 3y + 2z = -1

2x + 6y + 4z = 3

2x + 2y – 3z = 9

All right, how to start? Well, how about we start at the beginning, and, when we come to the end, we'll stop. Yeah, that's sound advice.

We can use the first equation to eliminate x from our system, by multiplying by -2. That seems like a good beginning to us.

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

-2x – 6y – 4z = 2

Now add the new and improved version of our first equation to the second equation:

-2x – 6y – 4z = 2

2x + 6y + 4z = 3

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

Shmoop Addition Powers—Activate:

0 = 5

Uh, what? That's not right. Did our Shmoop Powers break math? Nope, it's just that there are no solutions that satisfy these equations. There is no point that, when put in these equations, will make 0 = 5.

So that's our answer: there is no solution. Our three planes don't all intersect. Maybe two of them do, but the third already had lunch plans. Maybe all three of them do meet up, but never at the same time. Systems with no solutions need to coordinate their schedules better.

Sample Problem

Solve this system of linear equations.

3x + 2y – 2z = -2

6x + 4y – 4z = -4

5xy + z = 1

Which variable can we try to get rid of first? Which method will work best? Which contestant will win American Idol this year?

The coefficients of y and z in the third equation can be used to eliminate either variable. One of them could also be used in substitution, but with that 5x sitting there, along with the coefficients in the first two equations, we'd have a big mess of numbers on our hands. We're normally fans of making a mess, but not during our math problems.

Okay, we've decided we're going to add:

3x + 2y – 2z = -2

2(5xy + z = 1)

This will eliminate y…and z! L-l-lucky.

3x + 2y – 2z = -2

10x – 2y + 2z = 2

That gives us:

(3x + 10x) + (2y – 2y) + (-2z + 2z) = (-2 + 2)

13x = 0

x = 0

A splendid start. We can simplify everything by putting 0 in place of x in our original equations.

2y – 2z = -2

4y – 4z = -4

-y + z = 1

Remember the substitution method? We do. We're like an elephant, or a computer's hard drive—we never forget. How about we substitute our way to the solution? First solve for y in the third equation.

y = z – 1

And now substitute z – 1 for y in the first equation.

2(z – 1) – 2z = -2

2z – 2 – 2z = -2

0 = 0

All of our variables have fallen out, and we're left with a true statement. Just like in the two-variable case, we have an infinite number of solutions. The problem's done, right?

Bzzt! Wrong. We've shown that y and z share an infinite number of solutions, but we already know that x = 0, remember? Even if we hadn't, we'd still need to find out what x was up to anyway.

When we had infinite solutions in 2D, that meant that both lines were the exact same. We're in 3D space now, and we're working with three planes. We can have an infinite number of solutions without all three planes being the same; they can just share a line between them.

What is that line? It's y = z – 1. Any solution to the system of equations will need to satisfy x = 0 and y = z – 1.

We have taught you what we can about systems of equations with three variables, secret Shmoop agent. The world, and its supply of Silly Putty, now lies in your hands. Good luck.