Gaussian Elimination to Solve Systems - Questions with Solutions

Examples and questions with their solutions on how to solve systems of linear equations using the Gaussian (row echelon form) and the Gauss-Jordan (reduced row echelon form) methods are presented.
The methods presented here find their explanations on the more general method of solving a system of linear equations by elimination. The method of elimination is at the heart of linear algebra. It is a computationally efficient and powerful method that may also be used to find the inverse of a matrix, the determinant of a matrix, the rank of matrices and can also be used to express a matrix in terms of elementary matrices.

What is the Augmented Matrix of a Linear System of Equations?

The augmented matrix of a system of linear equations is made up of the matrix of the coefficients of the unknowns augmented by the matrix of the constants. Below is given a system with the unknowns x and y.
$$\left\{ \begin{array}{lcl} a x + b y & = & c \\ d x + e y & = & f \end{array} \right.$$
The augmented matrix of the above system is given by
$\begin{bmatrix} a & b &|& c\\ d & e &|& f \end{bmatrix}$

• Example 1
Write the augmented matrix for the given systems.
a) $$\left\{ \begin{array}{lcl} x + y & = & -3 \\ -x + 3y & = & 5 \end{array} \right.$$     b) $$\left\{ \begin{array}{lcl} 2x + 4y - z & = & -3 \\ -x + 3y & = & 9 \\ y + 5z & = & 7 \end{array} \right.$$     c) $$\left\{ \begin{array}{lcl} -x + 4y - z - 2w & = & 6 \\ 2x - 2w & = & 0 \\ -3x - z - 2w & = & 11 \\ 5z & = & 7 \end{array} \right.$$
Solution to Example 1
a) $$\begin{bmatrix} 1 & 1 &|& -3\\ -1 & 3 &|& 5 \end{bmatrix}$$     b) $$\begin{bmatrix} 2 & 4 & -1 &|& -3\\ -1 & 3 & 0 &|& 9 \\ 0 & 1 & 5 &|& 7 \end{bmatrix}$$     c) $$\begin{bmatrix} -1 & 4 & -1 & -2 &|& 6\\ 2 & 0 & 0 & -2 &|& 0\\ -3 & 0 & -1 & -2 &|& 11\\ 0 & 0 & 5 & 0 &|& 7 \end{bmatrix}$$
Note that all the information in the system of equations is included in the augmented matrix as coefficients and constants and therefore we can solve a given system using its augmented matrix.

Row Operations on Augmented Matrix

We now show that solving a system using elementary operations on equations of the system is equivalent to solving the same system using elementary operations on the rows of its augmented matrix.
Operations on Equations Operations on Rows
1. Interchange two equations
2. Add a multiple of one equation to another
3. Multiply an equation by a non zero constant
1. Interchange two rows
2. Add a multiple of one row to another
3. Multiply a row by a non zero constant
An example that shows that the two types of operations are equivalent is presented below.
• Example 2
Solve the system of linear equations
$$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ -x + 3y + 2z & = & 5 \\ x + 5z & = & 9 \end{array} \right.$$
using both operations on equations and operation on rows of its augmented matrix.  System of Equations Corresponding Augmented Matrix $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ -x + 3y + 2z & = & 5 \\ x + 5z & = & 9 \end{array} \right.$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ -1 & 3 & 2 &|& 5 \\ 1 & 0 & 5 &|& 9 \end{bmatrix}$$ add equation (1) to equation (2) Add row (1) to row (2) $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ 0x + 4y + z & = & 2 \\ x + 5z & = & 9 \end{array} \right.$$ $$\color{red}{\begin{matrix} \\ R_2 + R_1\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & 4 & 1 &|& 2 \\ 1 & 0 & 5 &|& 9 \end{bmatrix}$$ add -1 times equation (1) to equation (3) Add -1 times row (1) to row (3) $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ 0x + 4y + z & = & 2 \\ 0x - y + 6 z & = & 12 \end{array} \right.$$ $$\color{red}{\begin{matrix} \\ \\ R_3 - R_1\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & 4 & 1 &|& 2 \\ 0 & -1 & 6 &|& 12 \end{bmatrix}$$ Interchange equations (2) and (3) Interchange rows (2) and (3) $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ 0x - y + 6 z & = & 12\\ 0x + 4y + z & = & 2 \end{array} \right.$$ $$\color{red}{\begin{matrix} \\ R_3\\ R_2\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & -1 & 6 &|& 12\\ 0 & 4 & 1 &|& 2 \end{bmatrix}$$ Add 4 times equation (2) to equation (3) Add 4 times row (2) to row (3) $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ 0x - y + 6 z & = & 12\\ 0x + 0y + 25z & = & 50 \end{array} \right.$$ $$\color{red}{\begin{matrix} \\ \\ R_3 + 4R_2\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & -1 & 6 &|& 12\\ 0 & 0 & 25 &|& 50 \end{bmatrix}$$ Multiply all terms in equation (2) by -1 Multiply all terms in row (2) by -1 $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ 0x + y - 6 z & = & - 12\\ 0x + 0y + 25z & = & 50 \end{array} \right.$$ $$\color{red}{\begin{matrix} \\ -R_2\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & 1 & - 6 &|& - 12\\ 0 & 0 & 25 &|& 50 \end{bmatrix}$$ Multiply all terms in equation (3) by 1/25 Multiply all terms in row (3) by 1/25 $$\left\{ \begin{array}{lcl} x + y - z & = & -3 \\ 0x + y - 6 z & = & - 12\\ 0x + 0y + z & = & 2 \end{array} \right.$$ $$\color{red}{\begin{matrix} \\ \\ (1/25)R_3\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & 1 & - 6 &|& - 12\\ 0 & 0 & 1 &|& 2 \end{bmatrix}$$

All the augmented matrices obtained on the right correspond to the system of equations on the left and we can therefore solve any system of linear equations using augmented matrices.

Gaussian Elimination or Row echelon Form of an Augmented Matrix.

The last augmented matrix in example 2 above obtained by elimination is in
row echelon form (REF). $\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & 1 & - 6 &|& - 12\\ 0 & 0 & 1 &|& 2 \end{bmatrix}$
The set of steps used to obtain the REF form of the matrix are called the
Gaussian method. A matrix in row echelon form has the properties.
1. If a row does not contain only zeros, the first non zero number in it is a 1 also called the leading 1.
2. For two successive rows with leading 1's, the 1 in the lower row is to the right of the 1in the upper row.
3. Any rows with zeros only are located at the bottom of the matrix.
We can use the last augmented matrix to solve the given system by back substitution. But we may continue with more steps based on the idea of elimination to obtain the final solution to the system.

Gauss-Jordan Method or Reduced Row Echelon Form of an Augmented Matrix

A matrix is in reduced row echelon form if it is in row echelon form and with zeros above and below the leading 1's. The method of obtaining the reduced row echelon form of a matrix is called the Gauss-Jordan method.
We continue with the row operations on the last augmented matrix in example 2 to produce zeros above the leading ones as follows.

Add 6 times row (3) to row (2)
$$\color{red}{\begin{matrix} \\ R_2 + 6R_3\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & - 1 &|& -3\\ 0 & 1 & 0 &|& 0\\ 0 & 0 & 1 &|& 2 \end{bmatrix}$$

Add row (3) to row (1)
$$\color{red}{\begin{matrix} R_1+R_3\\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 &|& - 1\\ 0 & 1 & 0 &|& 0\\ 0 & 0 & 1 &|& 2 \end{bmatrix}$$

Add -1 times row (2) to row (1)
$$\color{red}{\begin{matrix} R_1-R_2\\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 0 & 0 &|& - 1\\ 0 & 1 & 0 &|& 0\\ 0 & 0 & 1 &|& 2 \end{bmatrix}$$

The above augmented matrix is in
reduced row echelon form and gives the solution to the given system of equations without further calculations.
$$$$\begin{array}{ccl} x & = & -1 \\ y & = & 0 \\ z & = & 2 \end{array}$$$$

• Example 3
Write the augmented matrix of the system below in reduced row echelon form and find the solution to the given system.
$$\left\{ \begin{array}{lcl} 2x - y - z + w & = & -2 \\ - x + y + 2z + 2 w & = & - 5 \\ 3x + y - z - 3w & = & 8 \\ 2x + 2y - 2 z - w & = & 6 \end{array} \right.$$

Solution to Example 3
The augmented matrix to the given system is as follows
$$\begin{bmatrix} 2 & -1 & -1 & 1 &|& - 2\\ -1 & 1 & 2 & 2 &|& -5\\ 3 & 1 & -1 & -3 &|& 8 \\ 2 & 2 & -2 & - 1 &|& 6 \end{bmatrix}$$

We start by reducing the entries in column (1) to zero except row (1).
Row (2) has -1 at the first column and could therefore be used in row (1). Interchange rows (1) and (2)
$$\color{red}{\begin{matrix} R_2 \\ R_1\\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} -1 & 1 & 2 & 2 &|& -5\\ 2 & -1 & -1 & 1 &|& - 2\\ 3 & 1 & -1 & -3 &|& 8 \\ 2 & 2 & -2 & - 1 &|& 6 \end{bmatrix}$$

Multiply row(1) by -1.
$$\color{red}{\begin{matrix} -R_1 \\ \\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & -2 &|& 5\\ 2 & -1 & -1 & 1 &|& - 2\\ 3 & 1 & -1 & -3 &|& 8 \\ 2 & 2 & -2 & - 1 &|& 6 \end{bmatrix}$$

The entries in column (1) of Rows (2), (3) and (4) have to be reduced to zero as follows: add - 2 × row (1) to row (2), add - 3 × row (1) to row (3) and add - 2 × row (1) to row (4) to obtain
$$\color{red}{\begin{matrix} \\ R_2 - 2R_1\\ R_3 - 3R_1\\ R_4 - 2R_1 \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & -2 &|& 5\\ \color{red}{0} & 1 & 3 & 5 &|& - 12\\ \color{red}{0} & 4 & 5 & 3 &|& -7 \\ \color{red}{0} & 4 & 2 & 3 &|& -4 \end{bmatrix}$$

Row (2) starts with a 1, hence we need to reduce the entries in column (2) of rows (3) and (4) as follows: add -4 × row (2) to row (3) and add - 4 × row(2) to row (4).
$$\color{red}{\begin{matrix} \\ \\ R_3 - 4R_2\\ R_4 - 4R_2 \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & -2 &|& 5\\ \color{red}{0} & 1 & 3 & 5 &|& - 12\\ \color{red}{0} & \color{red}{0} & -7 & -17 &|& 41 \\ \color{red}{0} & \color{red}{0} & -10 & -17 &|& 44 \end{bmatrix}$$

Row (3) starts with -7, hence we need to reduce the entry in column(3) of row (4) which is achieved in two steps as follows: multiply row (4) by -7
$$\color{red}{\begin{matrix} \\ \\ \\ - 7 R_4 \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & -2 &|& 5\\ \color{red}{0} & 1 & 3 & 5 &|& - 12\\ \color{red}{0} & \color{red}{0} & -7 & -17 &|& 41 \\ \color{red}{0} & \color{red}{0} & 70 & 119 &|& -308 \end{bmatrix}$$

and add 10 × row(3) to row (4)

$$\color{red}{\begin{matrix} \\ \\ \\ R_4 + 10 R_3 \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & -2 &|& 5\\ \color{red}{0} & 1 & 3 & 5 &|& - 12\\ \color{red}{0} & \color{red}{0} & -7 & -17 &|& 41 \\ \color{red}{0} & \color{red}{0} & \color{red}{0} & - 51 &|& 102 \end{bmatrix}$$

Multiply row (4) by -1/51
$$\color{red}{\begin{matrix} \\ \\ \\ -R_4/51 \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & -2 &|& 5\\ \color{red}{0} & 1 & 3 & 5 &|& - 12\\ \color{red}{0} & \color{red}{0} & -7 & -17 &|& 41 \\ \color{red}{0} & \color{red}{0} & \color{red}{0} & 1 &|& -2 \end{bmatrix}$$

We now need to reduce to zero the entries above the leading 1 in row (4) as follows: add 2 × row(4) to row(1), add -5 × row(4) to row(2) and add -17 × row(4) to row(3).
$$\color{red}{\begin{matrix} R_1+2R_4\\ R_2- 5R_4\\ R_3 - 17 R_4\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & \color{red}{0} &|& 1\\ \color{red}{0} & 1 & 3 & \color{red}{0} &|& - 2\\ \color{red}{0} & \color{red}{0} & -7 & \color{red}{0} &|& 7 \\ \color{red}{0} & \color{red}{0} & \color{red}{0} & 1 &|& -2 \end{bmatrix}$$

Row (3) needs to start with a 1 instead of -7. Hence multiply row (3) by -1/7
$$\color{red}{\begin{matrix} \\ \\ -R_3/7\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & -2 & \color{red}{0} &|& 1\\ \color{red}{0} & 1 & 3 & \color{red}{0}&|& - 2\\ \color{red}{0} & \color{red}{0} & 1 & \color{red}{0} &|& -1 \\ \color{red}{0} & \color{red}{0} & \color{red}{0} & 1 &|& -2 \end{bmatrix}$$

Reduces to zero the entries above the leading 1 in row (3) as follows: add 2 × row(3) to row(1) and add -3 × row(3) to row(2).
$$\color{red}{\begin{matrix} R_1+2R_3\\ R_2 - 3R_3\\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & -1 & \color{red}{0} & \color{red}{0} &|& -1\\ \color{red}{\color{red}{0}} & 1 & \color{red}{0} & \color{red}{0}&|& 1\\ \color{red}{0} & \color{red}{0} & 1 & \color{red}{0} &|& -1 \\ \color{red}{0} & \color{red}{0} & \color{red}{0} & 1 &|& -2 \end{bmatrix}$$

Reduces to zero the entries above the leading 1 in row (2) as follows: add row(2) to row(1).
$$\color{red}{\begin{matrix} R_1+R_2\\ \\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & \color{red}{0} & \color{red}{0} & \color{red}{0} &|& 0\\ \color{red}{0} & 1 & \color{red}{0} & \color{red}{0}&|& 1\\ \color{red}{0} & \color{red}{0} & 1 & \color{red}{0} &|& -1 \\ \color{red}{0} & \color{red}{0} & \color{red}{0} & 1 &|& -2 \end{bmatrix}$$

We now change the augmented matrix back to a system of equations to obtain the solutions:
$$x = 0 , y = 1, z = -1 , w = -2$$

Questions with Solution

• Part 1
Find the augmented matrix for each of the following system of linear equations.
1. $$\left\{ \begin{array}{lcl} x + 2 y & = & 2 \\ - 2x + 4y & = & -1 \end{array} \right.$$

2. $$\left\{ \begin{array}{lcl} - x + 2 y + z & = & -5 \\ - x - \dfrac{1}{3}y & = & - 7\\ -\dfrac{2}{5} y - 9 z & = & 0 \end{array} \right.$$

3. $$\left\{ \begin{array}{lcl} 2 x + z - w & = & 0\\ - \dfrac{1}{2} y - 4z & = & -4\\ x - 7y & = & 7 \\ - 4y - 5z -\dfrac{1}{5} w& = & 2 \end{array} \right.$$
• Part 2
a) Which of the following matrices are NOT in row echelon form? Explain why.
b) Of the matrices that are in row echelon, which are NOT in reduced row echelon form? Explain why.

1. $$\begin{bmatrix} 1 & -1 & 0 & 0 & -1\\ 0 & 1 & 2 & -3 & 1\\ 0 & 0 & 1 & 0 & -1 \\ 0 & 1 & 0 & 1 & -2 \end{bmatrix}$$

2. $$\begin{bmatrix} 1 & -1 & 2 & -1\\ 0 & 1 & 2 & 1\\ 0 & 0 & 1 & -1 \\ \end{bmatrix}$$

3. $$\begin{bmatrix} 1 & 0 & -3 \\ 1 & 1 & 2 \\ \end{bmatrix}$$

4. $$\begin{bmatrix} 1 & 0 & 0 & 0 & -2\\ 0 & 1 & 0 & 0 & 3\\ 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 1 & -4 \end{bmatrix}$$

5. $$\begin{bmatrix} 1 & 0 & 0 & -9\\ 0 & 1 & 1 & -2\\ 0 & 0 & 1 & 0 \\ \end{bmatrix}$$

6. $$\begin{bmatrix} 1 & 0 & -2 \\ 0 & 1 & 2 \\ \end{bmatrix}$$
• Part 3
Use the Gauss-Jordan method to solve the systems of equations below.
1. $$\left\{ \begin{array}{lcl} x + y & = & -1 \\ - x + y & = & 5 \end{array} \right.$$

2. $$\left\{ \begin{array}{lcl} x + y & = & - 2 \\ 2x + 2z & = & - 6\\ x + y + 2 z & = & -4 \end{array} \right.$$

3. $$\left\{ \begin{array}{lcl} x + y & = & -3\\ 2x + 2y - w & = & -2\\ x + z & = & -2\\ x + y + z + 2w & = & -13 \end{array} \right.$$

Solutions to the Above Questions

• Part 1
1. $$\begin{bmatrix} 1 & 2 &|& 2\\ -2 & 4 &|& - 1 \end{bmatrix}$$

2. $$\begin{bmatrix} -1 & 2 & 1 &|& -5\\ -1& -\dfrac{1}{3} & 0 &|& - 7\\ 0 & -\dfrac{2}{5} & -9 &|& 0 \end{bmatrix}$$

3. $$\begin{bmatrix} 2 & 0 & 1 & -1 &|& 0\\ 0 & -\dfrac{1}{2} & -4 & 0 &|& - 4\\ 1 & -7 & 0 & 0 &|& 7 \\ 0 & -4 & -5 & -\dfrac{1}{5} &|& 2 \end{bmatrix}$$
• Part 2
a) Matrices 1. and 3.
In matrix 1., the 1 in column (2) of row(4) makes that matrix NOT a row echelon form.
In matrix 3., the 1 in column (1) of row (2) makes that matrix NOT a row echelon form
b) Matrices 2. and 5.
In matrix 2., the -1 and 2 in row (1) and the 2 in row (2) make that matrix NOT a reduced row echelon form.
In matrix 5., the 1 in column (3) of row (2) makes that matrix NOT a reduced row echelon form.
• Part 3
1. Augmented matrix
$$\begin{bmatrix} 1 & 1 & -1 \\ -1 & 1 & 5 \\ \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ R_2+R_1 \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 &|& -1\\ 0 & 2&|& 4\\ \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ (1/2) × R_2 \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 &|& -1\\ 0 & 1&|& 2\\ \end{bmatrix}$$

$$\color{red}{\begin{matrix} R_1 - R_2\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 0 &|& -3\\ 0 & 1&|& 2\\ \end{bmatrix}$$
Matrix in reduced row echelon form; solution:$$(x,y) = (-3,2)$$

2. Augmented matrix
$$\begin{bmatrix} 1 & 1 & 0 & -2 \\ 2 & 0 & 2 & -6\\ 1 & 1 & 2 & -4 \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ R_2 - 2R_1\\ R_3 - R_1 \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & -2 \\ 0 & -2 & 2 & -2\\ 0 & 0 & 2 & -2 \end{bmatrix}$$ ,

$$\color{red}{\begin{matrix} \\ R_2 - R_3\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & -2 \\ 0 & -2 & 0 & 0\\ 0 & 0 & 2 & -2 \end{bmatrix}$$ ,

$$\color{red}{\begin{matrix} \\ -(1/2)R_2\\ (1/2)R_3\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & -2 \\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{bmatrix}$$ ,

$$\color{red}{\begin{matrix} R_1- R_2\\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 0 & 0 & -2 \\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{bmatrix}$$ ,

Matrix in reduced row echelon form; solution: $$(x,y,z)=(-2,0,-1)$$

3. Augmented matrix
$$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 2 & 2 & 0 & -1 &|& -2\\ 1 & 0 & 1 & 0 &|& -2 \\ 1 & 1 & 1 & 2 &|& - 13 \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ R_2-2R_1\\ R_3 - R_1\\ R_4 - R_1 \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 0 & 0 & 0 & -1 &|& 4\\ 0 & -1 & 1 & 0 &|& 1 \\ 0 & 0 & 1 & 2 &|& - 10 \end{bmatrix}$$

Interchange row(2) and row(3)
$$\color{red}{\begin{matrix} \\ R_3\\ R_2\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 0 & -1 & 1 & 0 &|& 1 \\ 0 & 0 & 0 & -1 &|& 4\\ 0 & 0 & 1 & 2 &|& - 10 \end{bmatrix}$$

Interchange row(3) and row(4)
$$\color{red}{\begin{matrix} \\ \\ R_4\\ R_3\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 0 & -1 & 1 & 0 &|& 1 \\ 0 & 0 & 1 & 2 &|& - 10\\ 0 & 0 & 0 & -1 &|& 4 \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ -R_2\\ \\ -R_4\\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 0 & 1 & -1 & 0 &|& -1 \\ 0 & 0 & 1 & 2 &|& - 10\\ 0 & 0 & 0 & 1 &|& -4 \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ \\ R_3-2R_4\\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 0 & 1 & -1 & 0 &|& -1 \\ 0 & 0 & 1 & 0 &|& - 2\\ 0 & 0 & 0 & 1 &|& -4 \end{bmatrix}$$

$$\color{red}{\begin{matrix} \\ R_2+R_3\\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 1 & 0 & 0 &|& -3 \\ 0 & 1 & 0 & 0 &|& -3 \\ 0 & 0 & 1 & 0 &|& - 2\\ 0 & 0 & 0 & 1 &|& -4 \end{bmatrix}$$

$$\color{red}{\begin{matrix} R_1-R_2\\ \\ \\ \\ \end{matrix}}$$ $$\begin{bmatrix} 1 & 0 & 0 & 0 &|& 0 \\ 0 & 1 & 0 & 0 &|& -3 \\ 0 & 0 & 1 & 0 &|& - 2\\ 0 & 0 & 0 & 1 &|& -4 \end{bmatrix}$$

Matrix in reduced row echelon form;; solution: $$(x,y,z,w) = (0,-3,-2,-4)$$