Skip to main content

Section 2.4 Elementary row operations

Gaussian elimination, which we shall describe in detail presently, is an algorithm (a well-defined procedure for computation that eventually completes) that finds all solutions to any \(m\times n\) system of linear equations. It is defined via certain operations carried out on the augmented matrix. These operations change the matrix (and hence the system of linear equations associated with it), but they leave the set of solutions unchanged. There are three of them, which we now describe.

Subsection 2.4.1 First operation: interchanging two rows

Exchanging two rows in the augmented matrix is the same as writing the the equations in a different order. The equations themselves are unchanged, as is the set of all solutions. When we interchange row \(i\) and row \(j\text{,}\) we denote it by \(R_i\leftrightarrow R_j\text{.}\)

Example 2.4.1. Augmented matrix change (interchange rows).

The system of equations

\begin{equation*} \begin{array}{rl} 2x+3y-z \amp = 2\\ -x+y+z \amp =4\\ 3x-y-z \amp = 3 \end{array} \end{equation*}

corresponds to the augmented matrix

\begin{equation*} \left[\begin{array}{ccc|c} 2 \amp 3 \amp -1 \amp 2\\ -1 \amp 1 \amp 1 \amp 4\\ 3 \amp -1 \amp -1 \amp 3 \end{array}\right] \end{equation*}

Now we interchange rows 1 and 3 (\(R_1\leftrightarrow R_3\)) to get the matrix

\begin{equation*} \left[\begin{array}{ccc|c} 3 \amp -1 \amp -1 \amp 3\\ -1 \amp 1 \amp 1 \amp 4\\ 2 \amp 3 \amp -1 \amp 2 \end{array}\right] \end{equation*}

which corresponds to the equations

\begin{equation*} \begin{array}{rl} 3x-y-z \amp = 3\\ -x+y+z \amp =4\\ 2x+3y-z \amp = 2 \end{array} \end{equation*}

Subsection 2.4.2 Second operation: multiplying a row by a nonzero constant

If we have a linear equation and multiply both sides of the equation by a nonzero constant \(\lambda\text{,}\) (The symbol \(\lambda\) is the Greek letter lambda; it is the traditional name for this constant.) then the linear equation

\begin{equation*} a_1x_1 + a_2x_2 +a_3x_3 + \cdots + a_nx_n =b \end{equation*}

becomes

\begin{equation*} \lambda(a_1x_1 + a_2x_2 +a_3x_3 + \cdots + a_nx_n) =\lambda b \end{equation*}

and so

\begin{equation*} \lambda a_1x_1 + \lambda a_2x_2 +\lambda a_3x_3 + \cdots +\lambda a_nx_n =\lambda b. \end{equation*}

This would apply to any equation in a system, of course, and so when we apply this operation to row \(i\) we denote it by \(R_i \gets \lambda R_i\) (The symbol \(\gets\) means is replaced by). As long as \(\lambda\) is nonzero, this operation leaves the set of solutions unchanged.

Example 2.4.2. Augmented matrix change (multiply row by \(\lambda\)).

The system of equations

\begin{equation*} \begin{array}{rl} 2x+3y-z \amp = 2\\ -x+y+z \amp =4\\ 3x-y-z \amp = 3 \end{array} \end{equation*}

corresponds to the augmented matrix

\begin{equation*} \begin{bmatrix} 2 \amp 3 \amp -1 \amp 2\\ -1 \amp 1 \amp 1 \amp 4\\ 3 \amp -1 \amp -1 \amp 3 \end{bmatrix} \end{equation*}

Now we multiply row \(2\) by \(\lambda=-3\) (\(R_2\gets -3R_2\)) to get the matrix

\begin{equation*} \begin{bmatrix} 2 \amp 3 \amp -1 \amp 2\\ 3 \amp -3 \amp -3 \amp -12\\ 3 \amp -1 \amp -1 \amp 3 \end{bmatrix} \end{equation*}

which corresponds to the system of equations

\begin{equation*} \begin{array}{rl} 2x+3y-z \amp = 2\\ 3x-3y-3z \amp =-12\\ 3x-y-z \amp = 3 \end{array} \end{equation*}

Subsection 2.4.3 Third operation: adding a multiple of one row to another

Recall that one of our basic techniques for solving a system of equations is to pick a variable, make the coefficients of that variable equal in two equations and then take the difference of the equations to create a new one with that variable eliminated. In terms of the associated augmented matrix, this means we get a new row formed by subtracting the corresponding entries in the rows of the two equations. In other words, we replace one row by the difference of two rows. We use the notation \(R_i\gets R_i-R_j\) to indicate that row \(i\) is replaced by the difference of row \(i\) and row \(j\text{.}\) The set of solutions is unchanged. We have already seen that multiplying a row by a nonzero constants leaves the set of solutions unchanged; it is often convenient to combine these two steps as one: \(R_i\gets R_i+\lambda R_j.\) Note that \(\lambda=-1\) is the case of subtracting one row from another.

Example 2.4.3. Augmented matrix change (add multiple of one row to another).

Eliminating \(x\) from the second equation:

\begin{equation*} \begin{array}{rl} -x+y+z \amp =4\\ 2x+3y-z \amp = 2\\ 3x-y-z \amp = 3 \end{array} \end{equation*}

corresponds to the augmented matrix

\begin{equation*} \begin{bmatrix} -1 \amp 1 \amp 1 \amp 4\\ 2 \amp 3 \amp -1 \amp 2\\ 3 \amp -1 \amp -1 \amp 3 \end{bmatrix} \end{equation*}

Now we replace row 2 by the sum of row 2 and twice row 1 \((R_2\gets R_2+2R_1)\) to get the matrix

\begin{equation*} \begin{bmatrix} -1 \amp 1 \amp 1 \amp 4\\ 0 \amp 5 \amp 1 \amp 10\\ 3 \amp -1 \amp -1 \amp 3 \end{bmatrix} \end{equation*}

which corresponds to the system of linear equations

\begin{equation*} \begin{array}{rl} - x+y+z \amp =4\\ 5y+z \amp =10\\ 3x-y-z \amp = 3 \end{array} \end{equation*}

Subsection 2.4.4 Summary of the three elementary row operations

In summary, here is a table of the three elementary row operations:

Table 2.4.4. Elementary Row Operations
Elementary Operation Notation
Interchange rows \(R_i\leftrightarrow R_j\)
Multiply row by a nonzero constant \(R_i\gets\lambda R_i\text{,}\) \(\lambda\not=0\)
Add multiple of one row to another \(R_i\gets R_i+\lambda R_j\)

Each operation changes the matrix and the associated system of linear equations, but it leaves the set of solutions unchanged.

Subsection 2.4.5 Changing a specific entry of a matrix using elementary row operations

We want to show that it is possible to change specific entries in a matrix in an advantageous way using elementary row operations. Specifically, we will show two things:

  • Any \(a_{i,k}\not=0\) may be changed to \(1\) with one elementary row operation.

  • If \(a_{i,k}\not=0\text{,}\) then any other entry in the same column may be changed to \(0\) with one elementary row operation.

  1. If a matrix has an entry \(a_{i,k}\not=0\text{,}\) then multiply the row \(R_i\) by \(\frac 1{a_{i,k}}\text{,}\) that is, carry out the elementary row operation \(R_i\gets \frac 1{a_{i,k}}R_i\text{.}\) In the resulting matrix, the \(i\)-\(k\) entry is \(\frac {a_{i,k}}{a_{i,k}}=1\text{.}\)

  2. Suppose a matrix has two non-zero entries \(a_{i,k}\) and \(a_{j,k}\text{.}\) First, do the elementary row operation \(R_i\gets \frac 1{a_{i,k}}R_i\) to change \(a_{i,k}\) to \(1\text{.}\) Then, do the elementary row operation \(R_j\gets R_j-a_{j,k}R_i\text{.}\) The matrix now has a new value in the \(j\)-\(k\) position which is \(a_{j,k}-a_{j,k}=0\text{,}\) and we have accomplished our goal using two elementary operations. Now we note that these two operations can be carried out with the single operation \(R_j\gets R_j-\frac {a_{j,k}}{a_{i,k}}R_i \text{.}\)

Exercises Exercises

For these exercises, let \(A= \begin{bmatrix} 1\amp2\amp3\amp4\\ 5\amp6\amp7\amp-6\\ -5\amp-4\amp-3\amp-2 \end{bmatrix} \text{.}\)

1.

Find the elementary row operation that

  • changes the \(2\) in the first row to a \(1\)

  • changes the \(7\) in the second row to a \(1\)

  • changes the \(-4\) in the third row to a \(1\)

In each case give the matrix that results from the application of your elementary row operation.

Solution
  • \(\displaystyle R_1\gets \frac12 R_1\colon \begin{bmatrix} \frac12\amp1\amp\frac32\amp\frac12\\ 5\amp6\amp7\amp-6\\ -5\amp-4\amp-3\amp-2 \end{bmatrix}\)
  • \(\displaystyle R_2\gets \frac17 R_2\colon \begin{bmatrix} 1\amp2\amp3\amp4\\ \frac57\amp\frac67\amp1\amp-\frac67\\ -5\amp-4\amp-3\amp-2 \end{bmatrix}\)
  • \(\displaystyle R_3\gets -\frac14 R_3\colon \begin{bmatrix} 1\amp2\amp3\amp4\\ 5\amp6\amp7\amp-6\\ \frac54\amp1\amp\frac34\amp\frac12 \end{bmatrix}\)
2.

Find an elementary row operation that

  • changes the \(5\) in the second row to a \(0\)
  • changes the \(6\) in the second row to a \(0\)
  • changes the \(-4\) in the third row to a \(0\)
  • changes the \(7\) in the second row to a \(0\)

In each case give the matrix that results from the application of your elementary row operation.

Solution
  • \(\displaystyle R_2\gets R_2+R_3\colon \begin{bmatrix} 1\amp2\amp3\amp4\\ 0\amp2\amp4\amp-8\\ -5\amp-4\amp-3\amp-2 \end{bmatrix}\)
  • \(\displaystyle R_2\gets R_2-3R_1\colon \begin{bmatrix} 1\amp2\amp3\amp4\\ 2\amp0\amp-2\amp-18\\ -5\amp-4\amp-3\amp-2 \end{bmatrix}\)
  • \(\displaystyle R_3\gets R_3+2R_1\colon \begin{bmatrix} 1\amp2\amp3\amp4\\ 5\amp6\amp7\amp-6\\ -3\amp0\amp3\amp6 \end{bmatrix}\)
  • \(\displaystyle R_2\gets R_2-\frac73 R_1\colon \begin{bmatrix} 1\amp2\amp3\amp4\\ \frac83\amp\frac43\amp0\amp-\frac{46}3\\ -5\amp-4\amp-3\amp-2 \end{bmatrix}\)
3.

Use two elementary row operations to make the first column of the resulting matrix \(\begin{bmatrix} 1\\0\\0 \end{bmatrix}\)

Solution

\(R_2\gets R_2-5R_1\) and \(R_3\gets R_3+5R_1\) give

\begin{equation*} \begin{bmatrix} 1\amp2\amp3\amp4\\ 0\amp-4\amp-8\amp-26\\ 0\amp6\amp12\amp18 \end{bmatrix} \end{equation*}