Systems of Equations and Matrices · 5
Solving Systems with Gaussian Elimination
We need a systematic way to solve systems of three equations and three unknowns without going in circles as we eliminate variables.
1
The Staircase Target and the Augmented Matrix
We want to find the values of x x x , y y y , and z z z that satisfy all three equations at once:
x + 2 y + z = 3 2 x + 5 y + z = 2 3 x + 4 y + 2 z = 8 \displaystyle \begin{aligned}
x + 2y + z &= 3 \\
2x + 5y + z &= 2 \\
3x + 4y + 2z &= 8
\end{aligned} x + 2 y + z 2 x + 5 y + z 3 x + 4 y + 2 z = 3 = 2 = 8
If we combine equations at random, canceling one variable often brings back another variable we already eliminated. First, let's see what a system looks like when it is easy to solve, and how to write just the numbers from the equations before we start.
The Staircase System and the Augmented Matrix
1 x + 2 y + 1 z = 3 \displaystyle {\hspace{6.2em}\mathllap{\phantom{1}x + 2y + \phantom{1}z} = \mathrlap{3}\hspace{1.3em}} 1 x + 2 y + 1 z = 3 2 x + 5 y + 1 z = 2 \displaystyle {\hspace{6.2em}\mathllap{2x + 5y + \phantom{1}z} = \mathrlap{2}\hspace{1.3em}} 2 x + 5 y + 1 z = 2 3 x + 4 y + 2 z = 8 \displaystyle {\hspace{6.2em}\mathllap{3x + 4y + 2z} = \mathrlap{8}\hspace{1.3em}} 3 x + 4 y + 2 z = 8 ( x , y , z ) = ? \displaystyle {\rule{0pt}{1.6em}\hspace{6.2em}\mathllap{(x,\ y,\ z)} = \mathrlap{\;?}\hspace{1.3em}} ( x , y , z ) = ?
When a system is arranged in a staircase pattern, the bottom equation gives z z z right away, and we work upward by plugging each answer into the row above it (back-substitution ):
x + 2 y + z = 3 ⟹ x + 2 ( − 1 ) + 3 = 3 ⟹ x = 2 y − z = − 4 ⟹ y − 3 = − 4 ⟹ y = − 1 z = 3 \displaystyle \begin{aligned}
x + 2y + z &= 3 \\
&\implies x + 2(\found{-1}) + \found{3} = 3 \\
&\implies x = \found{2} \\[6pt]
y - z &= -4 \\
&\implies y - \found{3} = -4 \\
&\implies y = \found{-1} \\[6pt]
z &= \found{3}
\end{aligned} x + 2 y + z y − z z = 3 ⟹ x + 2 ( − 1 ) + 3 = 3 ⟹ x = 2 = − 4 ⟹ y − 3 = − 4 ⟹ y = − 1 = 3
To reach that staircase using our three legal moves (swapping two rows, multiplying or dividing a row by a nonzero number, and adding a multiple of one row to another), we put the numbers into an augmented matrix so we don't have to copy x x x , y y y , and z z z at every step:
[ 1 ↑ x 2 ↑ y 1 ↑ z 3 ↑ constants 2 5 1 2 3 4 2 8 ] \displaystyle \left[\begin{array}{ccc|c}
\underset{\substack{\uparrow \\ x}}{1} & \underset{\substack{\uparrow \\ y}}{2} & \underset{\substack{\uparrow \\ z}}{1} & \underset{\substack{\uparrow \\ \text{constants}}}{3} \\
2 & 5 & 1 & 2 \\
3 & 4 & 2 & 8
\end{array}\right] ↑ x 1 2 3 ↑ y 2 5 4 ↑ z 1 1 2 ↑ constants 3 2 8
Key idea For this system, a triangle of three zeros in the bottom-left corner and a nonzero entry in each diagonal spot leave z z z by itself in the bottom row, so we can solve for the remaining variables from the bottom up.
3
Gauss-Jordan Elimination: Clearing Above the Diagonal
Instead of switching back to equations to back-substitute, we can keep working in the staircase matrix and clear the numbers above the diagonal until each variable is by itself in its own row:
[ 1 2 1 3 0 1 − 1 − 4 0 0 1 3 ] ⟶ [ 1 0 0 2 0 1 0 − 1 0 0 1 3 ] ⏟ Reduced Row Echelon Form \displaystyle \left[\begin{array}{ccc|c}
1 & \cleared{2} & \cleared{1} & 3 \\
0 & 1 & \cleared{-1} & -4 \\
0 & 0 & 1 & 3
\end{array}\right]
\longrightarrow
\underbrace{\left[\begin{array}{ccc|c}
1 & \cleared{0} & \cleared{0} & \found{2} \\
0 & 1 & \cleared{0} & \found{-1} \\
0 & 0 & 1 & \found{3}
\end{array}\right]}_{\text{Reduced Row Echelon Form}} 1 0 0 2 1 0 1 − 1 1 3 − 4 3 ⟶ Reduced Row Echelon Form 1 0 0 0 1 0 0 0 1 2 − 1 3
Gauss-Jordan Elimination: Clearing Above the Diagonal
x y z \mathclap{\htmlClass{lc-mute}{x}}\hspace{2.79em}\mathclap{\htmlClass{lc-mute}{y}}\hspace{2.79em}\mathclap{\htmlClass{lc-mute}{z}} x y z R 1 \htmlClass{lc-mute}{R_1} R 1 1 \mathclap{\htmlClass{lc-pink}{1}} 1 2 1 \mathclap{\htmlClass{lc-green}{2}}\hspace{1.95em}\mathclap{\htmlClass{lc-green}{1}} 2 1 R 2 \htmlClass{lc-mute}{R_2} R 2 1 \mathclap{\htmlClass{lc-pink}{1}} 1 − 1 \mathclap{\htmlClass{lc-green}{-1}} − 1 R 3 \htmlClass{lc-mute}{R_3} R 3 0 0 \mathclap{0}\hspace{1.95em}\mathclap{0} 0 0 1 \mathclap{\htmlClass{lc-pink}{1}} 1
Text solution
Clear above the pivot in Column 3 Start at the bottom-right pivot
1 \pivot{1} 1 in Row 3 so its two leading zeros leave Columns 1 and 2 unchanged.
[ 1 2 1 3 0 1 − 1 − 4 0 0 1 3 ] → R 3 + R 2 → R 2 − R 3 + R 1 → R 1 [ 1 2 0 0 0 1 0 − 1 0 0 1 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & 2 & \cleared{1} & 3 \\
0 & 1 & \cleared{-1} & -4 \\
0 & 0 & \pivot{1} & 3
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{R_3 + R_2 \to R_2 \\[3pt] -R_3 + R_1 \to R_1}}}
\left[\begin{array}{ccc|c}
1 & 2 & \cleared{0} & 0 \\
0 & 1 & \cleared{0} & -1 \\
0 & 0 & 1 & 3
\end{array}\right]
\end{aligned} 1 0 0 2 1 0 1 − 1 1 3 − 4 3 R 3 + R 2 → R 2 − R 3 + R 1 → R 1 1 0 0 2 1 0 0 0 1 0 − 1 3
Clear above the pivot in Column 2 Move left to the middle pivot
1 \pivot{1} 1 in Row 2 and cancel the
2 \cleared{2} 2 above it in Row 1.
[ 1 2 0 0 0 1 0 − 1 0 0 1 3 ] → − 2 R 2 + R 1 → R 1 [ 1 0 0 2 0 1 0 − 1 0 0 1 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & \cleared{2} & 0 & 0 \\
0 & \pivot{1} & 0 & -1 \\
0 & 0 & 1 & 3
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-2R_2 + R_1 \to R_1}}
\left[\begin{array}{ccc|c}
1 & \cleared{0} & 0 & \found{2} \\
0 & 1 & 0 & \found{-1} \\
0 & 0 & 1 & \found{3}
\end{array}\right]
\end{aligned} 1 0 0 2 1 0 0 0 1 0 − 1 3 − 2 R 2 + R 1 → R 1 1 0 0 0 1 0 0 0 1 2 − 1 3
Reading straight across each row gives x = 2 x = \found{2} x = 2 , y = − 1 y = \found{-1} y = − 1 , and z = 3 z = \found{3} z = 3 , or ( 2 , − 1 , 3 ) \found{(2, -1, 3)} ( 2 , − 1 , 3 ) .
Key idea Clear downward from left to right, but clear upward from right to left so the zeros in front of each lower pivot keep the columns to the left from changing.
4
Handling Zero Pivots and Fractions
Now let's solve a system where the first equation is missing x x x and the remaining pivots aren't 1 \pivot{1} 1 :
y + z = 4 2 x + 3 y − z = 4 3 x + 2 y + z = 11 \displaystyle \begin{aligned}
y + z &= 4 \\
2x + 3y - z &= 4 \\
3x + 2y + z &= 11
\end{aligned} y + z 2 x + 3 y − z 3 x + 2 y + z = 4 = 4 = 11
A 0 0 0 in a pivot spot can't cancel anything below it, and dividing a row to make a pivot 1 \pivot{1} 1 can bring in fractions.
Handling Zero Pivots and Fractions
x y z \mathclap{\htmlClass{lc-mute}{x}}\hspace{2.79em}\mathclap{\htmlClass{lc-mute}{y}}\hspace{2.79em}\mathclap{\htmlClass{lc-mute}{z}} x y z R 1 \htmlClass{lc-mute}{R_1} R 1 1 1 \mathclap{1}\hspace{1.95em}\mathclap{1} 1 1 R 2 \htmlClass{lc-mute}{R_2} R 2 2 3 − 1 \mathclap{2}\hspace{1.95em}\mathclap{3}\hspace{1.95em}\mathclap{-1} 2 3 − 1 R 3 \htmlClass{lc-mute}{R_3} R 3 3 2 1 \mathclap{3}\hspace{1.95em}\mathclap{2}\hspace{1.95em}\mathclap{1} 3 2 1
Text solution
Swap rows to get a nonzero pivot Put
0 0 0 in the missing
x x x spot of Row 1 and swap it with Row 2, which also gives us a zero in Column 1 of Row 2 right away.
[ 0 1 1 4 2 3 − 1 4 3 2 1 11 ] → R 1 ↔ R 2 [ 2 3 − 1 4 0 1 1 4 3 2 1 11 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
0 & 1 & 1 & 4 \\
2 & 3 & -1 & 4 \\
3 & 2 & 1 & 11
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{R_1 \leftrightarrow R_2}}
\left[\begin{array}{ccc|c}
\pivot{2} & 3 & -1 & 4 \\
\cleared{0} & 1 & 1 & 4 \\
3 & 2 & 1 & 11
\end{array}\right]
\end{aligned} 0 2 3 1 3 2 1 − 1 1 4 4 11 R 1 ↔ R 2 2 0 3 3 1 2 − 1 1 1 4 4 11
Make the top-left pivot 1 \pivot{1} 1 and clear Column 1 Multiply Row 1 by
1 2 \rowop{\frac{1}{2}} 2 1 , then rewrite the whole numbers in Row 3 as halves (
4 2 \frac{4}{2} 2 4 and
2 2 \frac{2}{2} 2 2 ) to add
− 3 R 1 \rowop{-3R_1} − 3 R 1 straight down.
[ 2 3 − 1 4 0 1 1 4 3 2 1 11 ] → 1 2 R 1 → R 1 [ 1 3 2 − 1 2 2 0 1 1 4 3 4 2 2 2 11 ] → − 3 R 1 + R 3 → R 3 [ 1 3 2 − 1 2 2 0 1 1 4 0 − 5 2 5 2 5 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{2} & 3 & -1 & 4 \\
0 & 1 & 1 & 4 \\
3 & 2 & 1 & 11
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\frac{1}{2}R_1 \to R_1}}
\left[\begin{array}{ccc|c}
\pivot{1} & \frac{3}{2} & -\frac{1}{2} & 2 \\
0 & 1 & 1 & 4 \\
\cleared{3} & \frac{4}{2} & \frac{2}{2} & 11
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-3R_1 + R_3 \to R_3}} \\
&\left[\begin{array}{ccc|c}
1 & \frac{3}{2} & -\frac{1}{2} & 2 \\
0 & 1 & 1 & 4 \\
\cleared{0} & -\frac{5}{2} & \frac{5}{2} & 5
\end{array}\right]
\end{aligned} 2 0 3 3 1 2 − 1 1 1 4 4 11 2 1 R 1 → R 1 1 0 3 2 3 1 2 4 − 2 1 1 2 2 2 4 11 − 3 R 1 + R 3 → R 3 1 0 0 2 3 1 − 2 5 − 2 1 1 2 5 2 4 5
Clear Column 2 and make the bottom pivot 1 \pivot{1} 1 Cancel
− 5 2 \cleared{-\frac{5}{2}} − 2 5 using the middle pivot
1 \pivot{1} 1 in Row 2, then divide Row 3 by
5 \pivot{5} 5 .
[ 1 3 2 − 1 2 2 0 1 1 4 0 − 5 2 5 2 5 ] → 5 2 R 2 + R 3 → R 3 [ 1 3 2 − 1 2 2 0 1 1 4 0 0 5 15 ] → 1 5 R 3 → R 3 [ 1 3 2 − 1 2 2 0 1 1 4 0 0 1 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & \frac{3}{2} & -\frac{1}{2} & 2 \\
0 & \pivot{1} & 1 & 4 \\
0 & \cleared{-\frac{5}{2}} & \frac{5}{2} & 5
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\frac{5}{2}R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & \frac{3}{2} & -\frac{1}{2} & 2 \\
0 & 1 & 1 & 4 \\
0 & \cleared{0} & \pivot{5} & 15
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\frac{1}{5}R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & \frac{3}{2} & -\frac{1}{2} & 2 \\
0 & 1 & 1 & 4 \\
0 & 0 & \pivot{1} & 3
\end{array}\right]
\end{aligned} 1 0 0 2 3 1 − 2 5 − 2 1 1 2 5 2 4 5 2 5 R 2 + R 3 → R 3 1 0 0 2 3 1 0 − 2 1 1 5 2 4 15 5 1 R 3 → R 3 1 0 0 2 3 1 0 − 2 1 1 1 2 4 3
Back-substitute from the bottom row up Use
z = 3 z = \found{3} z = 3 in Row 2 to find
y y y , then plug both into Row 1 to find
x x x .
z = 3 y + 3 = 4 ⟹ y = 1 x + 3 2 ( 1 ) − 1 2 ( 3 ) = 2 ⟹ x = 2 \displaystyle \begin{aligned}
z &= \found{3} \\
y + \found{3} &= 4 \\
\implies y &= \found{1} \\
x + \tfrac{3}{2}(\found{1}) - \tfrac{1}{2}(\found{3}) &= 2 \\
\implies x &= \found{2}
\end{aligned} z y + 3 ⟹ y x + 2 3 ( 1 ) − 2 1 ( 3 ) ⟹ x = 3 = 4 = 1 = 2 = 2
So the solution is ( 2 , 1 , 3 ) \found{(2, 1, 3)} ( 2 , 1 , 3 ) . If you prefer not to work with fractions in a row like [ 0 − 5 2 5 2 5 ] \left[\begin{array}{ccc|c} 0 & -\frac{5}{2} & \frac{5}{2} & 5 \end{array}\right] [ 0 − 2 5 2 5 5 ] , you can also multiply that entire row by 2 \rowop{2} 2 at any time to clear its denominators.
Key idea If a pivot spot is 0 0 0 , look below it for a nonzero entry in that column and swap the rows. If every entry at and below the spot is 0 0 0 , move to the next column.
5
Systems with No Solution
Not every system of three equations has a point where all three meet. Let's see how the matrix tells us when there is no solution:
x + y + 2 z = 4 2 x + 3 y + 3 z = 5 3 x + 4 y + 5 z = 12 \displaystyle \begin{aligned}
x + y + 2z &= 4 \\
2x + 3y + 3z &= 5 \\
3x + 4y + 5z &= 12
\end{aligned} x + y + 2 z 2 x + 3 y + 3 z 3 x + 4 y + 5 z = 4 = 5 = 12
Systems with No Solution
1 x + 1 y + 2 z = 4 \displaystyle {\hspace{6.2em}\mathllap{\phantom{1}x + \phantom{1}y + 2z} = \mathrlap{4}\hspace{1.3em}} 1 x + 1 y + 2 z = 4 2 x + 3 y + 3 z = 5 \displaystyle {\hspace{6.2em}\mathllap{2x + 3y + 3z} = \mathrlap{5}\hspace{1.3em}} 2 x + 3 y + 3 z = 5 3 x + 4 y + 5 z = 12 \displaystyle {\hspace{6.2em}\mathllap{3x + 4y + 5z} = \mathrlap{12}\hspace{1.3em}} 3 x + 4 y + 5 z = 12 ( x , y , z ) = ? \displaystyle {\rule{0pt}{1.6em}\hspace{6.2em}\mathllap{(x,\ y,\ z)} = \mathrlap{\;?}\hspace{1.3em}} ( x , y , z ) = ?
Text solution
Clear Column 1 Use the top-left pivot
1 \pivot{1} 1 to cancel the
2 \cleared{2} 2 and
3 \cleared{3} 3 below it.
[ 1 1 2 4 2 3 3 5 3 4 5 12 ] → − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 [ 1 1 2 4 0 1 − 1 − 3 0 1 − 1 0 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{1} & 1 & 2 & 4 \\
\cleared{2} & 3 & 3 & 5 \\
\cleared{3} & 4 & 5 & 12
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{-2R_1 + R_2 \to R_2 \\[3pt] -3R_1 + R_3 \to R_3}}}
\left[\begin{array}{ccc|c}
1 & 1 & 2 & 4 \\
\cleared{0} & 1 & -1 & -3 \\
\cleared{0} & 1 & -1 & 0
\end{array}\right]
\end{aligned} 1 2 3 1 3 4 2 3 5 4 5 12 − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 1 0 0 1 1 1 2 − 1 − 1 4 − 3 0
Clear Column 2 and read the bottom row Subtract Row 2 from Row 3, which cancels both remaining variables in Row 3 at the same time.
[ 1 1 2 4 0 1 − 1 − 3 0 1 − 1 0 ] → − R 2 + R 3 → R 3 [ 1 1 2 4 0 1 − 1 − 3 0 0 0 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & 1 & 2 & 4 \\
0 & \pivot{1} & -1 & -3 \\
0 & \cleared{1} & \cleared{-1} & 0
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & 1 & 2 & 4 \\
0 & 1 & -1 & -3 \\
0 & \cleared{0} & \cleared{0} & \leftover{3}
\end{array}\right]
\end{aligned} 1 0 0 1 1 1 2 − 1 − 1 4 − 3 0 − R 2 + R 3 → R 3 1 0 0 1 1 0 2 − 1 0 4 − 3 3
Putting the variables back on the bottom row gives 0 x + 0 y + 0 z = 3 0x + 0y + 0z = \leftover{3} 0 x + 0 y + 0 z = 3 , or 0 = 3 0 = \leftover{3} 0 = 3 , which is impossible, so the system has No Solution .
Key idea The moment any row turns into [ 0 0 0 nonzero ] \left[\begin{array}{ccc|c} 0 & 0 & 0 & \leftover{\text{nonzero}} \end{array}\right] [ 0 0 0 nonzero ] , stop right away. That row says 0 0 0 equals a nonzero number, so there is no solution.
6
Infinitely Many Solutions and Free Variables
Now compare what happens when an entire row, including the number on the right, cancels out to zero:
x + y − z = 2 2 x + 3 y − z = 7 3 x + 4 y − 2 z = 9 \displaystyle \begin{aligned}
x + y - z &= 2 \\
2x + 3y - z &= 7 \\
3x + 4y - 2z &= 9
\end{aligned} x + y − z 2 x + 3 y − z 3 x + 4 y − 2 z = 2 = 7 = 9
Infinitely Many Solutions and Free Variables
x y z \mathclap{\htmlClass{lc-mute}{x}}\hspace{2.79em}\mathclap{\htmlClass{lc-mute}{y}}\hspace{2.79em}\mathclap{\htmlClass{lc-mute}{z}} x y z R 1 \htmlClass{lc-mute}{R_1} R 1 1 1 − 1 \mathclap{1}\hspace{1.95em}\mathclap{1}\hspace{1.95em}\mathclap{-1} 1 1 − 1 R 2 \htmlClass{lc-mute}{R_2} R 2 2 3 − 1 \mathclap{2}\hspace{1.95em}\mathclap{3}\hspace{1.95em}\mathclap{-1} 2 3 − 1 R 3 \htmlClass{lc-mute}{R_3} R 3 3 4 − 2 \mathclap{3}\hspace{1.95em}\mathclap{4}\hspace{1.95em}\mathclap{-2} 3 4 − 2 ( x , y , z ) = ? (x,\ y,\ z) = \;? ( x , y , z ) = ?
Text solution
Clear Column 1 Use the top-left pivot
1 \pivot{1} 1 to cancel the
2 \cleared{2} 2 and
3 \cleared{3} 3 below it.
[ 1 1 − 1 2 2 3 − 1 7 3 4 − 2 9 ] → − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 [ 1 1 − 1 2 0 1 1 3 0 1 1 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{1} & 1 & -1 & 2 \\
\cleared{2} & 3 & -1 & 7 \\
\cleared{3} & 4 & -2 & 9
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{-2R_1 + R_2 \to R_2 \\[3pt] -3R_1 + R_3 \to R_3}}}
\left[\begin{array}{ccc|c}
1 & 1 & -1 & 2 \\
\cleared{0} & 1 & 1 & 3 \\
\cleared{0} & 1 & 1 & 3
\end{array}\right]
\end{aligned} 1 2 3 1 3 4 − 1 − 1 − 2 2 7 9 − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 1 0 0 1 1 1 − 1 1 1 2 3 3
Clear Column 2 Subtract Row 2 from the identical Row 3, leaving a bottom row of all zeros and two remaining equations.
[ 1 1 − 1 2 0 1 1 3 0 1 1 3 ] → − R 2 + R 3 → R 3 [ 1 ↑ pivot 1 − 1 2 0 1 ↑ pivot 1 ↑ free variable 3 0 0 0 0 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & 1 & -1 & 2 \\
0 & \pivot{1} & 1 & 3 \\
0 & \cleared{1} & \cleared{1} & \cleared{3}
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-R_2 + R_3 \to R_3}} \\
&\left[\begin{array}{ccc|c}
\underset{\pivot{\substack{\uparrow \\ \text{pivot}}}}{\pivot{1}} & 1 & -1 & 2 \\
0 & \underset{\pivot{\substack{\uparrow \\ \text{pivot}}}}{\pivot{1}} & \underset{\found{\substack{\uparrow \\ \text{free} \\ \text{variable}}}}{1} & 3 \\
0 & \cleared{0} & \cleared{0} & \cleared{0}
\end{array}\right]
\end{aligned} 1 0 0 1 1 1 − 1 1 1 2 3 3 − R 2 + R 3 → R 3 ↑ pivot 1 0 0 1 ↑ pivot 1 0 − 1 ↑ free variable 1 0 2 3 0
Set the free variable to t \found{t} t and back-substitute Because Column 3 (
z z z ) has no leading
1 \pivot{1} 1 , set the
free variable z = t z = \found{t} z = t (a
parameter ) and solve the two remaining equations from the bottom up in terms of
t \found{t} t .
z = t y + t = 3 ⟹ y = 3 − t x + ( 3 − t ) − t = 2 ⟹ x = 2 t − 1 \displaystyle \begin{aligned}
z &= \found{t} \\
y + \found{t} &= 3 \\
\implies y &= \found{3 - t} \\
x + (\found{3 - t}) - \found{t} &= 2 \\
\implies x &= \found{2t - 1}
\end{aligned} z y + t ⟹ y x + ( 3 − t ) − t ⟹ x = t = 3 = 3 − t = 2 = 2 t − 1
The system has Infinitely Many Solutions , given by the formula ( 2 t − 1 , 3 − t , t ) \found{(2t - 1, 3 - t, t)} ( 2 t − 1 , 3 − t , t ) for any real number t \found{t} t (or ( 2 z − 1 , 3 − z , z ) \found{(2z - 1, 3 - z, z)} ( 2 z − 1 , 3 − z , z ) ) .
Key idea In this completed staircase, the zero row leaves two pivot variables and one free variable. We can choose z = t z = \found{t} z = t to be any real number, and x x x and y y y depend on t \found{t} t .
Geometrically, ( 2 t − 1 , 3 − t , t ) \found{(2t - 1, 3 - t, t)} ( 2 t − 1 , 3 − t , t ) gives every point on the line where all three planes meet; points off that line don't satisfy the system.
Every point along the intersection line makes all three equations work at once, while any point off the line breaks at least two of them.
Key concepts
Write the augmented matrix and work column by column from left to right. If a pivot spot is 0 0 0 , look below it for a nonzero entry in that column and swap the rows (R 1 ↔ R 2 \rowop{R_1 \leftrightarrow R_2} R 1 ↔ R 2 ) . If every entry at and below that spot is 0 0 0 , move to the next column. You can divide a row by its nonzero pivot to make the pivot 1 \pivot{1} 1 (1 2 R 1 → R 1 \rowop{\frac{1}{2}R_1 \to R_1} 2 1 R 1 → R 1 ) . Clear the entries below each pivot and leave that pivot row alone while clearing below later pivots, so 0 + 0 = 0 \cleared{0} + \cleared{0} = \cleared{0} 0 + 0 = 0 keeps the zeros you already made.
Once you reach the Row Echelon staircase [ 1 2 1 3 0 1 − 1 − 4 0 0 1 3 ] \left[\begin{array}{ccc|c} \pivot{1} & 2 & 1 & 3 \\ \cleared{0} & \pivot{1} & -1 & -4 \\ \cleared{0} & \cleared{0} & \pivot{1} & 3 \end{array}\right] 1 0 0 2 1 0 1 − 1 1 3 − 4 3 , stop and back-substitute upward (Gaussian elimination ). Only keep clearing above the diagonal from right to left if a problem asks for Gauss-Jordan elimination or Reduced Row Echelon Form [ 1 0 0 2 0 1 0 − 1 0 0 1 3 ] \left[\begin{array}{ccc|c} \pivot{1} & 0 & 0 & \found{2} \\ 0 & \pivot{1} & 0 & \found{-1} \\ 0 & 0 & \pivot{1} & \found{3} \end{array}\right] 1 0 0 0 1 0 0 0 1 2 − 1 3 .
If clearing a column cancels all the variables in a row at once, look at the number on the right. A row like [ 0 0 0 3 ] \left[\begin{array}{ccc|c} 0 & 0 & 0 & \leftover{3} \end{array}\right] [ 0 0 0 3 ] says 0 = 3 0 = \leftover{3} 0 = 3 , which means No Solution . A row of all zeros [ 0 0 0 0 ] \left[\begin{array}{ccc|c} 0 & 0 & 0 & 0 \end{array}\right] [ 0 0 0 0 ] says 0 = 0 0 = 0 0 = 0 . Finish clearing the remaining rows and check for a contradiction. If there is none, each variable without a pivot is free, and the system has Infinitely Many Solutions , like ( 2 t − 1 , 3 − t , t ) \found{(2t - 1, 3 - t, t)} ( 2 t − 1 , 3 − t , t ) .
7
Practice
1 Solve the system using Gaussian elimination and back-substitution:
x + y + z = 2 2 x + 3 y + 4 z = 4 3 x + y + 2 z = 3 \displaystyle \begin{aligned}
x + y + z &= 2 \\
2x + 3y + 4z &= 4 \\
3x + y + 2z &= 3
\end{aligned} x + y + z 2 x + 3 y + 4 z 3 x + y + 2 z = 2 = 4 = 3
Watch the sign when solving Row 2: y + 2 ( − 1 ) = 0 y + 2(\found{-1}) = 0 y + 2 ( − 1 ) = 0 adds 2 2 2 to both sides to give y = 2 y = \found{2} y = 2 (leaving it negative as y = − 2 y = -2 y = − 2 leads to the wrong answer ( 5 , − 2 , − 1 ) (5, -2, -1) ( 5 , − 2 , − 1 ) ) .
Check Hint
Column 1 already has a 1 \pivot{1} 1 in the top-left corner. What multiples of Row 1 cancel the 2 \cleared{2} 2 and 3 \cleared{3} 3 below it?
Explain
Clear Column 1 Use the top-left
1 \pivot{1} 1 in Row 1 to cancel the
2 \cleared{2} 2 and
3 \cleared{3} 3 below it.
[ 1 1 1 2 2 3 4 4 3 1 2 3 ] → − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 [ 1 1 1 2 0 1 2 0 0 − 2 − 1 − 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{1} & 1 & 1 & 2 \\
\cleared{2} & 3 & 4 & 4 \\
\cleared{3} & 1 & 2 & 3
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{-2R_1 + R_2 \to R_2 \\[3pt] -3R_1 + R_3 \to R_3}}}
\left[\begin{array}{ccc|c}
1 & 1 & 1 & 2 \\
\cleared{0} & 1 & 2 & 0 \\
\cleared{0} & -2 & -1 & -3
\end{array}\right]
\end{aligned} 1 2 3 1 3 1 1 4 2 2 4 3 − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 1 0 0 1 1 − 2 1 2 − 1 2 0 − 3
Clear Column 2 and make the bottom pivot 1 \pivot{1} 1 Use Row 2 to cancel the
− 2 \cleared{-2} − 2 in Row 3, then divide Row 3 by
3 \pivot{3} 3 .
[ 1 1 1 2 0 1 2 0 0 − 2 − 1 − 3 ] → 2 R 2 + R 3 → R 3 [ 1 1 1 2 0 1 2 0 0 0 3 − 3 ] → 1 3 R 3 → R 3 [ 1 1 1 2 0 1 2 0 0 0 1 − 1 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & 1 & 1 & 2 \\
0 & \pivot{1} & 2 & 0 \\
0 & \cleared{-2} & -1 & -3
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{2R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & 1 & 1 & 2 \\
0 & 1 & 2 & 0 \\
0 & \cleared{0} & \pivot{3} & -3
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\frac{1}{3}R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & 1 & 1 & 2 \\
0 & 1 & 2 & 0 \\
0 & 0 & \pivot{1} & -1
\end{array}\right]
\end{aligned} 1 0 0 1 1 − 2 1 2 − 1 2 0 − 3 2 R 2 + R 3 → R 3 1 0 0 1 1 0 1 2 3 2 0 − 3 3 1 R 3 → R 3 1 0 0 1 1 0 1 2 1 2 0 − 1
Back-substitute Watch the sign when solving Row 2:
y + 2 ( − 1 ) = 0 y + 2(\found{-1}) = 0 y + 2 ( − 1 ) = 0 adds
2 2 2 to both sides to give
y = 2 y = \found{2} y = 2 (leaving it negative as
y = − 2 y = -2 y = − 2 leads to the wrong answer
( 5 , − 2 , − 1 ) (5, -2, -1) ( 5 , − 2 , − 1 ) ).
z = − 1 y + 2 ( − 1 ) = 0 ⟹ y = 2 x + 2 + ( − 1 ) = 2 ⟹ x = 1 \displaystyle \begin{aligned}
z &= \found{-1} \\
y + 2(\found{-1}) &= 0 \\
\implies y &= \found{2} \\
x + \found{2} + (\found{-1}) &= 2 \\
\implies x &= \found{1}
\end{aligned} z y + 2 ( − 1 ) ⟹ y x + 2 + ( − 1 ) ⟹ x = − 1 = 0 = 2 = 2 = 1
Answer ( 1 , 2 , − 1 ) (1, 2, -1) ( 1 , 2 , − 1 )
2 Solve the system using Gauss-Jordan elimination by reducing the augmented matrix to Reduced Row Echelon Form:
x − y + 2 z = 7 2 x − y + 3 z = 11 x + y + z = 2 \displaystyle \begin{aligned}
x - y + 2z &= 7 \\
2x - y + 3z &= 11 \\
x + y + z &= 2
\end{aligned} x − y + 2 z 2 x − y + 3 z x + y + z = 7 = 11 = 2
When computing − R 1 + R 3 \rowop{-R_1 + R_3} − R 1 + R 3 in Column 2, be careful with the negative sign on − 1 -1 − 1 : − ( − 1 ) + 1 = 2 -(-1) + 1 = 2 − ( − 1 ) + 1 = 2 (writing 1 − 1 = 0 1 - 1 = 0 1 − 1 = 0 turns Row 3 into [ 0 0 − 1 − 5 ] \left[\begin{array}{ccc|c} 0 & 0 & -1 & -5 \end{array}\right] [ 0 0 − 1 − 5 ] and gives the wrong answer ( − 1 , 2 , 5 ) (-1, 2, 5) ( − 1 , 2 , 5 ) ) .
Check Hint
Once you reach the staircase, start at the bottom-right pivot in Column 3 and clear upward from right to left.
Explain
Clear Column 1 When computing
− R 1 + R 3 \rowop{-R_1 + R_3} − R 1 + R 3 in Column 2, be careful with the negative sign on
− 1 -1 − 1 : − ( − 1 ) + 1 = 2 -(-1) + 1 = 2 − ( − 1 ) + 1 = 2 (writing
1 − 1 = 0 1 - 1 = 0 1 − 1 = 0 turns Row 3 into
[ 0 0 − 1 − 5 ] \left[\begin{array}{ccc|c} 0 & 0 & -1 & -5 \end{array}\right] [ 0 0 − 1 − 5 ] and gives the wrong answer
( − 1 , 2 , 5 ) (-1, 2, 5) ( − 1 , 2 , 5 ) ).
[ 1 − 1 2 7 2 − 1 3 11 1 1 1 2 ] → − 2 R 1 + R 2 → R 2 − R 1 + R 3 → R 3 [ 1 − 1 2 7 0 1 − 1 − 3 0 2 − 1 − 5 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{1} & -1 & 2 & 7 \\
\cleared{2} & -1 & 3 & 11 \\
\cleared{1} & 1 & 1 & 2
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{-2R_1 + R_2 \to R_2 \\[3pt] -R_1 + R_3 \to R_3}}}
\left[\begin{array}{ccc|c}
1 & -1 & 2 & 7 \\
\cleared{0} & 1 & -1 & -3 \\
\cleared{0} & 2 & -1 & -5
\end{array}\right]
\end{aligned} 1 2 1 − 1 − 1 1 2 3 1 7 11 2 − 2 R 1 + R 2 → R 2 − R 1 + R 3 → R 3 1 0 0 − 1 1 2 2 − 1 − 1 7 − 3 − 5
Clear Column 2 Use the middle pivot
1 \pivot{1} 1 in Row 2 to cancel the
2 \cleared{2} 2 below it.
[ 1 − 1 2 7 0 1 − 1 − 3 0 2 − 1 − 5 ] → − 2 R 2 + R 3 → R 3 [ 1 − 1 2 7 0 1 − 1 − 3 0 0 1 1 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & -1 & 2 & 7 \\
0 & \pivot{1} & -1 & -3 \\
0 & \cleared{2} & -1 & -5
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-2R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & -1 & 2 & 7 \\
0 & 1 & -1 & -3 \\
0 & \cleared{0} & 1 & 1
\end{array}\right]
\end{aligned} 1 0 0 − 1 1 2 2 − 1 − 1 7 − 3 − 5 − 2 R 2 + R 3 → R 3 1 0 0 − 1 1 0 2 − 1 1 7 − 3 1
Clear above Column 3, then above Column 2 Work from right to left so the zeros in Row 3 keep Columns 1 and 2 from changing.
[ 1 − 1 2 7 0 1 − 1 − 3 0 0 1 1 ] → R 3 + R 2 → R 2 − 2 R 3 + R 1 → R 1 [ 1 − 1 0 5 0 1 0 − 2 0 0 1 1 ] → R 2 + R 1 → R 1 [ 1 0 0 3 0 1 0 − 2 0 0 1 1 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & -1 & \cleared{2} & 7 \\
0 & 1 & \cleared{-1} & -3 \\
0 & 0 & \pivot{1} & 1
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{R_3 + R_2 \to R_2 \\[3pt] -2R_3 + R_1 \to R_1}}}
\left[\begin{array}{ccc|c}
1 & \cleared{-1} & \cleared{0} & 5 \\
0 & \pivot{1} & \cleared{0} & -2 \\
0 & 0 & 1 & 1
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{R_2 + R_1 \to R_1}}
\left[\begin{array}{ccc|c}
1 & \cleared{0} & 0 & \found{3} \\
0 & 1 & 0 & \found{-2} \\
0 & 0 & 1 & \found{1}
\end{array}\right]
\end{aligned} 1 0 0 − 1 1 0 2 − 1 1 7 − 3 1 R 3 + R 2 → R 2 − 2 R 3 + R 1 → R 1 1 0 0 − 1 1 0 0 0 1 5 − 2 1 R 2 + R 1 → R 1 1 0 0 0 1 0 0 0 1 3 − 2 1
Answer [ 1 0 0 3 0 1 0 − 2 0 0 1 1 ] \left[\begin{array}{ccc|c} 1 & 0 & 0 & 3 \\ 0 & 1 & 0 & -2 \\ 0 & 0 & 1 & 1 \end{array}\right] 1 0 0 0 1 0 0 0 1 3 − 2 1 , so
( 3 , − 2 , 1 ) (3, -2, 1) ( 3 , − 2 , 1 )
3 Solve the system using Gaussian elimination:
y + 2 z = 3 2 x + y − z = 5 3 x + 2 y + z = 12 \displaystyle \begin{aligned}
y + 2z &= 3 \\
2x + y - z &= 5 \\
3x + 2y + z &= 12
\end{aligned} y + 2 z 2 x + y − z 3 x + 2 y + z = 3 = 5 = 12
Put a 0 0 0 in Column 1 of Row 1 for the missing x x x term (putting y + 2 z y + 2z y + 2 z into the first two columns as [ 1 2 0 3 ] \left[\begin{array}{ccc|c} 1 & 2 & 0 & 3 \end{array}\right] [ 1 2 0 3 ] gives the wrong answer ( 25 7 , − 2 7 , 13 7 ) \left(\tfrac{25}{7}, -\tfrac{2}{7}, \tfrac{13}{7}\right) ( 7 25 , − 7 2 , 7 13 ) ) , then swap Row 1 and Row 2.
Check Hint
The first equation has no x x x term. What is your first move when the top-left pivot spot has a 0 0 0 ?
Explain
Write the augmented matrix and swap rows Put a
0 0 0 in Column 1 of Row 1 for the missing
x x x term (putting
y + 2 z y + 2z y + 2 z into the first two columns as
[ 1 2 0 3 ] \left[\begin{array}{ccc|c} 1 & 2 & 0 & 3 \end{array}\right] [ 1 2 0 3 ] gives the wrong answer
( 25 7 , − 2 7 , 13 7 ) \left(\tfrac{25}{7}, -\tfrac{2}{7}, \tfrac{13}{7}\right) ( 7 25 , − 7 2 , 7 13 ) ), then swap Row 1 and Row 2.
[ 0 1 2 3 2 1 − 1 5 3 2 1 12 ] → R 1 ↔ R 2 [ 2 1 − 1 5 0 1 2 3 3 2 1 12 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
0 & 1 & 2 & 3 \\
2 & 1 & -1 & 5 \\
3 & 2 & 1 & 12
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{R_1 \leftrightarrow R_2}}
\left[\begin{array}{ccc|c}
\pivot{2} & 1 & -1 & 5 \\
\cleared{0} & 1 & 2 & 3 \\
3 & 2 & 1 & 12
\end{array}\right]
\end{aligned} 0 2 3 1 1 2 2 − 1 1 3 5 12 R 1 ↔ R 2 2 0 3 1 1 2 − 1 2 1 5 3 12
Make the top-left pivot 1 \pivot{1} 1 and clear Column 1 Divide Row 1 by
2 \pivot{2} 2 , then write Row 3 in halves to add
− 3 R 1 + R 3 \rowop{-3R_1 + R_3} − 3 R 1 + R 3 .
[ 2 1 − 1 5 0 1 2 3 3 2 1 12 ] → 1 2 R 1 → R 1 [ 1 1 2 − 1 2 5 2 0 1 2 3 3 4 2 2 2 24 2 ] → − 3 R 1 + R 3 → R 3 [ 1 1 2 − 1 2 5 2 0 1 2 3 0 1 2 5 2 9 2 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{2} & 1 & -1 & 5 \\
0 & 1 & 2 & 3 \\
3 & 2 & 1 & 12
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\frac{1}{2}R_1 \to R_1}}
\left[\begin{array}{ccc|c}
\pivot{1} & \frac{1}{2} & -\frac{1}{2} & \frac{5}{2} \\
0 & 1 & 2 & 3 \\
\cleared{3} & \frac{4}{2} & \frac{2}{2} & \frac{24}{2}
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-3R_1 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & \frac{1}{2} & -\frac{1}{2} & \frac{5}{2} \\
0 & 1 & 2 & 3 \\
\cleared{0} & \frac{1}{2} & \frac{5}{2} & \frac{9}{2}
\end{array}\right]
\end{aligned} 2 0 3 1 1 2 − 1 2 1 5 3 12 2 1 R 1 → R 1 1 0 3 2 1 1 2 4 − 2 1 2 2 2 2 5 3 2 24 − 3 R 1 + R 3 → R 3 1 0 0 2 1 1 2 1 − 2 1 2 2 5 2 5 3 2 9
Clear Column 2 and make the bottom pivot 1 \pivot{1} 1 Subtract
1 2 R 2 \rowop{\frac{1}{2}R_2} 2 1 R 2 from Row 3, then multiply Row 3 by
2 3 \rowop{\frac{2}{3}} 3 2 .
[ 1 1 2 − 1 2 5 2 0 1 2 3 0 1 2 5 2 9 2 ] → − 1 2 R 2 + R 3 → R 3 [ 1 1 2 − 1 2 5 2 0 1 2 3 0 0 3 2 3 ] → 2 3 R 3 → R 3 [ 1 1 2 − 1 2 5 2 0 1 2 3 0 0 1 2 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & \frac{1}{2} & -\frac{1}{2} & \frac{5}{2} \\
0 & \pivot{1} & 2 & 3 \\
0 & \cleared{\frac{1}{2}} & \frac{5}{2} & \frac{9}{2}
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-\frac{1}{2}R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & \frac{1}{2} & -\frac{1}{2} & \frac{5}{2} \\
0 & 1 & 2 & 3 \\
0 & \cleared{0} & \pivot{\frac{3}{2}} & 3
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\frac{2}{3}R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & \frac{1}{2} & -\frac{1}{2} & \frac{5}{2} \\
0 & 1 & 2 & 3 \\
0 & 0 & \pivot{1} & 2
\end{array}\right]
\end{aligned} 1 0 0 2 1 1 2 1 − 2 1 2 2 5 2 5 3 2 9 − 2 1 R 2 + R 3 → R 3 1 0 0 2 1 1 0 − 2 1 2 2 3 2 5 3 3 3 2 R 3 → R 3 1 0 0 2 1 1 0 − 2 1 2 1 2 5 3 2
Back-substitute Work from Row 3 up to Row 1.
z = 2 y + 2 ( 2 ) = 3 ⟹ y = − 1 x + 1 2 ( − 1 ) − 1 2 ( 2 ) = 5 2 ⟹ x = 4 \displaystyle \begin{aligned}
z &= \found{2} \\
y + 2(\found{2}) &= 3 \\
\implies y &= \found{-1} \\
x + \tfrac{1}{2}(\found{-1}) - \tfrac{1}{2}(\found{2}) &= \tfrac{5}{2} \\
\implies x &= \found{4}
\end{aligned} z y + 2 ( 2 ) ⟹ y x + 2 1 ( − 1 ) − 2 1 ( 2 ) ⟹ x = 2 = 3 = − 1 = 2 5 = 4
Answer ( 4 , − 1 , 2 ) (4, -1, 2) ( 4 , − 1 , 2 )
4 Solve the system using Gaussian elimination:
x − y + 2 z = 3 2 x − y + 3 z = 8 3 x − y + 4 z = 10 \displaystyle \begin{aligned}
x - y + 2z &= 3 \\
2x - y + 3z &= 8 \\
3x - y + 4z &= 10
\end{aligned} x − y + 2 z 2 x − y + 3 z 3 x − y + 4 z = 3 = 8 = 10
Explain
Clear Column 1 Use the top-left
1 \pivot{1} 1 in Row 1 to cancel the
2 \cleared{2} 2 and
3 \cleared{3} 3 below it.
[ 1 − 1 2 3 2 − 1 3 8 3 − 1 4 10 ] → − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 [ 1 − 1 2 3 0 1 − 1 2 0 2 − 2 1 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{1} & -1 & 2 & 3 \\
\cleared{2} & -1 & 3 & 8 \\
\cleared{3} & -1 & 4 & 10
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{-2R_1 + R_2 \to R_2 \\[3pt] -3R_1 + R_3 \to R_3}}}
\left[\begin{array}{ccc|c}
1 & -1 & 2 & 3 \\
\cleared{0} & 1 & -1 & 2 \\
\cleared{0} & 2 & -2 & 1
\end{array}\right]
\end{aligned} 1 2 3 − 1 − 1 − 1 2 3 4 3 8 10 − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 1 0 0 − 1 1 2 2 − 1 − 2 3 2 1
Clear Column 2 Subtract
2 R 2 \rowop{2R_2} 2 R 2 from Row 3. Notice that all three variables in Row 3 cancel out while
− 3 \leftover{-3} − 3 remains on the right, meaning
0 = − 3 0 = \leftover{-3} 0 = − 3 (misreading
[ 0 0 0 − 3 ] \left[\begin{array}{ccc|c} 0 & 0 & 0 & \leftover{-3} \end{array}\right] [ 0 0 0 − 3 ] as
z = − 3 z = -3 z = − 3 gives the wrong answer
( − 1 , − 1 , − 3 ) (-1, -1, -3) ( − 1 , − 1 , − 3 ) ).
[ 1 − 1 2 3 0 1 − 1 2 0 2 − 2 1 ] → − 2 R 2 + R 3 → R 3 [ 1 − 1 2 3 0 1 − 1 2 0 0 0 − 3 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & -1 & 2 & 3 \\
0 & \pivot{1} & -1 & 2 \\
0 & \cleared{2} & \cleared{-2} & 1
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-2R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & -1 & 2 & 3 \\
0 & 1 & -1 & 2 \\
0 & \cleared{0} & \cleared{0} & \leftover{-3}
\end{array}\right]
\end{aligned} 1 0 0 − 1 1 2 2 − 1 − 2 3 2 1 − 2 R 2 + R 3 → R 3 1 0 0 − 1 1 0 2 − 1 0 3 2 − 3
Answer No Solution (Row 3 becomes
[ 0 0 0 ∣ − 3 ] [0\;\; 0\;\; 0 \mid -3] [ 0 0 0 ∣ − 3 ] , which says
0 = − 3 0 = -3 0 = − 3 )
5 Solve the system using Gaussian elimination, writing the solution in terms of the parameter t t t where z = t z = t z = t if there are infinitely many solutions:
x + 2 y − z = 1 2 x + 5 y − 4 z = 5 3 x + 8 y − 7 z = 9 \displaystyle \begin{aligned}
x + 2y - z &= 1 \\
2x + 5y - 4z &= 5 \\
3x + 8y - 7z &= 9
\end{aligned} x + 2 y − z 2 x + 5 y − 4 z 3 x + 8 y − 7 z = 1 = 5 = 9
Check Hint
After clearing Column 1 and Column 2, check which column has no leading 1 \pivot{1} 1 . That variable becomes your parameter t \found{t} t .
Explain
Clear Column 1 Use the top-left
1 \pivot{1} 1 in Row 1 to cancel the
2 \cleared{2} 2 and
3 \cleared{3} 3 below it.
[ 1 2 − 1 1 2 5 − 4 5 3 8 − 7 9 ] → − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 [ 1 2 − 1 1 0 1 − 2 3 0 2 − 4 6 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
\pivot{1} & 2 & -1 & 1 \\
\cleared{2} & 5 & -4 & 5 \\
\cleared{3} & 8 & -7 & 9
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{\substack{-2R_1 + R_2 \to R_2 \\[3pt] -3R_1 + R_3 \to R_3}}}
\left[\begin{array}{ccc|c}
1 & 2 & -1 & 1 \\
\cleared{0} & 1 & -2 & 3 \\
\cleared{0} & 2 & -4 & 6
\end{array}\right]
\end{aligned} 1 2 3 2 5 8 − 1 − 4 − 7 1 5 9 − 2 R 1 + R 2 → R 2 − 3 R 1 + R 3 → R 3 1 0 0 2 1 2 − 1 − 2 − 4 1 3 6
Clear Column 2 Subtract
2 R 2 \rowop{2R_2} 2 R 2 from Row 3, which turns the entire bottom row into
[ 0 0 0 0 ] \left[\begin{array}{ccc|c} 0 & \cleared{0} & \cleared{0} & \cleared{0} \end{array}\right] [ 0 0 0 0 ] .
[ 1 2 − 1 1 0 1 − 2 3 0 2 − 4 6 ] → − 2 R 2 + R 3 → R 3 [ 1 2 − 1 1 0 1 − 2 3 0 0 0 0 ] \displaystyle \begin{aligned}
&\left[\begin{array}{ccc|c}
1 & 2 & -1 & 1 \\
0 & \pivot{1} & -2 & 3 \\
0 & \cleared{2} & \cleared{-4} & \cleared{6}
\end{array}\right]
\\[8pt]
&\xrightarrow{\rowop{-2R_2 + R_3 \to R_3}}
\left[\begin{array}{ccc|c}
1 & 2 & -1 & 1 \\
0 & 1 & -2 & 3 \\
0 & \cleared{0} & \cleared{0} & \cleared{0}
\end{array}\right]
\end{aligned} 1 0 0 2 1 2 − 1 − 2 − 4 1 3 6 − 2 R 2 + R 3 → R 3 1 0 0 2 1 0 − 1 − 2 0 1 3 0
Set z = t z = \found{t} z = t and back-substitute When plugging
y = 2 t + 3 y = \found{2t + 3} y = 2 t + 3 into Row 1, distribute the
2 2 2 to both terms to get
2 ( 2 t + 3 ) = 4 t + 6 2(\found{2t + 3}) = 4t + 6 2 ( 2 t + 3 ) = 4 t + 6 (forgetting to multiply the
3 3 3 by
2 2 2 gives the wrong answer
( − 3 t − 2 , 2 t + 3 , t ) (-3t - 2, 2t + 3, t) ( − 3 t − 2 , 2 t + 3 , t ) ).
z = t y − 2 t = 3 ⟹ y = 2 t + 3 x + 2 ( 2 t + 3 ) − t = 1 ⟹ x = − 3 t − 5 \displaystyle \begin{aligned}
z &= \found{t} \\
y - 2\found{t} &= 3 \\
\implies y &= \found{2t + 3} \\
x + 2(\found{2t + 3}) - \found{t} &= 1 \\
\implies x &= \found{-3t - 5}
\end{aligned} z y − 2 t ⟹ y x + 2 ( 2 t + 3 ) − t ⟹ x = t = 3 = 2 t + 3 = 1 = − 3 t − 5
Answer Infinitely Many Solutions:
( − 3 t − 5 , 2 t + 3 , t ) (-3t - 5, 2t + 3, t) ( − 3 t − 5 , 2 t + 3 , t ) (or
( − 3 z − 5 , 2 z + 3 , z ) (-3z - 5, 2z + 3, z) ( − 3 z − 5 , 2 z + 3 , z ) )