From a Sequence of Row Operations to a Matrix Product
A row operation changes a matrix in a controlled way. Once each operation is represented by an elementary matrix, carrying out several row operations becomes matrix multiplication. The order matters: the operation performed last appears on the left of the product. To undo the full sequence, reverse the order of the operations as well as undoing each individual operation.
Work over \(\mathbb{R}\), and let \(\mathbf{A}\) be a matrix with \(m\) rows. An elementary matrix of size \(m\times m\) is obtained by performing one elementary row operation on \(\mathbf{I}_m\). Left multiplication by that matrix performs the same row operation on any \(m\)-row matrix. The inverse of an elementary matrix represents the row operation that undoes its operation. In particular, a row exchange undoes itself, scaling a row by a nonzero \(c\) is undone by scaling it by \(1/c\), and adding \(c\) times one row to another is undone by adding \(-c\) times that row.
For example, if \(S_1\) is represented by \(\mathbf{E}_1\) and \(S_2\) by \(\mathbf{E}_2\), then first applying \(S_1\) gives \(\mathbf{E}_1\mathbf{A}\). Applying \(S_2\) to that result gives \(\mathbf{E}_2(\mathbf{E}_1\mathbf{A})=(\mathbf{E}_2\mathbf{E}_1)\mathbf{A}\). This explains why the written product runs opposite to the chronological list of operations.
Proof. We use induction on the number \(k\) of operations. If \(k=0\), no row changes occur, so the result is \(\mathbf{I}_m\mathbf{A}=\mathbf{A}\). Now assume the statement holds for a sequence of \(k\) operations. Its result is \((\mathbf{E}_k\cdots\mathbf{E}_1)\mathbf{A}\). A further operation \(S_{k+1}\), represented by \(\mathbf{E}_{k+1}\), left-multiplies this result, giving \(\mathbf{E}_{k+1}(\mathbf{E}_k\cdots\mathbf{E}_1)\mathbf{A}=(\mathbf{E}_{k+1}\cdots\mathbf{E}_1)\mathbf{A}\) by associativity of matrix multiplication. This proves the claim for \(k+1\), and hence for every finite sequence. \(\square\)
The Rule for Reversing the Product
Proof. To undo the last operation \(S_k\), first apply its inverse, represented by \(\mathbf{E}_k^{-1}\); then undo \(S_{k-1}\), and continue until applying \(\mathbf{E}_1^{-1}\). By the proposition, the matrix for this reversed sequence is \(\mathbf{E}_1^{-1}\cdots\mathbf{E}_k^{-1}=\mathbf{Q}\). Each elementary matrix is invertible, so \(\mathbf{E}_i^{-1}\mathbf{E}_i=\mathbf{E}_i\mathbf{E}_i^{-1}=\mathbf{I}_m\). Associativity lets us cancel adjacent inverse pairs in both products: \(\mathbf{Q}\mathbf{P}=\mathbf{E}_1^{-1}\cdots\mathbf{E}_k^{-1}\mathbf{E}_k\cdots\mathbf{E}_1=\mathbf{I}_m\) and \(\mathbf{P}\mathbf{Q}=\mathbf{E}_k\cdots\mathbf{E}_1\mathbf{E}_1^{-1}\cdots\mathbf{E}_k^{-1}=\mathbf{I}_m\). Thus the reversed sequence undoes the original on either side. If \(k=0\), both products are the empty product \(\mathbf{I}_m\), so the statement also holds for an empty sequence. \(\square\)
The theorem is a sequence-specific way to find an inverse: identify each inverse operation, reverse the order, and multiply the corresponding elementary matrices. It does not mean that the inverse product is formed by simply inverting each factor while keeping their original order.
Worked Sequences and Their Reversals
Worked Example: Exchange, Scale, Then Add
Apply, in order, \(R_1\to R_1+2R_2\), \(R_2\to 3R_2\), and \(R_1\leftrightarrow R_2\). Find the operation matrix and its inverse.
The elementary matrices are obtained by performing each operation on \(\mathbf{I}_2\):
The chronological sequence is \(S_1,S_2,S_3\), so its product is \(\mathbf{P}=\mathbf{E}_3\mathbf{E}_2\mathbf{E}_1\). First,
To reverse the sequence, first exchange the rows, then scale the new second row by \(1/3\), then replace row 1 by row 1 minus twice row 2. Thus
Check: Multiplication in both orders gives
For instance, the first row of \(\mathbf{P}\mathbf{Q}\) is \(3\) times the second row of \(\mathbf{Q}\), namely \((1,0)\); its second row is the first row of \(\mathbf{Q}\) plus twice its second row, namely \((0,1)\). This confirms the product and its inverse.
Worked Example: Three Operations on a Matrix
Apply \(R_2\to R_2+2R_1\), then \(R_1\leftrightarrow R_3\), then \(R_3\to 2R_3\) to
The successive row operations give
The elementary matrices and their product are
Indeed, multiplying \(\mathbf{P}\mathbf{A}\) gives rows equal to row 3 of \(\mathbf{A}\), twice row 1 plus row 2, and twice row 1, respectively. The result is \(\begin{bmatrix}2&0&1\\2&5&3\\2&4&0\end{bmatrix}\), as obtained by the row operations.
The reverse operations are \(R_3\to \tfrac12R_3\), then \(R_1\leftrightarrow R_3\), then \(R_2\to R_2-2R_1\). Their product is
Check: Multiplying the final matrix from the row operations by \(\mathbf{Q}\) on the left gives \(\mathbf{Q}\mathbf{P}\mathbf{A}=\mathbf{A}\). In detail, the rows of \(\mathbf{Q}\mathbf{P}\mathbf{A}\) are half of the final third row, the final second row minus the final third row, and the final first row. They are \((1,2,0)\), \((0,1,3)\), and \((2,0,1)\), exactly the rows of \(\mathbf{A}\). Also, direct multiplication gives \(\mathbf{Q}\mathbf{P}=\mathbf{I}_3\).
Worked Example: A Product Whose Factors Do Not Commute
Consider the sequence \(R_1\to R_1+R_2\), then \(R_2\to R_2-3R_1\), then \(R_1\to R_1+2R_2\). Find its operation matrix and inverse product.
The elementary matrices are \(\mathbf{E}_1=\begin{bmatrix}1&1\\0&1\end{bmatrix}\), \(\mathbf{E}_2=\begin{bmatrix}1&0\\-3&1\end{bmatrix}\), and \(\mathbf{E}_3=\begin{bmatrix}1&2\\0&1\end{bmatrix}\). Multiplying in the order required by the sequence gives
The reversed operations are \(R_1\to R_1-2R_2\), \(R_2\to R_2+3R_1\), and \(R_1\to R_1-R_2\), in that order. Therefore
Check: Multiplying back gives
The reverse product also gives \(\mathbf{Q}\mathbf{P}=\mathbf{I}_2\): its rows are \(2\) times the first row of \(\mathbf{P}\) with the sign reversed, plus \(3\) times the second row for the first row of the product, and \(3\) times the first row with the sign reversed, minus \(5\) times the second row for the second. Entrywise these are \((1,0)\) and \((0,1)\).
Common Mistake: Undoing Operations in the Original Order
In the last example, the correct inverse product is \(\mathbf{E}_1^{-1}\mathbf{E}_2^{-1}\mathbf{E}_3^{-1}\), because the inverse of the last operation must act first. A common error is to keep the original order and write \(\mathbf{W}=\mathbf{E}_3^{-1}\mathbf{E}_2^{-1}\mathbf{E}_1^{-1}\). The factors here are \(\mathbf{E}_3^{-1}=\begin{bmatrix}1&-2\\0&1\end{bmatrix}\), \(\mathbf{E}_2^{-1}=\begin{bmatrix}1&0\\3&1\end{bmatrix}\), and \(\mathbf{E}_1^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\), so the wrong product is
It fails the inverse check:
The correction is to write the actual undoing sequence in words first: undo the last operation, then the preceding one, and continue back to the first. Only then form the matrix product. This order check is especially useful when several operations are involved, because elementary matrices generally cannot be rearranged without changing the result.
Why Reversal Is Useful
A long row-operation sequence can be recorded compactly as a single product \(\mathbf{P}\). The theorem explains how to reverse that record without guessing: replace each operation by its inverse and list those inverse operations from last to first. The resulting product undoes the entire sequence, as confirmed by multiplying it with \(\mathbf{P}\) on either side.
This same bookkeeping is useful whenever row operations are used to transform a matrix. It separates two tasks that are easy to confuse: determining which operation undoes each individual step, and determining the order in which those undoing operations must be applied. The first task changes each operation; the second reverses the list.
Check Your Understanding
For each question, keep the chronological operation order distinct from the written matrix-product order.
- If the operations have elementary matrices \(\mathbf{E}_1,\mathbf{E}_2,\mathbf{E}_3\) in that order, write the operation matrix.
- Write the operation sequence that undoes \(R_1\leftrightarrow R_2\), followed by \(R_2\to 4R_2\).
- For \(\mathbf{P}=\mathbf{E}_2\mathbf{E}_1\), write the inverse product in terms of \(\mathbf{E}_1^{-1}\) and \(\mathbf{E}_2^{-1}\).
- Explain why scaling a row by \(c\) has an inverse row operation only when \(c\ne0\).
- Given a proposed reverse product \(\mathbf{Q}\), what matrix equation can you compute to check that it undoes \(\mathbf{P}\)?