Undoing a Single Row Operation
An elementary matrix records one row operation: apply that operation to the identity matrix, and the resulting matrix is elementary. Its inverse should undo exactly that operation. For a row swap, undoing means swapping the same rows again. For scaling a row, undoing means scaling by the reciprocal. For adding a multiple of one row to another, undoing means adding the opposite multiple. These descriptions suggest the answer; we will verify that each produces a two-sided matrix inverse.
Throughout this tutorial, matrices and scalars are over \(\mathbb{R}\). Let \(\mathbf{I}_n\) denote the \(n\times n\) identity matrix, where \(n\geq 1\). An elementary row operation is one of these operations on an \(n\)-row matrix: interchange two distinct rows; multiply one row by a nonzero scalar; or add a scalar multiple of one row to a different row. Applying the operation to \(\mathbf{I}_n\) gives its elementary matrix.
The restriction to a nonzero scaling factor matters: multiplying a row by zero erases its entries, so that operation cannot be undone in general. By contrast, the scalar in a row replacement may be any real number, including zero; if it is zero, the operation simply leaves the matrix unchanged.
The Reverse Operation Gives an Inverse
To connect row operations with matrix inverses, we use the left-multiplication rule: if \(\mathbf{E}\) is the elementary matrix for an operation, then \(\mathbf{E}\mathbf{A}\) is the matrix obtained by applying that operation to the rows of \(\mathbf{A}\). Thus it is enough to check what happens when we apply an operation and then its proposed reverse.
- Interchanging rows \(i\) and \(j\): interchange rows \(i\) and \(j\) again.
- Multiplying row \(i\) by \(c\ne0\): multiply row \(i\) by \(1/c\).
- Replacing row \(i\) by row \(i\) plus \(c\) times row \(j\), where \(i\ne j\): replace row \(i\) by row \(i\) minus \(c\) times row \(j\).
Proof. Consider an arbitrary matrix \(\mathbf{A}\). If rows \(i\) and \(j\) are interchanged twice, each row returns to its original position and every other row remains unchanged. If row \(i\) is multiplied by \(c\ne0\) and then by \(1/c\), its result is \((1/c)(c\mathbf{a}_i)=\mathbf{a}_i\), where \(\mathbf{a}_i\) denotes the original row; doing these scalings in the opposite order also gives \(c((1/c)\mathbf{a}_i)=\mathbf{a}_i\). Finally, in a replacement, row \(j\) is unchanged because \(i\ne j\). After replacing row \(i\) by \(\mathbf{a}_i+c\mathbf{a}_j\), the reverse replacement gives \((\mathbf{a}_i+c\mathbf{a}_j)-c\mathbf{a}_j=\mathbf{a}_i\). In the opposite order, \((\mathbf{a}_i-c\mathbf{a}_j)+c\mathbf{a}_j=\mathbf{a}_i\). All other rows are unchanged in each case, so either order restores \(\mathbf{A}\). \(\square\)
- If \(\mathbf{S}_{ij}\) interchanges rows \(i\) and \(j\), then \(\mathbf{S}_{ij}^{-1}=\mathbf{S}_{ij}\).
- If \(\mathbf{D}_i(c)\) multiplies row \(i\) by \(c\ne0\), then \(\mathbf{D}_i(c)^{-1}=\mathbf{D}_i(1/c)\).
- If \(\mathbf{T}_{ij}(c)\) replaces row \(i\) by row \(i\) plus \(c\) times row \(j\), with \(i\ne j\), then \(\mathbf{T}_{ij}(c)^{-1}=\mathbf{T}_{ij}(-c)\).
Proof. Let \(\mathbf{E}\) be the elementary matrix of a row operation, and let \(\mathbf{F}\) be the elementary matrix of the reverse operation specified in the proposition. For every \(n\times n\) matrix \(\mathbf{A}\), left multiplication by \(\mathbf{E}\) performs the first operation, and left multiplication by \(\mathbf{F}\) then performs its reverse. The proposition therefore gives \(\mathbf{F}(\mathbf{E}\mathbf{A})=\mathbf{A}\), so \((\mathbf{F}\mathbf{E})\mathbf{A}=\mathbf{A}\). Taking \(\mathbf{A}=\mathbf{I}_n\) shows \(\mathbf{F}\mathbf{E}=\mathbf{I}_n\). Applying the two operations in the opposite order gives \((\mathbf{E}\mathbf{F})\mathbf{A}=\mathbf{A}\) for every \(\mathbf{A}\); taking \(\mathbf{A}=\mathbf{I}_n\) gives \(\mathbf{E}\mathbf{F}=\mathbf{I}_n\). Thus \(\mathbf{F}\) is a two-sided inverse of \(\mathbf{E}\). The three formulas follow by identifying the reverse operation in each case. \(\square\)
The two-sided check is useful: an inverse is not just a matrix that seems to undo a row operation in one direction. By definition, \(\mathbf{F}\) is an inverse of \(\mathbf{E}\) when both \(\mathbf{F}\mathbf{E}=\mathbf{I}_n\) and \(\mathbf{E}\mathbf{F}=\mathbf{I}_n\). The proof establishes both equations for each type of elementary matrix.
Worked Inverses for the Three Operation Types
Worked Example: Interchanging Two Rows
Let \(\mathbf{E}\) be the elementary matrix that interchanges rows 1 and 3 of a \(3\times3\) matrix. Apply the same operation to \(\mathbf{I}_3\): its first and third rows switch, giving
The reverse operation is the same swap, so the proposed inverse is \(\mathbf{E}\) itself. Multiplying in either order gives
Check: the first multiplication swaps the first and third rows of \(\mathbf{E}\), and the second swap restores them. The displayed product is the identity, as required.
Worked Example: Scaling a Row
Let \(\mathbf{E}\) multiply row 2 by \(-2\). Applying this operation to \(\mathbf{I}_3\) gives a diagonal matrix with \(-2\) in position \((2,2)\):
The reverse scaling factor is \(1/(-2)=-\tfrac12\), so the candidate inverse is
Because both matrices are diagonal, their product has the products of corresponding diagonal entries on its diagonal, and zero off the diagonal. In either order, the result is
Thus \(\mathbf{E}^{-1}=\mathbf{F}\). The row-operation check is the same: multiplying a row by \(-2\), then by \(-\tfrac12\), multiplies it overall by \(1\).
Worked Example: Adding a Multiple of Another Row
Let \(\mathbf{E}\) replace row 1 by row 1 plus \(3\) times row 2. Applying this to the identity adds \(3\) times its second row to its first:
The reverse operation replaces row 1 by row 1 minus \(3\) times row 2. Applying it to the identity gives the candidate inverse \(\mathbf{F}\):
Multiplying in the first order gives
In the other order, the entry in row 1, column 2 is \(3-3=0\), while the diagonal entries remain \(1\) and the other entries remain \(0\):
Therefore \(\mathbf{E}^{-1}=\mathbf{F}\). The key detail is that row 2 is unchanged, so subtracting \(3\) times row 2 cancels exactly the \(3\) times row 2 that was added to row 1.
How to Choose and Check the Reverse
For a single elementary matrix, the inverse can be found directly from the operation used to create it. Identify the affected row or rows, reverse that operation, and apply the reverse operation to the identity. The resulting matrix is the candidate inverse. A multiplication check then confirms the result; for a proposed inverse \(\mathbf{F}\) of \(\mathbf{E}\), check both \(\mathbf{E}\mathbf{F}=\mathbf{I}_n\) and \(\mathbf{F}\mathbf{E}=\mathbf{I}_n\).
These rules differ in a way that is easy to confuse. A row swap is its own reverse; a scaling uses the reciprocal factor; and a row replacement uses the negative of the original coefficient. For example, adding \(3\) times row 2 to row 1 is undone by subtracting \(3\) times row 2 from row 1—not by dividing by \(3\).
Record which row or rows change and the scalar used.
Repeat a swap, use the reciprocal of a nonzero scaling factor, or negate the coefficient in a row replacement.
The result is the candidate inverse elementary matrix.
Multiply in both orders and check that each product is \(\mathbf{I}_n\).
Common Mistake: Using the Wrong Scalar
A frequent error is to confuse reversing a scaling with reversing a row replacement. If row 1 is scaled by \(2\), scaling it by \(-2\) does not undo the change: the combined factor is \(2(-2)=-4\), not \(1\). The correct reverse factor is \(1/2\), since \(2(1/2)=1\). In contrast, if row 1 is replaced by row 1 plus \(2\) times row 2, the reverse coefficient is \(-2\), not \(1/2\).
For a concrete scaling check, multiplying row 2 by \(2\) has elementary matrix \(\begin{bmatrix}1&0\\0&2\end{bmatrix}\). The incorrect proposed reverse \(\begin{bmatrix}1&0\\0&-2\end{bmatrix}\) gives product \(\begin{bmatrix}1&0\\0&-4\end{bmatrix}\), not \(\mathbf{I}_2\). The correct reverse is \(\begin{bmatrix}1&0\\0&\frac12\end{bmatrix}\), and both products have diagonal entries \(1\cdot1=1\) and \(2\cdot\frac12=1\), so both equal \(\mathbf{I}_2\).
Also keep the nonzero condition in view. If a row were multiplied by \(0\), no later scaling could restore an arbitrary original row: the zero row contains no information about the entries that were erased. Accordingly, row scaling by zero is not one of the elementary row operations, and its matrix is not invertible.
Elementary matrices are useful because each represents an invertible, precisely controlled change to rows. This tutorial establishes the inverse for one operation at a time; the same reverse-operation idea is the ingredient used when undoing several row operations in succession.
Check Your Understanding
For each question, state the reverse row operation and, where requested, verify the inverse by multiplication.
- What elementary matrix interchanges rows 1 and 2 of a \(2\times2\) matrix, and what is its inverse?
- Find the inverse of the elementary matrix that multiplies row 3 by \(4\). State why the scaling rule applies.
- Write the inverse of the matrix that replaces row 2 by row 2 minus \(5\) times row 1.
- Explain why multiplying a row by zero cannot be reversed for every input matrix.
- A proposed inverse for the scaling matrix \(\begin{bmatrix}1&0\\0&3\end{bmatrix}\) is \(\begin{bmatrix}1&0\\0&-3\end{bmatrix}\). Multiply the matrices and identify the error.