Skip to main content

Section 1.2 Row Reduction of Matrices (LE2)

Subsection 1.2.1 Warm Up

Activity 1.2.1.

Consider the following matrices:
\begin{equation*} A=\left[\begin{array}{ccc|c} 1 & 0 & 3 & 3 \\ 3 & -2 & 4 & 0 \\ 0 & -1 & 1 & -2 \end{array}\right],\ B=\left[\begin{array}{ccc} 2 & 5 & 3 \\ 1 & -2 & 4 \\ 3 & -1 & 7 \end{array}\right] \end{equation*}
(a)
Write down a linear system whose augmented matrix is \(A\text{.}\) Can you write down another?
(b)
Write down a linear system whose coefficient matrix is \(B\text{.}\) Can you write down another?

Subsection 1.2.2 Class Activities

Definition 1.2.2.

Two systems of linear equations (and their corresponding augmented matrices) are said to be equivalent if they have the same solution set.
For example, both of these systems share the same solution set \(\setList{ \left[\begin{array}{c} 1 \\ 1\end{array}\right] }\text{.}\)
\begin{alignat*}{3} 3x_1 &\,-\,& 2x_2 &\,=\,& 1 \\ x_1 &\,+\,& 4x_2 &\,=\,& 5 \end{alignat*}
\begin{alignat*}{3} 3x_1 &\,-\,& 2x_2 &\,=\,& 1 \\ 4x_1 &\,+\,& 2x_2 &\,=\,& 6 \end{alignat*}
Therefore these augmented matrices are equivalent (even though they’re not equal), which we denote with \(\sim\text{:}\)
\begin{equation*} \left[\begin{array}{cc|c} 3 & -2 & 1\\ 1 & 4 & 5\\ \end{array}\right] \not= \left[\begin{array}{cc|c} 3 & -2 & 1\\ 4 & 2 & 6\\ \end{array}\right] \end{equation*}
\begin{equation*} \left[\begin{array}{cc|c} 3 & -2 & 1\\ 1 & 4 & 5\\ \end{array}\right] \sim \left[\begin{array}{cc|c} 3 & -2 & 1\\ 4 & 2 & 6\\ \end{array}\right] \end{equation*}

Activity 1.2.3.

Consider whether these matrix manipulations (A) must keep the same solution set, or (B) might result in a different solution set for the corresponding linear system.
(a)
Swapping two rows, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & 3 & 5 \\ 1 & 2 & 4 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 4 \amp x + 3y \amp= 5\\ x + 3y \amp= 5 \amp x +2y \amp= 4 \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
A. Same
(b)
Swapping two columns, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 2 & 1 & 4 \\ 3 & 1 & 5 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 4 \amp x + 3y \amp= 5\\ 2x + y \amp= 4 \amp 3x +y \amp= 5 \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
B. Different
(c)
Add a constant to every term of a row, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1+3 & 2+3 & 4+3 \\ 1 & 3 & 5 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 4 \amp 4x + 5y \amp= 7\\ x + 3y \amp= 5 \amp x +3y \amp= 5 \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
B. Different
(d)
Multiply a row by a nonzero constant, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 3(1) & 3(2) & 3(4) \\ 4 & 5 & 6 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 3 \amp 3x + 6y \amp= 9\\ x + 3y \amp= 5 \amp x +3y \amp= 5 \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
A. Same
(e)
Add one row to another row, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & 2 & 4 \\1+1 & 3+2 & 5+4 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 4 \amp \unknown x +\unknown y \amp= \unknown \\ x + 3y \amp= 5 \amp \unknown x +\unknown y \amp= \unknown \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
A. Same
(f)
Replace a column with zeros, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & 0 & 4 \\ 1 & 0 & 5 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 4 \amp \unknown x +\unknown y \amp= \unknown \\ x + 3y \amp= 5 \amp \unknown x +\unknown y \amp= \unknown \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
B. Different
(g)
Replace a row with zeros, for example:
\begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 1 & 3 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & 2 & 4 \\ 0 & 0 & 0 \end{array}\right] \end{equation*}
\begin{align*} x +2y \amp= 4 \amp \unknown x +\unknown y \amp= \unknown \\ x + 3y \amp= 5 \amp \unknown x +\unknown y \amp= \unknown \end{align*}
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
B. Different

Activity 1.2.4.

How does adding row multiples to other rows affect a linear system’s solution set?
  1. Solutions must be the same.
  2. Solutions might be different.
Answer.
A. Same

Definition 1.2.5.

The following three row operations produce equivalent augmented matrices.
  1. Swap two rows, for example, \(R_1\leftrightarrow R_2\text{:}\)
    \begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 3 \\ 4 & 5 & 6 \end{array}\right] \sim \left[\begin{array}{cc|c} 4 & 5 & 6 \\ 1 & 2 & 3 \end{array}\right] \end{equation*}
  2. Multiply a row by a nonzero constant, for example, \(2R_1\rightarrow R_1\text{:}\)
    \begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 3 \\ 4 & 5 & 6 \end{array}\right] \sim \left[\begin{array}{cc|c} 2(1) & 2(2) & 2(3) \\ 4 & 5 & 6 \end{array}\right] \end{equation*}
  3. Add a constant multiple of one row to another row, for example, \(R_2-4R_1\rightarrow R_2\text{:}\)
    \begin{equation*} \left[\begin{array}{cc|c} 1 & 2 & 3 \\ 4 & 5 & 6 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & 2 & 3 \\ 4-4(1) & 5-4(2) & 6-4(3) \end{array}\right] \end{equation*}
Observe that we will use the following notation: (Combination of old rows) \(\rightarrow\) (New row).

Activity 1.2.6.

Each of the following linear systems has the same solution set.
A)
\begin{alignat*}{4} x &\,+\,& 2y &\,+\,& z &\,=\,& 3 \\ -x &\,-\,& y &\,+\,& z &\,=\,& 1 \\ 2x &\,+\,& 5y &\,+\,& 3z &\,=\,& 7 \end{alignat*}
B)
\begin{alignat*}{4} 2x &\,+\,& 5y &\,+\,& 3z &\,=\,& 7 \\ -x &\,-\,& y &\,+\,& z &\,=\,& 1 \\ x &\,+\,& 2y &\,+\,& z &\,=\,& 3 \end{alignat*}
C)
\begin{alignat*}{4} x & & &\,-\,& z &\,=\,& 1 \\ & & y &\,+\,& 2z &\,=\,& 4 \\ & & y &\,+\,& z &\,=\,& 1 \end{alignat*}
D)
\begin{alignat*}{4} x &\,+\,& 2y &\,+\,& z &\,=\,& 3 \\ & & y &\,+\,& 2z &\,=\,& 4 \\ 2x &\,+\,& 5y &\,+\,& 3z &\,=\,& 7 \end{alignat*}
E)
\begin{alignat*}{4} x & & &\,-\,& z &\,=\,& 1 \\ & & y &\,+\,& 2z &\,=\,& 4 \\ & & & & z &\,=\,& 3 \end{alignat*}
F)
\begin{alignat*}{4} x &\,+\,& 2y &\,+\,& z &\,=\,& 3 \\ & & y &\,+\,& 2z &\,=\,& 4 \\ & & y &\,+\,& z &\,=\,& 1 \end{alignat*}
Sort these six equivalent linear systems from most complicated to simplest (in your opinion).

Activity 1.2.7.

Here we’ve written the sorted linear systems from Activity 1.2.6 as augmented matrices.
\begin{alignat*}{3} \left[\begin{array}{ccc|c} 2 & 5 & 3 & 7 \\ -1 & -1 & 1 & 1 \\ 1 & 2 & 1 & 3 \end{array}\right] & \sim & \left[\begin{array}{ccc|c} \markedPivot{1} & 2 & 1 & 3 \\ -1 & -1 & 1 & 1 \\ 2 & 5 & 3 & 7 \end{array}\right] & \sim & \left[\begin{array}{ccc|c} \markedPivot{1} & 2 & 1 & 3 \\ 0 & 1 & 2 & 4 \\ 2 & 5 & 3 & 7 \end{array}\right]\sim \\ \sim \left[\begin{array}{ccc|c} \markedPivot{1} & 2 & 1 & 3 \\ 0 & \markedPivot{1} & 2 & 4 \\ 0 & 1 & 1 & 1 \end{array}\right] & \sim & \left[\begin{array}{ccc|c} \markedPivot{1} & 0 & -1 & 1 \\ 0 & \markedPivot{1} & 2 & 4 \\ 0 & 1 & 1 & 1 \end{array}\right] & \sim & \left[\begin{array}{ccc|c} \markedPivot{1} & 0 & -1 & 1 \\ 0 & \markedPivot{1} & 2 & 4 \\ 0 & 0 & -1 & -3 \end{array}\right] \end{alignat*}
Assign the following row operations to each step used to manipulate each matrix to the next:
\begin{equation*} R_3-1R_2\to R_3 \end{equation*}
\begin{equation*} R_2+1R_1\to R_2 \end{equation*}
\begin{equation*} R_1\leftrightarrow R_3 \end{equation*}
\begin{equation*} R_3-2R_1\to R_3 \end{equation*}
\begin{equation*} R_1-2R_3\to R_1 \end{equation*}

Definition 1.2.8.

A matrix is in reduced row echelon form (RREF) if
  1. The leftmost nonzero term of each row is 1. We call these terms pivots.
  2. Each pivot is to the right of every higher pivot.
  3. Each term that is either above or below a pivot is 0.
  4. All zero rows (rows whose terms are all 0) are at the bottom of the matrix.
Every matrix has a unique reduced row echelon form. If \(A\) is a matrix, we write \(\RREF(A)\) for the reduced row echelon form of that matrix.

Activity 1.2.9.

Recall that a matrix is in reduced row echelon form (RREF) if
  1. The leftmost nonzero term of each row is 1. We call these terms pivots.
  2. Each pivot is to the right of every higher pivot.
  3. Each term that is either above or below a pivot is 0.
  4. All zero rows (rows whose terms are all 0) are at the bottom of the matrix.
For each matrix, mark the leading terms, and label it as RREF or not RREF. For the ones not in RREF, determine which rule is violated and how it might be fixed.
\begin{equation*} A=\left[\begin{array}{ccc|c} 1 & 0 & 0 & 3 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{array}\right] \end{equation*}
\begin{equation*} B=\left[\begin{array}{ccc|c} 1 & 0 & 4 & 3 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right] \end{equation*}
\begin{equation*} C=\left[\begin{array}{ccc|c} 0 & 0 & 0 & 0 \\ 1 & 2 & 0 & 3 \\ 0 & 0 & 1 & -1 \end{array}\right] \end{equation*}

Activity 1.2.10.

Recall that a matrix is in reduced row echelon form (RREF) if
  1. The leftmost nonzero term of each row is 1. We call these terms pivots.
  2. Each pivot is to the right of every higher pivot.
  3. Each term that is either above or below a pivot is 0.
  4. All zero rows (rows whose terms are all 0) are at the bottom of the matrix.
For each matrix, mark the leading terms, and label it as RREF or not RREF. For the ones not in RREF, determine which rule is violated and how it might be fixed.
\begin{equation*} D=\left[\begin{array}{ccc|c} 1 & 0 & 2 & -3 \\ 0 & 3 & 3 & -3 \\ 0 & 0 & 0 & 0 \end{array}\right] \end{equation*}
\begin{equation*} E=\left[\begin{array}{ccc|c} 0 & 1 & 0 & 7 \\ 1 & 0 & 0 & 4 \\ 0 & 0 & 0 & 0 \end{array}\right] \end{equation*}
\begin{equation*} F=\left[\begin{array}{ccc|c} 1 & 0 & 0 & 4 \\ 0 & 1 & 0 & 7 \\ 0 & 0 & 1 & 0 \end{array}\right] \end{equation*}

Remark 1.2.11.

In practice, if we simply need to convert a matrix into reduced row echelon form, we use technology to do so.
However, it is also important to understand the Gauss-Jordan elimination algorithm that a computer or calculator uses to convert a matrix (augmented or not) into reduced row echelon form. Understanding this algorithm will help us better understand how to interpret the results in many applications we use it for in Chapter 2.

Activity 1.2.12.

Consider the matrix
\begin{equation*} \left[\begin{array}{cccc}2 & 6 & -1 & 6 \\ 1 & 3 & -1 & 2 \\ -1 & -3 & 2 & 0 \end{array}\right]. \end{equation*}
Which row operation is the best choice for the first move in converting to RREF?
  1. Add row 3 to row 2 (\(R_2+R_3 \rightarrow R_2\))
  2. Add row 2 to row 3 (\(R_3+R_2 \rightarrow R_3\))
  3. Swap row 1 to row 2 (\(R_1 \leftrightarrow R_2\))
  4. Add -2 row 2 to row 1 (\(R_1-2R_2 \rightarrow R_1\))

Activity 1.2.13.

Consider the matrix
\begin{equation*} \left[\begin{array}{cccc} \markedPivot{1} & 3 & -1 & 2 \\ 2 & 6 & -1 & 6 \\ -1 & -3 & 2 & 0 \end{array}\right]. \end{equation*}
Which row operation is the best choice for the next move in converting to RREF?
  1. Add row 1 to row 3 (\(R_3+R_1 \rightarrow R_3\))
  2. Add -2 row 1 to row 2 (\(R_2-2R_1 \rightarrow R_2\))
  3. Add 2 row 2 to row 3 (\(R_3+2R_2 \rightarrow R_3\))
  4. Add 2 row 3 to row 2 (\(R_2+2R_3 \rightarrow R_2\))

Activity 1.2.14.

Consider the matrix
\begin{equation*} \left[\begin{array}{cccc}\markedPivot{1} & 3 & -1 & 2 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 1 & 2 \end{array}\right]. \end{equation*}
Which row operation is the best choice for the next move in converting to RREF?
  1. Add row 1 to row 2 (\(R_2+R_1 \rightarrow R_2\))
  2. Add -1 row 3 to row 2 (\(R_2-R_3 \rightarrow R_2\))
  3. Add -1 row 2 to row 3 (\(R_3-R_2 \rightarrow R_3\))
  4. Add row 2 to row 1 (\(R_1+R_2 \rightarrow R_1\))

Observation 1.2.15.

The steps for the Gauss-Jordan elimination algorithm may be summarized as follows:
  1. Ignoring any rows that already have marked pivots, identify the leftmost column with a nonzero entry.
  2. Use row operations to obtain a pivot of value \(1\) in the topmost row that does not already have a marked pivot.
  3. Mark this pivot, then use row operations to change all values above and below the marked pivot to \(0\text{.}\)
  4. Repeat these steps until the matrix is in RREF.
In particular, once a pivot is marked, it should remain in the same position. This will keep you from undoing your progress towards an RREF matrix.

Activity 1.2.16.

Complete the following RREF calculation (multiple row operations may be needed for certain steps):
\begin{equation*} A= \left[\begin{array}{cccc}2 & 3 & 2 & 3 \\ -2 & 1 & 6 & 1 \\ -1 & -3 & -4 & 1 \end{array}\right] \sim \left[\begin{array}{cccc}\markedPivot{1} & \unknown & \unknown & \unknown \\ -2 & 1 & 6 & 1 \\ -1 & -3 & -4 & 1 \end{array}\right] \sim \left[\begin{array}{cccc}\markedPivot{1} & \unknown & \unknown & \unknown \\ 0 & \unknown & \unknown & \unknown \\ 0 & \unknown & \unknown & \unknown \end{array}\right] \end{equation*}
\begin{equation*} \sim \left[\begin{array}{cccc}\markedPivot{1} & \unknown & \unknown & \unknown \\ 0 & \markedPivot{1} & \unknown & \unknown \\ 0 & \unknown & \unknown & \unknown \end{array}\right] \sim \left[\begin{array}{cccc}\markedPivot{1} & 0 & \unknown & \unknown \\ 0 & \markedPivot{1} & \unknown & \unknown \\ 0 & 0 & \unknown & \unknown \end{array}\right] \sim \cdots \sim \left[\begin{array}{cccc}\markedPivot{1} & 0 & -2 & 0 \\ 0 & \markedPivot{1} & 2 & 0 \\ 0 & 0 & 0 & 1 \end{array}\right] \end{equation*}

Activity 1.2.17.

Consider the matrix
\begin{equation*} A=\left[\begin{array}{cccc} 2 & 4 & 2 & -4 \\ -2 & -4 & 1 & 1 \\ 3 & 6 & -1 & -4 \end{array}\right]. \end{equation*}
Compute \(\RREF(A)\text{.}\)

Activity 1.2.18.

Consider the non-augmented and augmented matrices
\begin{equation*} A=\left[\begin{array}{cccc} 2 & 4 & 2 & -4 \\ -2 & -4 & 1 & 1 \\ 3 & 6 & -1 & -4 \end{array}\right]\hspace{2em} B=\left[\begin{array}{ccc|c} 2 & 4 & 2 & -4 \\ -2 & -4 & 1 & 1 \\ 3 & 6 & -1 & -4 \end{array}\right]. \end{equation*}
Can \(\RREF(A)\) be used to find \(\RREF(B)\text{?}\)
  1. Yes, \(\RREF(A)\) and \(\RREF(B)\) are exactly the same.
  2. Yes, \(\RREF(A)\) may be slightly modified to find \(\RREF(B)\text{.}\)
  3. No, a new calculuation is required.

Activity 1.2.19.

Free browser-based technologies for mathematical computation are available online.
  • In the dropdown on the right, you can select a number of different languages. Select "Octave" for the Matlab-compatible syntax used by this text.
  • Type rref([1,3,2;2,5,7]) and then press the Evaluate button to compute the \(\RREF\) of \(\left[\begin{array}{ccc} 1 & 3 & 2 \\ 2 & 5 & 7 \end{array}\right]\text{.}\)
  • Now try using whitespace to write out the matrix and compute \(\RREF\) instead:
    A = [1 3 2
         2 5 7]
    
    rref(A)
    

Activity 1.2.20.

In the HTML version of this text, code cells are often embedded for your convenience when RREFs need to be computed.
Try this out to compute \(\RREF\left[\begin{array}{cc|c} 2 & -3 & 1 \\ 3 & 0 & 6 \end{array}\right]\text{.}\)

Subsection 1.2.3 Individual Practice

Activity 1.2.21.

Find three examples of linear systems for which the RREF of their augmented matrices is equal to
\begin{equation*} \left[\begin{array}{ccc|c} 1 & 4 & 2 & -4 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right] \end{equation*}

Activity 1.2.22.

Which of the following matrices are not in RREF?
\begin{equation*} A=\left[\begin{array}{ccc|c} 1 & 0 & 2 & -3 \\ 0 & 3 & 3 & -3 \\ 0 & 0 & 0 & 1 \end{array}\right] \end{equation*}
\begin{equation*} B=\left[\begin{array}{ccc|c} 1 & 0 & 0 & 7 \\ 0 & 1 & 0 & 4 \\ 0 & 0 & 1 & 3 \end{array}\right] \end{equation*}
\begin{equation*} C=\left[\begin{array}{ccc|c} 1 & 0 & 0 & 4 \\ 0 & 1 & 0 & 7 \\ 0 & 0 & 0 & 4 \end{array}\right] \end{equation*}

Subsection 1.2.4 Videos

Figure 2. Video: Row reduction

Exercises 1.2.5 Exercises

Subsection 1.2.6 Mathematical Writing Explorations

Exploration 1.2.23.

Prove that Gauss-Jordan Elimination preserves the solution set of a system of linear equations in \(n\) variables. Make sure your proof includes each of the following. Just because I’ve used bullet points here does not mean you should use bullet points in your proof.
  • Write an arbitrary system of linear equations in \(n\) variables. Your notation should be unambiguous.
  • Label an element of your solution set. You won’t know what it is exactly, so you’ll have to use a variable. Remember what it means (by definition!) to be in the solution set.
  • Describe the three operations used in Gauss-Jordan Elimination.
  • Consider all three operations in Gauss-Jordan Elimination. After each one is used, show that the element of the solution set you picked still satisfies the definition.

Exploration 1.2.24.

Let \(M_{2,2}\) indicate the set of all \(2 \times 2\) matrices with real entries. Show that equivalence of matrices as defined in this section is an equivalence relation, as in exploration Exploration 1.1.22

Subsection 1.2.7 Sample Problem and Solution

Sample problem Example B.1.2.