We are given the system
to write this system of the form
where A is a matrix, x is a vector and b is another vector, we simply take each equation and write it in matrix form. The first equation is
so, we will take a look at the left hand side of the equality sign. We have
we will take a look at the coefficients of each variable and write that as the first row of the matrix. That would be the row 1 -3 1 as the coefficient of x and z is 1 and the coefficient of y is -3. For b, the first row would be simply the number 8. So, if we do the same with the other two equations, we have
and
By using any of the two methods of the question (the use of software is beyond the scope of the session) we get that the solution is