First, form your augmented matrix as follows:

The column at the right contains the numbers to the right of the equals sign in the set of equations and the columns to the left are the coefficients of x, y and z. Each row now represents an equation.

We want only the top row to have a number other than 0 in the first column, so we will add multiples of that row to the other rows to get 0s in the other places.

We have added -3 times the first row to the second row and 1 times the first row to the third row.

Now because we have a 0 in the second row and second column, we must switch it with a lower row.

We have here swapped the second and 3rd rows and now have a one in the second row and 2nd column so we can proceed straight to the third row.

to get a 1 in the third row and the third column, we just need to multiply the third row by

Now the matrix is in row echelon form. This is always what you are aiming to find in Gaussian elimination: the first non-zero number in each row is a 1 and all numbers below the first in a row are 0. The steps for getting there will vary with each matrix, but if you just work through one row and column at a time it is pretty easy to see the next step. If you have trouble remembering what you are "allowed" to do, think of this as just another way of setting out your work: you can do the same things you always could with the rows as if they were equations; you just don't write in the variable names and have a line instead of an =.

Now we have the matrix in row echelon form, we turn the rows back into equations.

x-3y-2z=2

y+z = 5

z = -1.

You can probably figure out how to solve the rest of this yourself.