olve the system of equations using matrices. Use Gaussian elimination with back-substitution.

x + y + z     =      -5
x - y + 3z    =     -1
4x + y + z    =     -2

I need it explained to me, how do I do this?

you need to add/subtract rows and their multiples so the resulting matrix consists of a diagonal of 1's.

To start, subtract R1 from R2:
x + y + z = -5
0 - 2y + 2z = 4
4x + y + z = -2

Now subtract 4*R1 from R3:

x + y + z = -5
0 - 2y + 2z = 4
0 - 3y - 3z = 18

Now work on the other rows. When the left side is just a diagonal of 1's, the right side will be the solution, because it will look something like

x + 0 + 0 = 12
0 + y + 0 = 4
0 + 0 + z = -3

To solve a system of equations using matrices, we can use the method of Gaussian elimination with back-substitution. Here's a step-by-step explanation of the process:

Step 1: Set up the augmented matrix:
Write the coefficients of the variables and the constants in a matrix form by putting all the coefficients in a rectangular array and adding a column for the constants on the right side. For the given system of equations:
x + y + z = -5 (equation 1)
x - y + 3z = -1 (equation 2)
4x + y + z = -2 (equation 3)

The augmented matrix will be:
[1 1 1 | -5]
[1 -1 3  | -1]
[4 1 1 | -2]

Step 2: Perform row operations to get zeros below the main diagonal:
- Make the first coefficient in the first column (which is 1 in the first row) into a 1 by dividing the entire first row by 1.
- Multiply the first row by -1 and add it to the second row to eliminate the first variable (x) from the second row.
- Multiply the first row by -4 and add it to the third row to eliminate the first variable (x) from the third row.
After these operations, the augmented matrix becomes:
[1 1 1 | -5]
[0 -2 2  | 4]
[0 -3 -3 | 18]

Step 3: Perform row operations to get zeros above and below the second pivot (which is -2 in the second row):
- Multiply the second row by -1/2 to make the second pivot equal to 1.
- Multiply the second row by -3 and add it to the third row to eliminate the second variable (y) from the third row.
After these operations, the augmented matrix becomes:
[1 1 1 | -5]
[0 1 -1  | -2]
[0 0 0 | 0]

Step 4: Write the system of equations in row-echelon form:
The augmented matrix after row operations is:
[1 1 1 | -5]
[0 1 -1  | -2]
[0 0 0 | 0]

The row-echelon form can be written as:
x + y + z = -5 (equation 1)
y - z = -2 (equation 2)
0 = 0 (equation 3)

Step 5: Solve the system using back-substitution:
From equation 2, we have y - z = -2. Solving for y, we have y = z - 2.
From equation 1, we have x + y + z = -5. Substituting y with z - 2, we get x + (z - 2) + z = -5, which simplifies to x + 2z = -3.

Now, since there is a free variable (z can take any value), we can express the solution as a parameterized form:
x = -3 - 2z
y = z - 2
z = t (where t is any real number)

So, the solution to the system of equations is:
x = -3 - 2t
y = t - 2
z = t

This means that for any chosen value of t, we can find the corresponding values of x, y, and z that satisfy the original system of equations.