The pivot of row 1 is its leading 1. Replace R2 with R2−2R1 and R3 with R3−R1, which subtracts whole equations, constants included, so the solutions stay the same. Both entries below the pivot become 0.
⎣⎡1001−311−1−2∣∣∣∣∣∣6−9−4⎦⎤
2
Clear the second column
Swap R2 and R3 so that the second pivot is 1, which avoids fractions. A swap only reorders the equations. Then replace the new R3 with R3+3R2 to clear the entry below that pivot.
⎣⎡1001101−2−7∣∣∣∣∣∣6−4−21⎦⎤
3
Back-substitute
The matrix is now in row echelon form, and its last row says −7z=−21, so z=3. Row 2 says y−2z=−4, which gives y=−4+6=2. Row 1 says x+y+z=6, which gives x=6−2−3=1.
−7z=−21z=3
4
Or finish to RREF
Scaling R3by −1/7 and clearing the entries above each pivot leaves the identity matrix on the left. Every column has a pivot, so the solution is unique, and the last column lists it.
⎣⎡100010001∣∣∣∣∣∣123⎦⎤
5
Check
Substitute (1,2,3) into each original equation, not into the reduced rows.
1+2+3=62⋅1−2+3=31+2⋅2−3=2
Result
x=1,y=2,z=3. The three planes meet in the single point (1,2,3).
Your turn
1. One like the example
Solve x−y+2z=5,2x+y−z=2 and x+2y+z=1 by row reduction.
Show the answer and explanation
x=2,y=−1 and z=1.
R2−2R1 gives 0, 3, −5 ∣ −8 and R3−R1 gives 0, 3, −1 ∣ −4. Then R3−R2 gives 0, 0, 4 ∣ 4, so z=1. Back-substituting, 3y−5=−8 gives y=−1, and x+1+2=5 gives x=2. Check that 4−1−1=2 and 2−2+1=1.
Solve 2y−z=4,x+y+z=6 and 3x−y+2z=4. The first equation has no x.
Show the answer and explanation
x=1,y=3 and z=2.
The first row has 0 where the first pivot should be, so swap R1 and R2. Then R3−3R1 gives 0, −4, −1 ∣ −14, and R3+2R2 gives 0, 0, −3 ∣ −6, so z=2. Back-substituting, 2y−2=4 gives y=3, and x=6−3−2=1.
2y−z=4x+y+z=63x−y+2z=4−4y−z=−14−3z=−6z=2y=3x=1
3. Somewhere new
A theater sold 200 tickets for $1,440. Adult tickets cost $10, student tickets $6 and child tickets $4, and it sold twice as many student tickets as child tickets. How many of each did it sell?
Show the answer and explanation
80 adult, 80 student and 40 child tickets.
With a adult, s student and c child tickets, a+s+c=200,10a+6s+4c=1440 and s−2c=0.R2−10R1gives −4s−6c=−560. Putting s=2c into it gives −14c=−560, so c=40,s=80 and a=80. The money checks, since 800+480+160=1440.
In Matrices & linear systems, the operation trail shows each step to the RREF. Remove the last column and switch the task to Determinant: it is 7, not 0, which is why the system has exactly one solution.