Row Operations and Elementary Matrices

We show that performing elementary row operations on a system of equations represented by

\[ A X = B \]

is equivalent to multiplying both sides of the equation by an elementary matrix (defined below). We analyze the three row operations one at a time, with detailed examples and practice questions.

Key Idea

Every elementary row operation on a system \(AX = B\) corresponds to left-multiplying both sides by an elementary matrix \(E\):

\( E( AX ) = E B \;\Longrightarrow\; (E A) X = E B. \)

The coefficient matrix \(A\) and the right-hand side \(B\) are transformed simultaneously, so the solution set of the system is preserved.

Elementary Matrix Equivalent to Interchanging Two Rows

We start with the following system (I) in matrix form:

\[ \begin{bmatrix} -1 & 2 & -1 \\ 2 & -1 & -1 \\ 1 & 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -5 \\ 4 \\ -3 \end{bmatrix} \quad \text{(I)} \]

Interchange row 1 and row 3 to obtain system (II):

\[ \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & -1 \\ -1 & 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 4 \\ -5 \end{bmatrix} \quad \text{(II)} \]

Starting from the identity matrix \(I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\), interchanging rows 1 and 3 gives the elementary matrix \(E_1\):

\[ E_1 = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}. \]

Multiply both sides of system (I) by \(E_1\):

\[ \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix} \begin{bmatrix} -1 & 2 & -1 \\ 2 & -1 & -1 \\ 1 & 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix} \begin{bmatrix} -5 \\ 4 \\ -3 \end{bmatrix} \]

\[ \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & -1 \\ -1 & 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 4 \\ -5 \end{bmatrix}. \]

Conclusion. Interchanging rows 1 and 3 of the system is equivalent to left-multiplying both sides by \(E_1\). The resulting system is exactly (II).

Elementary Matrix Equivalent to Multiplying a Row by a Constant

Starting from system (II), multiply row 3 by 2 to obtain system (III):

\[ \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & -1 \\ -2 & 4 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 4 \\ -10 \end{bmatrix} \quad \text{(III)} \]

Multiply row 3 of \(I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\) by \(2\) to obtain the elementary matrix \(E_2\):

\[ E_2 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix}. \]

Multiply both sides of system (II) by \(E_2\):

\[ \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & -1 \\ -1 & 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} -3 \\ 4 \\ -5 \end{bmatrix}. \]

\[ \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & -1 \\ -2 & 4 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 4 \\ -10 \end{bmatrix}. \]

Conclusion. Multiplying row 3 by \(2\) is equivalent to left-multiplying both sides of the system by \(E_2\).

Elementary Matrix Equivalent to Adding a Multiple of a Row to Another Row

Starting from system (III), multiply row 1 by \(-2\) and add it to row 2 to obtain system (IV):

\[ \begin{bmatrix} 1 & 2 & -1 \\ 0 & -5 & 1 \\ -2 & 4 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 10 \\ -10 \end{bmatrix} \quad \text{(IV)} \]

Apply the same operation to \(I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\) to obtain the elementary matrix \(E_3\):

\[ E_3 = \begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}. \]

Multiply both sides of system (III) by \(E_3\):

\[ \begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & -1 \\ -2 & 4 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} -3 \\ 4 \\ -10 \end{bmatrix}. \]

\[ \begin{bmatrix} 1 & 2 & -1 \\ 0 & -5 & 1 \\ -2 & 4 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 10 \\ -10 \end{bmatrix}. \]

Conclusion. Adding \(-2\) times row 1 to row 2 is equivalent to left-multiplying both sides by \(E_3\).

Inverses of the Elementary Matrices

A key advantage of elementary matrices is that their inverses can be written down immediately — just reverse the corresponding row operation.

Inverse of \(E_1\) (row swap)

\(E_1\) was obtained by interchanging rows 1 and 3 of \(I_3\). Undoing this means swapping them back — which is the same operation. Hence \(E_1^{-1} = E_1\):

\[ E_1^{-1} = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}. \]

Check: \(E_1 E_1^{-1} = I_3\).

Inverse of \(E_2\) (row scaling)

\(E_2\) was obtained by multiplying row 3 of \(I_3\) by \(2\). Undoing this means multiplying row 3 by \(\tfrac{1}{2}\):

\[ E_2^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & \tfrac{1}{2} \end{bmatrix}. \]

Check: \(E_2 E_2^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & \tfrac{1}{2} \end{bmatrix} = I_3\).

Inverse of \(E_3\) (row addition)

\(E_3\) was obtained by adding \(-2\) times row 1 to row 2. Undoing this means adding \(+2\) times row 1 to row 2:

\[ E_3^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}. \]

Check: \(E_3 E_3^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = I_3\).

Summary Table

Elementary Matrix Row Operation Inverse Operation Inverse Matrix
\(E_1\) \(R_1 \leftrightarrow R_3\) \(R_1 \leftrightarrow R_3\) (same) \(E_1^{-1} = E_1\)
\(E_2\) \(R_3 \leftarrow 2R_3\) \(R_3 \leftarrow \tfrac{1}{2}R_3\) \(E_2^{-1} = \mathrm{diag}(1,1,\tfrac{1}{2})\)
\(E_3\) \(R_2 \leftarrow R_2 - 2R_1\) \(R_2 \leftarrow R_2 + 2R_1\) \(E_3^{-1}\) (with \(+2\) in place of \(-2\))
Why the inverses matter. If \(E\) transforms a system, then \(E^{-1}\) undoes the transformation. Knowing the inverse lets us reverse any row operation without re-deriving it — and, more importantly, express the original matrix in terms of the transformed one.

Questions on Elementary Matrices

Part 1 — Identifying Elementary Matrices

Which of the following are elementary matrices? Explain your reasoning.

\[ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{bmatrix}, \quad C = \begin{bmatrix} 1 & 0 \\ 4 & 1 \end{bmatrix} \]

\[ D = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -5 & 0 & 1 \end{bmatrix}, \quad E = \begin{bmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix}, \quad F = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 7 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}. \]

Solutions to Part 1

  • A: yes — swap rows 1 and 2 of \(I_2\).
  • B: yes — swap rows 2 and 3 of \(I_3\).
  • C: yes — add \(4\) times row 1 to row 2 of \(I_2\).
  • D: yes — add \(-5\) times row 1 to row 3 of \(I_3\).
  • E: no. Two distinct row operations are combined in the same matrix (adding \(1\) times row 1 to row 2, and adding \(1\) times row 1 to row 3). An elementary matrix is the result of applying exactly one elementary row operation to the identity matrix.
  • F: yes — add \(7\) times row 1 to row 3 of \(I_4\).
Part 2 — Constructing Elementary Matrices

What is the elementary matrix corresponding to each row operation for a system \(AX = B\)?

  • A) \(2 \times 2\) matrix; add \(3\) times row 1 to row 2.
  • B) \(3 \times 3\) matrix; multiply row 3 by \(-6\).
  • C) \(5 \times 5\) matrix; multiply row 2 by \(10\) and add it to row 3.

Solutions to Part 2

A)

\[ E_A = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix} \]

B)

\[ E_B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -6 \end{bmatrix} \]

C)

\[ E_C = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 10 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix} \]

Part 3 — Finding Inverses

Find the inverse of each elementary matrix constructed in Part 2.

Solutions to Part 3

A) Undo by adding \(-3\) times row 1 to row 2:

\[ E_A^{-1} = \begin{bmatrix} 1 & 0 \\ -3 & 1 \end{bmatrix} \]

B) Undo by multiplying row 3 by \(-\tfrac{1}{6}\):

\[ E_B^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -\tfrac{1}{6} \end{bmatrix} \]

C) Undo by adding \(-10\) times row 2 to row 3:

\[ E_C^{-1} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & -10 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix} \]

Check: verify that \(E \cdot E^{-1} = I\) for each pair.

More References and Links