Skip to main content
Mathematics LibreTexts

2.4: Solve Systems of Linear Equations with Three Variables

  • Page ID
    66293
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives

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

    • Determine whether an ordered triple is a solution of a system of three linear equations with three variables
    • Solve a system of linear equations with three variables
    • Solve applications using systems of linear equations with three variables
    Be Prepared

    Before you get started, take this readiness quiz.

    1. Evaluate \(5x−2y+3z\) when \(x=−2, y=−4,\) and \(z=3.\)
    2. Classify the equations as a conditional equation, an identity, or a contradiction and then state the solution. \( \left\{ \begin{array} {l} −2x+y=−11 \\ x+3y=9 \end{array} \right. \)
    3. Classify the equations as a conditional equation, an identity, or a contradiction and then state the solution. \(\left\{ \begin{array} {l} 7x+8y=4 \\ 3x−5y=27 \end{array} \right. \)

    Determine Whether an Ordered Triple is a Solution of a System of Three Linear Equations with Three Variables

    In this section, we will extend our work of solving a system of linear equations. So far we have worked with systems of equations with two equations and two variables. Now we will work with systems of three equations with three variables. But first let's review what we already know about solving equations and systems involving up to two variables.

    We learned earlier that the graph of a linear equation, \(Ax+By=C\), is a line. Each point on the line is a solution to the equation. For a system of two equations with two variables, we graph two lines. Then we can see that all the points that are solutions to each equation form a line. 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

    We know 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 one, two lines intersect. Intersecting lines have one point in common. There is one solution to this system. The graph is labeled Consistent Independent. In the second graph, two lines are parallel. Parallel lines have no points in common. There is no solution to this system. The graph is labeled inconsistent. In the third graph, there is just one line. Both equations give the same line. Because we have just one line, there are infinitely many solutions. It is labeled consistent dependent.

    Similarly, for a linear equation with three variables \(Ax+By+Cz=D\) every solution to the equation is an ordered triple, \((p,q,r)\) that makes the equation true when substituted in for \((x,y,z\).

    Definition \(\PageIndex{1}\)

    1. An expression that can be written as

    \(A x+By+Cz\)

    with \(A\), \(B\), and \(C\) real numbers, not all zero, is called a linear expression (with three variables), or more specifically, a linear expression with \(x\), \(y\), and \(z\).

    2. An equation that can be written as

    \(Ax+By+Cz=D\)

    with \(A\), \(B\), \(C\), and \(D\) real numbers, not all zero, is called a linear equation (with three variables), or more specifically, a linear equation with \(x\), \(y\), and \(z\).

    As before, triples of numbers can be graphed in three dimensional space, so we will call these triples points and imagine them in this space. All the points that are solutions to one equation form a plane in three-dimensional space. And, by finding what the planes have in common, we’ll find the solution to the system.

    When we solve a system of three linear equations represented by a graph of three planes in space, there are three possible cases.

    Eight figures are shown. The first one shows three intersecting planes with one point in common. It is labeled Consistent system and Independent equations. The second figure has three parallel planes with no points in common. It is labeled Inconsistent system. In the third figure two planes are coincident and parallel to the third plane. The planes have no points in common. In the fourth figure, two planes are parallel and each intersects the third plane. The planes have no points in common. In the fifth figure, each plane intersects the other two, but all three share no points. The planes have no points in common. In the sixth figure, three planes intersect in one line. There is just one line, so there are infinitely many solutions. In the seventh figure, two planes are coincident and intersect the third plane in a line. There is just one line, so there are infinitely many solutions. In the last figure, three planes are coincident. There is just one plane, so there are infinitely many solutions.

    .

    ......

    To solve a system of three linear equations, we want to find the values of the variables that are solutions to all three equations. In other words, we are looking for the ordered triple \((x,y,z)\) that makes all three equations true. These are called the solutions of the system of three linear equations with three variables.

    Definition \(\PageIndex{2}\)

    Solutions of a system of equations are the values of the variables that, when substituted, make all the equations true. A solution of a system of linear equations with three variables is represented by an ordered triple \((p,q,r)\), so that substituting \(p\) for \(x\), \(q\) for \(y\). and \(r\) for \(z\) yields three true equations. We may also say \((x,y,z)=(p,q,r)\) is a solution.

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

    Example \(\PageIndex{3}\)

    Determine whether the ordered triple is a solution to the system \( \left\{ \begin{array} {l} x−y+z=2 \\ 2x−y−z=−6 \\ 2x+2y+z=−3 \end{array} \right. \).

    a. \((−2,−1,3)\)

    b. \((−4,−3,4)\)

    Solution

    a.

    \( \left\{ \begin{array} {l} x−y+z=2 \\ 2x−y−z=−6 \\ 2x+2y+z=−3 \end{array} \right. \)
    We substitute \(x=-2\), \(y=-1\) and \(z=3\) into all three equations.
    \begin{aligned} x-y+z &= 2\\ -2-(-1)+3 &\stackrel{?}{=} 2 \\ 2 & \stackrel{?}{=} 2 \\ &\quad \text{True}\end{aligned} \begin{aligned} 2x-y-z &= -6\\ 2(-2)-(-1)-3 &\stackrel{?}{=} -6 \\ -6 & \stackrel{?}{=} -6 \\ &\quad \text{True}\end{aligned} \begin{aligned} 2x+2y+z &= -3\\ 2(-2)+2(-1)+3 &\stackrel{?}{=} -3 \\ -3 & \stackrel{?}{=} -3 \\ &\quad \text{True}\end{aligned}
    Answer: \((-2,-1,3)\) does make all three equations true, so \((-2,-1,3)\) is a solution.

    b.

    \( \left\{ \begin{array} {l} x−y+z=2 \\ 2x−y−z=−6 \\ 2x+2y+z=−3 \end{array} \right. \)
    We substitute \(x=-4\), \(y=-3\) and \(z=4\) into all three equations.
    \begin{aligned} x-y+z &= 2\\ -4-(-3)+4 &\stackrel{?}{=} 2 \\ 3 & \stackrel{?}{=} 2 \\ &\quad \text{False}\end{aligned} \begin{aligned} 2x-y-z &= -6\\ 2(-4)-(-3)-4 &\stackrel{?}{=} -6 \\ -9 & \stackrel{?}{=} -6 \\ &\quad \text{False}\end{aligned} \begin{aligned} 2x+2y+z &= -3\\ 2(-4)+2(-3)+4 &\stackrel{?}{=} -3 \\ -10 & \stackrel{?}{=} -3 \\ &\quad \text{False}\end{aligned}
    Answer: \((-4,-3,4)\) does not make all three equations true, so \((-4,-3,4)\) is not a solution.
    Try It \(\PageIndex{4}\)

    Determine whether the ordered triple is a solution to the system \( \left\{ \begin{array} {l} 3x+y+z=2 \\ x+2y+z=−3 \\ 3x+y+2z=4 \end{array} \right. \).

    a. \((1,−3,2)\)

    b. \((4,−1,−5)\)

    Answer

    a. Yes, it is a solution.

    b. No, it is not a solution.

    Try It \(\PageIndex{5}\)

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

    a. \((2,−2,3)\)

    b. \((−2,2,3)\)

    Answer

    a. No, it is not a solution.

    b. Yes, it is a solution.

    Solve a System of Linear Equations with Three Variables

    To solve a system of linear equations with three variables, we basically use the same techniques we used with systems that had two variables. We start with two pairs of equations and in each pair we eliminate the same variable. This will then give us a system of equations with only two variables and then we know how to solve that system!

    Next, we use the values of the two variables we just found to go back to the original equation and find the third variable. We write our answer as an ordered triple and then check our results.

    Example \(\PageIndex{6}\)

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

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

    Write the equations in standard form.

    • If any coefficients are fractions, clear them.

    The equations are in standard form.

    There are no fractions.

    \( \left\{ \begin{array} {rlr} x−2y+z\!\!\!\!&=3 &\quad (A) \\ 2x+y+z\!\!\!\!&=4 &\quad (B) \\ 3x+4y+3z\!\!\!\!&=−1 &\quad (C) \end{array} \right. \)

    Eliminate the same variable from two equations.

    • Decide which variable you will eliminate.
    • Work with a pair of equations to eliminate the chosen variable.
    • Multiply one of both equations so that the coefficients of that variable are opposites.
    • Add the equations to eliminate one variable.

    We can eliminate the \(y\)'s from Equations \(A\) and \(B\) by multiplying Equation \(B\) by \(2\).

    Multiply.

    We add the \(x\)'s, \(y\)'s, and constants. The new equation, \(D\), has only \(x\) and \(z\).

    Add.

    \( \left\{ \begin{array} {rlr} x−2y+z\!\!\!\!&=3 &\quad (A) \\ 2x+y+z\!\!\!\!&=4 &\quad (B) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} x−2y+z \!\!\!\!&=3 &\quad (A) \\ 2(2x+y+z)\!\!\!\!&=2(4) &\quad (B) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} x−2y+z\!\!\!\!&=3 &\quad (A) \\ 4x+2y+2z\!\!\!\!&=8 &\quad (B) \end{array} \right. \)

    \(5x+3z=11\quad (D)\)

    Repeat the previous step using two other equations and eliminate the same variable as in the previous step.

    We can again eliminate the \(y\)'s using the Equations \((A)\) and \((C)\) by multiplying Equation \((A)\) by \(2\).

    Add the new equations and the result will be Equation \((E)\).

    \( \left\{ \begin{array} {rlr} x−2y+z\!\!\!\!&=3 &\quad (A) \\ 3x+4y+3z\!\!\!\!&=−1 &\quad (C) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} 2(x−2y+z)\!\!\!\! &=2(3) &\quad (A) \\ 3x+4y+3z\!\!\!\! &=−1 &\quad (C) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} 2x−4y+2z\!\!\!\! &=6 &\quad (A) \\ 3x+4y+3z\!\!\!\! &=−1 &\quad (C) \end{array} \right. \)

    \(5x+5z=5\quad (E)\)

    The two new equations form a system of two equations with two variables. Solve this system.

    Use Equations \((D)\) and \((E)\) to eliminate either \(x\) or \(z\).

    Add and solve for \(z\).

    Use either Equations \((D)\) or \((E)\) to solve for \(x\) using substitution.

    \( \left\{ \begin{array} {rlr} 5x+3z \!\!\!\! &=11 &\quad (D) \\ 5x+5z\!\!\!\! &=5 &\quad (E) \end{array}\right.\)

    \( \left\{ \begin{array} {rlr} 5x+3z \!\!\!\! &=11 &\quad (D) \\ (-1)(5x+5z)\!\!\!\! &=(-1)(5) &\quad (E) \end{array}\right.\)

    \( \left\{ \begin{array} {rlr} 5x+3z \!\!\!\! &=11 &\quad (D) \\ -5x-5z\!\!\!\! &=-5 &\quad (E) \end{array}\right.\)

    \(\begin{aligned} -2z&=6 \\ z&=-3\end{aligned}\)

    \(\begin{aligned} 5x+3z&=11 \quad (D) \\ 5x+3(-3)&=11 \\5x-9&=11 \\ 5x&=20\\ x&=4\end{aligned}\)

    Use the values of the two variables found in the previous step to solve for the third variable. Use an original equation to find \(y\). \(\begin{aligned} 2x+y+z &= 4 \quad (B)\\ 2(4)+y +z &= 4\\ 8+y-3 &= 4 \\ y &= -1 \end{aligned}\)
    Write the solution as an ordered triple. Write it as \((x,y,z)\). \((4,-1,-3)\)
    Check that the ordered triple is a solution to all three original equations. This step will help to detect errors.

    Substitute \(x=4\), \(y=-1\) and \(z=-3\) into all three equations.

    Do they make the equations true?

    \(\begin{aligned} x−2y+z&=3 \\ 4-2(-1)+(-3) & \stackrel{?}{=} 3 \\3 & \stackrel{?}{=} 3\\ &\quad \text{True}\end{aligned}\)

    \(\begin{aligned} 2x+y+z&=4 \\ 2(4)+(-1)+(-3)& \stackrel{?}{=} 4 \\4 & \stackrel{?}{=} 4 \\ &\quad \text{True}\end{aligned}\)

    \(\begin{aligned} 3x+4y+3z &=−1 \\ 3(4)+4(-1)+3(-3)& \stackrel{?}{=} -1 \\-1 & \stackrel{?}{=} -1 \\ &\quad \text{True}\end{aligned}\)

    Substituting \(4\) into \(x\), \(-1\) into \(y\), and \(-3\) into for \(z\) makes both equations true.

    Answer the question. The solution is \((4,-1,-3)\).
    Try It \(\PageIndex{7}\)

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

    Answer

    The solution is \((2,−1,3)\).

    Try It \(\PageIndex{8}\)

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

    Answer

    The solution is \((−2,3,4)\).

    The steps are summarized here.

    Solve a system of linear equations with three variables (by elimination)
    1. Write the equations in standard form.
      • If any coefficients are fractions, clear them.
    2. Eliminate the same variable from two equations.
      • Decide which variable you will eliminate.
      • Work with a pair of equations to eliminate the chosen variable.
      • 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.
    3. Repeat Step 2 using two other equations and eliminate the same variable as in Step 2.
    4. The two new equations form a system of two equations with two variables. Solve this system.
    5. Use the values of the two variables found in Step 4 to solve for the third variable.
    6. Write the solution as an ordered triple.
    7. Check that the ordered triple is a solution to all three original equations (in order to detect errors).
    Example \(\PageIndex{9}\)

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

    Solution
     

    \(\left\{ \begin{array}{rlr} 3x−4z \!\! &=0 & \qquad (A) \\ 3y+2z \!\! &=−3 &\qquad (B) \\ 2x+3y\!\! &=−5 &\qquad (C) \end{array} \right. \)

    We can eliminate \(z\) from Equations \((A)\) and \((B)\) by multiplying Equation \((B)\) by \(2\) and then adding the resulting equations.

    \(\left\{ \begin{array}{rlr} 3x−4z \!\!\!\!&=0 &\quad (A)\\ 2(3y+2z)\!\!\!\! &=2(−3) &\quad (B)\end{array} \right. \)

    \(\left\{ \begin{array}{rlr} 3x−4z \!\!\!\! &= 0 &\quad (A)\\ 6y+4z \!\!\!\! &=−6 &\quad (B) \end{array} \right. \)

    Add. \(3x+6y =-6 \quad (D) \)

    Notice that Equations \((C)\) and \((D)\) both have the variables \(x\) and \(y\). We will solve this new system for \(x\) and \(y\).

    \(\left\{ \begin{array}{rlr} 2x+3y \!\! & =−5& \quad (C) \\ 3x+6y \!\! &=-6&\quad (D)\end{array} \right. \)

    \(\left\{ \begin{array}{rlr} (-2)(2x+3y)\!\!\!\! &=(-2)(-5) & \quad (C) \\ 3x+6y\!\!\!\! &=-6&\quad (D)\end{array} \right. \)

    \(\left\{ \begin{array}{rlr} -4x-6y\!\!\!\! &=10 & \quad (C) \\ 3x+6y\!\!\!\! &=-6&\quad (D)\end{array} \right. \)

    Add and solve for \(x\). \(\begin{aligned}-x&=4\\ x&=-4\end{aligned}\)
    To solve for \(y\), we substitute \(x=−4\) into Equation \((C)\). \(\begin{aligned}2x+3y&=-5 \qquad (C)\\ 2(-4)+3y &= -5 \\-8+3y&=-5\\3y&=3\\ y&=1\end{aligned}\)
    We now have \(x=−4\) and \(y=1\). We need to solve for \(z\). We can substitute \(x=−4\) into Equation \((A)\) to find \(z\). \(\begin{aligned}3x-4z&=0 \qquad (A)\\ 3(-4)-4z &= 0 \\-12-4z&=0\\-4z&=12\\ z&=-3\end{aligned}\)
    We write the solution as an ordered triple. \((−4,1,−3)\)
    We check that the solution makes all three equations true.

    \(\begin{aligned} 3x-4z&=0 \quad (A) \\ 3(-4)-4(-3)& \stackrel{?}{=} 0 \\0 & \stackrel{?}{=} 0 \\ &\quad \text{True}\end{aligned}\)

    \(\begin{aligned} 3y+2z &=−3 \quad (B) \\ 3(1)+2(-3)& \stackrel{?}{=} -3 \\-3 & \stackrel{?}{=} -3 \\ &\quad \text{True}\end{aligned}\)

    \(\begin{aligned} 2x+3y &=−5\quad (C) \\ 2(-4)+3(1)& \stackrel{?}{=} -5 \\-5 & \stackrel{?}{=} -5 \\ &\quad \text{True}\end{aligned}\)

    \((−4,1,−3)\) makes all three equations true.

    Answer the question. The solution is \((−4,1,−3)\).
    Try It \(\PageIndex{10}\)

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

    Answer

    The solution is \((−3,4,−2)\).

    Try It \(\PageIndex{11}\)

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

    Answer

    The solution is \((−2,3,−1)\).

    When we solve a system and end up with no variables and a false statement, we know there are no solutions and that the system is inconsistent. The next example shows a system of equations that is inconsistent.

    Example \(\PageIndex{12}\)

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

    Solution
      \( \left\{ \begin{array} {rlr} x+2y−3z\!\!\! &=−1 &\quad (A) \\ x−3y+z &=1 \!\!\! &\quad (B) \\ 2x−y−2z \!\!\! &=2 &\quad (C) \end{array} \right. \)
    Use Equations \((A)\) and \((B)\) to eliminate \(z\).

    \( \left\{ \begin{array} {rlr} x+2y−3z \!\!\!&=−1 &\quad (A) \\ x−3y+z \!\!\! &=1 &\quad (B) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} x+2y−3z\!\!\! &=−1 &\quad (A) \\ (3)(x−3y+z)\!\!\! &=(3)(1) &\quad (B) \end{array} \right.\)

    \( \left\{ \begin{array} {rlr} x+2y−3z\! \!\!&=−1 &\quad (A) \\ 3x−9y+3z \!\!\! &=3 &\quad (B) \end{array} \right. \)

    Add. \(4x-7y =2\quad (D)\)
    Use Equations \((B)\) and \((C)\) to eliminate \(z\) again.

    \( \left\{ \begin{array} {rlr} x−3y+z \!\!\! &=1 &\quad (B) \\ 2x−y−2z\!\!\! &=2 &\quad (C) \end{array} \right. \)

    \( \left\{\begin{array} {rlr} (2)(x−3y+z) \!\!\! &=(2)(1) &\quad (B) \\ 2x−y−2z\!\!\! &=2 &\quad (C) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} 2x−6y+2z \!\!\! &=2 &\quad (B) \\ 2x−y−2z\!\!\! &=2 &\quad (C) \end{array} \right. \)

    Add. \(4x-7y = 4 \quad (E)\)
    Use Equations \((D)\) and \((E)\) to eliminate a variable.

    \( \left\{ \begin{array} {rlr} 4x-7y\!\!\! &=2 &\quad (D) \\ 4x-7y\!\!\! &=4 &\quad (E) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} 4x-7y\!\!\! &=2 &\quad (D) \\ (-1)(4x-7y)\!\!\! &=(-1)(4) &\quad (E) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} 4x-7y\!\!\! &=2 &\quad (D) \\ -4x+7y\!\!\! &=-4 &\quad (E) \end{array} \right. \)

    Add. \(0=-2\quad\) False
    Answer the question. We are left with a false statement and this tells us the system is inconsistent and has no solution.
    Try It \(\PageIndex{13}\)

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

    Answer

    The system has no solution.

    Try It \(\PageIndex{14}\)

    Solve the system \( \left\{ \begin{array} {l} 2x−2y+3z=6 \\ 4x−3y+2z=0 \\ −2x+3y−7z=1 \end{array} \right. \).

    Answer

    The system has no solution.

    When we solve a system and end up with no variables but a true statement, we know there are infinitely many solutions. The system is consistent with dependent equations. Our solution will show how two of the variables depend on the third.

    Example \(\PageIndex{15}\)

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

    Solution
      \( \left\{ \begin{array} {rlr} x+2y−z \! \!\!&=1 &\quad (A)\\ 2x+7y+4z\! \!\!&=11 &\quad (B) \\ x+3y+z\! \!\!&=4&\quad (C) \end{array} \right. \)
    Use Equations \((A)\) and \((C)\) to eliminate \(x\).

    \( \left\{ \begin{array} {rlr} x+2y−z\! \!\! &=1 &\quad (A)\\ x+3y+z\! \!\!&=4&\quad (C) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} (-1)(x+2y−z)\! \!\! &=(-1)(1) &\quad (A)\\ 2x+7y+4z\! \!\!&=11 &\quad (B) \\ x+3y+z&=4\! \!\!&\quad (C) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} -x-2y+z \! \!\!&=-1 &\quad (A)\\ 2x+7y+4z\! \!\!&=11 &\quad (B) \\ x+3y+z\! \!\! &=4&\quad (C) \end{array} \right. \)

    Add. \(y+2z=3\quad (D)\)
    Use Equations \((A)\) and \((B)\) to eliminate \(x\) again.

    \( \left\{ \begin{array} {rlr} x+2y−z \! \!\!&=1 &\quad (A)\\ 2x+7y+4z\! \!\!&=11 &\quad (B) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} (-2)(x+2y−z)\! \!\! &=(-2)(1) &\quad (A)\\ 2x+7y+4z\! \!\!&=11 &\quad (B) \end{array} \right. \)

    \( \left\{ \begin{array} {rlr} -2x-4y+2z \! \!\!&=-2 &\quad (A)\\ 2x+7y+4z\! \!\!&=11 &\quad (B) \end{array} \right. \)

    Add. \(3y+6z = 9 \quad (E)\)
    Use Equations \((D)\) and \((E)\) to eliminate \(y\).

    \(\left\{ \begin{array} {rlr} y+2z\! \!\!&=3&\quad (D) \\3y+6z\! \!\! &= 9& \quad (E)\end{array} \right.\)

    \(\left\{ \begin{array} {rlr} (-3)(y+2z)\! \!\!&=(-3)(3)&\quad (D) \\3y+6z \! \!\!&= 9& \quad (E)\end{array} \right.\)

    \(\left\{ \begin{array} {rlr} -3y-6z\! \!\!&=-9&\quad (D) \\3y+6z \! \!\!&= 9& \quad (E)\end{array} \right.\)

    Add. \(0=0\)
    Conclusion. There are infinitely many solutions.

    Represent the solution showing how \(x\) and \(y\) are dependent on \(z\).

    Solve Equation \((D)\) for \(y\).

    \(\begin{aligned} y+2z&=3\quad (D) \\ y &= -2z+3\end{aligned}\)

    Substitute \(y=−2z+3\) into Equation \((A)\) and solve for \(x\).

    \( \begin{aligned} x+2y−z &=1 \quad (A) \\ x+2(−2z+3)−z &= 1 \\ x−4z+6−z &= 1 \\ x−5z+6 &= 1 \\ x &= 5z−5 \end{aligned} \)

    Answer the question. The true statement \(0=0\) tells us that this is a dependent system that has infinitely many solutions. The solutions are of the form \((x,y,z)\) where \(x=5z−5\), \(y=−2z+3\), and \(z\) is any real number.
    Try It \(\PageIndex{16}\)

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

    Answer

    The system has infinitely many solutions \((x,3,z)\) where \(x=z−3\) and \(z\) is any real number.

    Try It \(\PageIndex{17}\)

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

    Answer

    The system has infinitely many solutions \((x,y,z)\) where \(x=5z−2\), \(y=4z−3\), and \(z\) is any real number.

    Solve Applications using Systems of Linear Equations with Three Variables

    Applications that are modeled by a system of equations can be solved using the same techniques we used to solve the systems. Many of the application are just extensions to three variables of the types we have solved earlier.

    Example \(\PageIndex{18}\)

    The community college theater department sold three kinds of tickets to its latest play production. The adult tickets sold for \(\$15\), the student tickets for \(\$10\), and the child tickets for \(\$8\). The theater department was thrilled to have sold \(250\) tickets and brought in \(\$2,825\) in one night. The number of student tickets sold is twice the number of adult tickets sold. How many of each type did the department sell?

    Solution
    We will use a chart to organize the information. .
    Number of students is twice number of adults. \(y=2x\)
    Rewrite the equation in standard form. \(\begin{aligned} y &= 2x \\ 2x−y &= 0 \end{aligned} \)
    Write the system of equations. \(\left\{ \begin{array}{rlr} x+y+z \!\!\!\!&= 250 &\quad (A)\\ 15 x+ 10 y + 8z \!\!\! &= 2825 &\quad (B) \\ -2x+y \!\!\!\!&= 0 & \quad (C) \end{array}\right.\)
    Use Equations \((A)\) and \((B)\) to eliminate \(z\).

    \(\left\{ \begin{array}{rlr} x+y+z \!\!\!\!&= 250 &\quad (A)\\ 15 x+ 10 y + 8z \!\!\!\!&= 2825 &\quad (B) \end{array}\right.\)

    \(\left\{ \begin{array}{rlr} (-8)(x+y+z) \!\!\!\!&= (-8)(250) &\quad (A)\\ 15 x+ 10 y + 8z \!\!\!\!&= 2825 &\quad (B) \end{array}\right.\)

    \(\left\{ \begin{array}{rlr} -8x-8y-8z \!\!\!\!&= -2000 &\quad (A)\\ 15 x+ 10 y + 8z \!\!\!\!&= 2825 &\quad (B) \end{array}\right.\)

    Add. \(7x+2y=825 \quad (D)\)
    Use Equations \((C)\) and \((D)\) to eliminate \(y\).

    \(\left\{ \begin{array}{rlr} -2x+y \!\!\!\!&= 0 &\quad (C)\\ 7x+2y\!\!\!\!&=825 &\quad (D) \end{array}\right.\)

    \(\left\{ \begin{array}{rlr} (-2)(-2x+y)\!\!\!\! &= (-2)(0) &\quad (C)\\ 7x+2y\!\!\!\!&=825 &\quad (D) \end{array}\right.\)

    \(\left\{ \begin{array}{rlr} 4x-2y \!\!\!\!&= 0 &\quad (C)\\ 7x+2y\!\!\!\!&=825 &\quad (D) \end{array}\right.\)

    Add and solve for \(x\) \(\begin{aligned} 11x&=825 \\ x&=75 \text{ adult tickets}\end{aligned}\)
    Use Equation \((C)\) to find \(y\). \(−2x+y=0\quad (C)\)
    Substitute \(x=75\). \(\begin{aligned} −2(75)+y &= 0 \\ −150+y &= 0 \\ y &= 150\text{ student tickets}\end{aligned} \)
    Use Equation \((A)\) to find \(z\). \(x+y+z=250\)
    Substitute in the values \(x=75\) and \(y=150.\)
    \(\begin{aligned} 75+150+z &= 250 \\ 225+z &= 250 \\ z &= 25\text{ child tickets} \end{aligned} \)
    Answer the question. The theater department sold \(75\) adult tickets, \(150\) student tickets, and \(25\) child tickets.

    Note that there are many ways of solving this but they all lead to the same solution.

     






     
     
     
     
    Try It \(\PageIndex{19}\)

    The community college fine arts department sold three kinds of tickets to its latest dance presentation. The adult tickets sold for \(\$20\), the student tickets for \(\$12\) and the child tickets for \(\$10\). The fine arts department was thrilled to have sold \(350\) tickets and brought in \(\$4,650\) in one night. The number of child tickets sold is the same as the number of adult tickets sold. How many of each type did the department sell?

    Answer

    The fine arts department sold \(75\) adult tickets, \(200\) student tickets, and \(75\) child tickets.

    Try It \(\PageIndex{20}\)

    The community college soccer team sold three kinds of tickets to its latest game. The adult tickets sold for \(\$10\), the student tickets for \(\$8\) and the child tickets for \(\$5\). The soccer team was thrilled to have sold \(600\) tickets and brought in \(\$4,900\) for one game. The number of adult tickets is twice the number of child tickets. How many of each type did the soccer team sell?

    Answer

    The soccer team sold \(200\) adult tickets, \(300\) student tickets, and \(100\) child tickets.

    Key Concepts

    • 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, \((p,q,r)\) that makes the equations true when \(p,q,\) and \(r\) are substituted in for \(x,y,\) and \(z\), respectively.
    • How to solve a system of linear equations with three variables.
      1. Write the equations in standard form
        If any coefficients are fractions, clear them.
      2. Eliminate the same variable from two equations.
        Decide which variable you will eliminate.
        Work with a pair of equations to eliminate the chosen variable.
        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
      3. Repeat Step 2 using two other equations and eliminate the same variable as in Step 2.
      4. The two new equations form a system of two equations with two variables. Solve this system.
      5. Use the values of the two variables found in Step 4 to find the third variable.
      6. Write the solution as an ordered triple.
      7. Check that the ordered triple is a solution to all three original equations.

    Glossary

    solutions of a system of linear equations with three variables
    The solutions of a system of equations are the values of the variables that make all the equations true; a solution is represented by an ordered triple \((p,q,r)\).

    Practice Makes Perfect

    Determine Whether an Ordered Triple is a Solution of a System of Three Linear Equations with Three Variables

    In the following exercises, determine whether the ordered triple is a solution to the system.

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

    ⓐ \((3,1,3)\)
    ⓑ \((4,3,7)\)

    2. \(\left\{ \begin{array} {l} -3x+y+z=-4 \\ -x+2y-2z=1 \\ 2x-y-z=-1 \end{array} \right. \)

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

    Answer

    ⓐ no ⓑ yes

    3. \(\left\{ \begin{array} {l} y−10z=−8 \\ 2x−y=2 \\ x−5z=3 \end{array} \right. \)

    ⓐ \((7,12,2)\)
    ⓑ \((2,2,1)\)

    4. \(\left\{ \begin{array} {l} x+3y−z=15 \\ y=\dfrac{2}{3}x-2 \\ x−3y+z=−2 \end{array} \right. \)

    ⓐ \(\left(−6,5,\dfrac{1}{2}\right)\)
    ⓑ \(\left(5,\dfrac{4}{3},−3\right)\)

    Answer

    ⓐ no ⓑ yes

    Solve a System of Linear Equations with Three Variables

    In the following exercises, solve the system of equations.

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

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

    Answer

    \((4,5,2)\)

    7. \(\left\{ \begin{array} {l} 2x−5y+3z=8 \\ 3x−y+4z=7 \\ x+3y+2z=−3 \end{array} \right. \)

    8. \(\left\{ \begin{array} {l} 5x−3y+2z=−5 \\ 2x−y−z=4 \\ 3x−2y+2z=−7 \end{array} \right. \)

    Answer

    \((7,12,−2)\)

    9. \(\left\{ \begin{array} {l} 3x−5y+4z=5 \\ 5x+2y+z=0 \\ 2x+3y−2z=3 \end{array} \right. \)

    10. \(\left\{ \begin{array} {l} 4x−3y+z=7 \\ 2x−5y−4z=3 \\ 3x−2y−2z=−7 \end{array} \right. \)

    Answer

    \((−3,−5,4)\)

    11. \(\left\{ \begin{array} {l} 3x+8y+2z=−5 \\ 2x+5y−3z=0 \\ x+2y−2z=−1 \end{array} \right. \)

    12. \(\left\{ \begin{array} {l} 11x+9y+2z=−9 \\ 7x+5y+3z=−7 \\ 4x+3y+z=−3 \end{array} \right. \)

    Answer

    \((2,−3,−2)\)

    13. \(\left\{ \begin{array} {l} \dfrac{1}{3}x−y−z=1 \\ x+\dfrac{5}{2}y+z=−2 \\ 2x+2y+\dfrac{1}{2}z=−4 \end{array} \right. \)

    14. \(\left\{ \begin{array} {l} x+\dfrac{1}{2}y+\dfrac{1}{2}z=0 \\ \dfrac{1}{5}x−\dfrac{1}{5}y+z=0 \\ \dfrac{1}{3}x−\dfrac{1}{3}y+2z=−1 \end{array} \right. \)

    Answer

    \((6,−9,−3)\)

    15. \(\left\{ \begin{array} {l} x+\dfrac{1}{3}y−2z=−1 \\ \dfrac{1}{3}x+y+\dfrac{1}{2}z=0 \\ \dfrac{1}{2}x+\dfrac{1}{3}y−\dfrac{1}{2}z=−1 \end{array} \right. \)

    16. \(\left\{ \begin{array} {l} \dfrac{1}{3}x−y+\dfrac{1}{2}z=4 \\ \dfrac{2}{3}x+\dfrac{5}{2}y−4z=0 \\ x−\dfrac{1}{2}y+\dfrac{3}{2}z=2 \end{array} \right. \)

    Answer

    \((3,−4,−2)\)

    17. \(\left\{ \begin{array} {l} x+2z=0 \\ 4y+3z=−2 \\ 2x−5y=3 \end{array} \right. \)

    18. \(\left\{ \begin{array} {l} 2x+5y=4 \\ 3y−z=\dfrac{3}{4} \\ x+3z=−3 \end{array} \right. \)

    Answer

    \((−3,2,3)\)

    19. \(\left\{ \begin{array} {l} 2y+3z=−1 \\ 5x+3y=−6 \\ 7x+z=1 \end{array} \right. \)

    20. \(\left\{ \begin{array} {l} 3x−z=−3 \\ 5y+2z=−6 \\ 4x+3y=−8 \end{array} \right. \)

    Answer

    \((−2,0,−3)\)

    21. \(\left\{ \begin{array} {l} 4x−3y+2z=0 \\ −2x+3y−7z=1 \\ 2x−2y+3z=6 \end{array} \right. \)

    22. \(\left\{ \begin{array} {l} x−2y+2z=1 \\ −2x+y−z=2 \\ x−y+z=5 \end{array} \right. \)

    Answer

    no solution

    23. \(\left\{ \begin{array} {l} 2x+3y+z=1 \\ 2x+y+z=9 \\ 3x+4y+2z=20 \end{array} \right. \)

    24. \(\left\{ \begin{array} {l} x+4y+z=−8 \\ 4x−y+3z=9 \\ 2x+7y+z=0 \end{array} \right. \)

    Answer

    \(x=\dfrac{203}{16};\space y=–\dfrac{25}{16};\space z=–\dfrac{231}{16};\)

    25. \(\left\{ \begin{array} {l} x+2y+z=4 \\ x+y−2z=3 \\ −2x−3y+z=−7 \end{array} \right. \)

    26. \(\left\{ \begin{array} {l} x+y−2z=3 \\ −2x−3y+z=−7 \\ x+2y+z=4 \end{array} \right. \)

    Answer

    \((x,y,z)\) where \(x=5z+2;\space y=−3z+1;\space z\) is any real number

    27. \(\left\{ \begin{array} {l} x+y−3z=−1 \\ y−z=0 \\ −x+2y=1 \end{array} \right. \)

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

    Answer

    \((x,y,z)\) where \(x=5z−2;\space y=4z−3;\space z\) is any real number

    Solve Applications using Systems of Linear Equations with Three Variables

    In the following exercises, solve the given problem.

    29. The sum of the measures of the angles of a triangle is 180. The sum of the measures of the second and third angles is twice the measure of the first angle. The third angle is twelve more than the second. Find the measures of the three angles.

    30. The sum of the measures of the angles of a triangle is 180. The sum of the measures of the second and third angles is three times the measure of the first angle. The third angle is fifteen more than the second. Find the measures of the three angles.

    Answer

    42, 50, 58

    31. After watching a major musical production at the theater, the patrons can purchase souvenirs. If a family purchases 4 t-shirts, the video, and 1 stuffed animal, their total is $135.

    A couple buys 2 t-shirts, the video, and 3 stuffed animals for their nieces and spends $115. Another couple buys 2 t-shirts, the video, and 1 stuffed animal and their total is $85. What is the cost of each item?

    32. The church youth group is selling snacks to raise money to attend their convention. Amy sold 2 pounds of candy, 3 boxes of cookies and 1 can of popcorn for a total sales of $65. Brian sold 4 pounds of candy, 6 boxes of cookies and 3 cans of popcorn for a total sales of $140. Paulina sold 8 pounds of candy, 8 boxes of cookies and 5 cans of popcorn for a total sales of $250. What is the cost of each item?

    Answer

    $20, $5, $10

    Writing Exercises

    33. In your own words explain the steps to solve a system of linear equations with three variables by elimination.

    34. How can you tell when a system of three linear equations with three variables has no solution? Infinitely many solutions?

    Answer

    Answers will vary.

    Self Check

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

    This table has 4 columns, 3 rows and a header row. The header row labels each column I can, confidently, with some help and no, I don’t get it. The first row contains the following statements: determine whether an ordered triple is a solution of a system of three linear equations with three variables, solve a system of linear equations with three variables, solve applications using systems of linear equations with three variables. The remaining columns are blank.

    ⓑ On a scale of 1-10, how would you rate your mastery of this section in light of your responses on the checklist? How can you improve this?


    This page titled 2.4: Solve Systems of Linear Equations with Three Variables is shared under a CC BY license and was authored, remixed, and/or curated by OpenStax.