Encode a row operation once
Elementary row operations first appeared as procedural moves on a matrix. We swapped rows, scaled a row by a nonzero number, and added a multiple of one row to another. On an augmented matrix, these moves are legitimate for solving a system only when the operation is applied to the entire affected row, including the entry to the right of the augmentation bar. Under that condition the operation rewrites whole equations reversibly and therefore preserves the solution set.
There is a second, more structural way to read the same moves: each elementary row operation is the same as left-multiplication by a special square matrix. This matters because it converts a sequence of elementary row operations into an ordinary matrix equation. Later, this is exactly the bridge between row reduction, invertibility, rank, determinants, and basis arguments.
The structural viewpoint also answers a practical question. If the same row operation must be performed on many columns at once, how can one encode the operation once rather than repeat it entry by entry? The identity matrix gives the encoding: its rows record exactly which old rows are used to build each new row. Matrix multiplication then applies that recipe simultaneously to every column of a compatible matrix.
Build the elementary matrix from the identity
Suppose an elementary row operation is meant to act on matrices with rows. Start with the identity matrix , apply the same elementary row operation to , and call the result . All scalars are taken from the underlying field of the matrices; in particular, every nonzero scaling factor has a reciprocal in that field.
Definition
Elementary row-operation matrix
The elementary row-operation matrix associated with an elementary row operation on -row matrices is the matrix obtained by applying to .
This matrix is also called an elementary matrix. The longer name keeps its connection with the specified row operation visible.
Equivalently,
The reason this definition is useful is the following theorem.
Theorem
Elementary row operations are left multiplication
Let be any matrix with rows. If is one elementary row operation and denotes the result of applying it to , then
So applying that elementary row operation to is the same as multiplying on the left by the elementary row-operation matrix obtained from the same operation on .
The multiplication must be on the left. Row operations change rows by mixing rows. Left multiplication forms new rows of as linear combinations of old rows of . Right multiplication would instead mix columns.
The dimensions make the same point. If is , then is , so is defined and remains . There is no assumption that is square. By contrast, a right multiplier would need an matrix and would act on the columns.
Why left multiplication performs the operation
Proof
Verify the three elementary cases row by row
Write the rows of an arbitrary matrix as , and let denote row of . The basic identity
says that a row of a left multiplier selects the corresponding row of . Now check the three elementary operations.
-
For , the matrix has row equal to , row equal to , and every other row equal to . Thus the rows of are the rows of with precisely rows and exchanged.
-
For , where , row of is and all other rows are unchanged. Hence row of the product is
while row remains for .
-
For , where , row of is and every other row is unchanged. Therefore the new row is
exactly as prescribed.
These cases exhaust the elementary row operations, so they prove for every compatible . The proof does not claim that an arbitrary manipulation of rows has such an elementary matrix; must be one of the three operations just checked.
Acting on an augmented matrix
Suppose is represented by the augmented matrix . An elementary row operation must act on the full augmented matrix, not separately on whichever entries happen to be convenient. The multiplication identity is
Thus the coefficients and the right-hand side undergo the same combination of rows. A vector satisfies if and only if it satisfies : the forward implication follows by multiplying the equation by , and the reverse implication follows by applying the reverse elementary operation. This is the precise reason the solution set is preserved.
Changing only while leaving fixed, or changing only , generally produces a different system. The augmentation bar is therefore a visual separator, not a boundary at which a row operation may stop.
Encode replacement, scaling, and interchange
The three elementary row operations give three corresponding types of elementary row-operation matrices.
Worked example
Row addition
For matrices with three rows, consider
Apply this operation to :
Therefore, for every matrix with three rows,
is the matrix obtained from by the operation .
Worked example
Row scaling
For
the elementary row-operation matrix is
The nonzero condition in row scaling is visible here: if the scaling factor were , the resulting matrix would have a zero row and could not be reversed.
Worked example
Row swap
For
we get
Multiplying by this matrix on the left swaps the first and third rows of any compatible matrix.
Trace elementary left multiplication
The three examples above all follow the same rule: do the elementary row operation to the identity matrix first, then use the resulting matrix as a left multiplier. The sequence below records that rule before we use products of several elementary row-operation matrices.
See how an elementary row operation becomes a left multiplier: apply it to the identity, then use the resulting matrix to change rows of any compatible matrix.
Start from I
For ρ: R₂ ← R₂ + 3R₁, first apply the operation to I₃.
Build Eρ
Only row 2 of I₃ changes, giving Eρ with row 2 equal to [3,1,0].
Multiply on the left
The same matrix performs the operation on A: ρ(A)=Eρ A.
Read the new row
The new second row is old row 2 plus three copies of old row 1.
Keep product order
In A₃=E₂E₁A₁, E₁ sits closest to A₁ because ρ₁ acts first.
Reverse gives inverse
The inverse of R₂ ← R₂ + 3R₁ is R₂ ← R₂ − 3R₁, so the corresponding matrices multiply to I.
A row-operation matrix is built by doing the row operation to the identity matrix. Multiplying by that matrix on the left then performs the same row operation on any compatible matrix, and the reverse row operation gives the inverse matrix.
Compare a row operation with its matrix product
Use the stepper to revisit a row-operation sequence. At each step, read the displayed move as left multiplication by the matching elementary matrix.
Read and try
Trace one full row-reduction path
The live stepper walks through one complete elimination path, showing the row operation, the pivot you are focusing on, and the matrix produced at each step.
| 1 | 2 | 2 | 4 |
| 1 | 3 | 3 | 5 |
| 2 | 6 | 5 | 6 |
Row operation
Choose the first pivot in column 1.
What to notice
Column 1 already has a convenient pivot 1 in the first row, so we do not need a row swap.
Start with the augmented matrix. The first pivot should help us clear the entries underneath it.
A sequence of elementary row operations becomes one matrix product
The real payoff is not just representing one elementary row operation. A whole sequence of elementary row operations becomes one product of elementary row-operation matrices.
Theorem
A sequence of elementary row operations as a product
Suppose
Then
Here every is an elementary row operation on matrices with the same number of rows. The product represents the whole sequence, although the product itself need not be a single elementary row-operation matrix.
The order in this formula is important. The first row operation appears closest to , because it is applied first:
Worked example
Two row operations combined
Let
Apply
The corresponding row-operation matrices are
After both operations, the result is
Instead of multiplying directly, you can also obtain this combined matrix by applying the same two elementary row operations to in the same order. The final numerical matrix also confirms that the second operation uses the already-updated row .
Reading a longer row-operation product
In written exercises and examinations, elementary row operations are often given as a long chain. The goal is not to multiply many matrices blindly. The goal is to keep three objects separate:
- the matrices being transformed;
- the elementary row-operation matrices ;
- the single combined left multiplier .
Here is a typical four-row example. Suppose
If
then
The corresponding row-operation matrices are
Their product is
The efficient way to obtain is to apply the six operations to , not to expand all six factors by hand. The matrix records the total effect of the chain on rows:
This equation is also a good check on the order. If the first operation were placed on the far left, the product would describe a different chain.
Checkpoint
In the six-step chain above, suppose is the row-operation matrix product for the reverse chain from back to . What equation should and satisfy?
Think of as undoing the total effect of .
Solution · Answer
The matrices and encode transformations of every four-row matrix, not just the displayed matrix . For any four-row matrix , applying the forward chain and then its reverse gives
Taking yields . In the other order, the reverse chain followed by the forward chain restores every four-row matrix , so ; taking yields . Therefore
Equivalently, .
Reverse row operations and inverses
Every elementary row operation has a reverse operation:
- the reverse of is ;
- the reverse of , with , is ;
- the reverse of a row swap is the same row swap.
This gives a precise matrix statement.
Theorem
Elementary row-operation matrices are invertible
Every elementary row-operation matrix is invertible. Its inverse is the elementary row-operation matrix corresponding to the reverse elementary row operation.
Proof
Why the reverse matrix is a two-sided inverse
Let represent an elementary row operation , and let represent the reverse elementary operation. For every matrix with rows, applying and then reversing it restores . By the left-multiplication theorem,
This statement holds for every such ; in particular, put to obtain . Reversing first and then applying similarly gives . Hence
Concretely, a swap is its own inverse, scaling by is undone by scaling by , and adding times row to row is undone by adding times row to row .
For example, if
performs , then
performs .
This is the algebraic reason elementary row operations are reversible, and it explains why row reduction is so closely connected to invertible matrices.
Proof
Undo the last operation first
Let encode a chronological chain on matrices with rows, so its combined multiplier is . Each inverse represents the reverse of the corresponding elementary operation. To recover the input, the first move must undo , because that was the last change made to the rows. The remaining reverse moves undo in that order. Consequently the reverse multiplier is
There are two orders to distinguish: the time order of the reverse operations starts with , while the written product places that first action nearest the matrix being restored. For three steps, associativity gives
The other product cancels adjacent inverse pairs starting with and also equals . The same successive cancellation works for any finite chain. No factors have been commuted, and the argument does not require the matrix being transformed to be square.
Apply this reading to the earlier two-operation example. Its combined multiplier is , so its inverse is . Starting from the final matrix, first subtract twice the current second row from the first, recovering as the first row. Then subtract that recovered first row from the second, recovering . Reversing the chain means restoring the intermediate states, which explains the order without a memorized rule.
Why this viewpoint matters later
If is row-equivalent to , then there is a finite sequence of elementary row operations taking to . Therefore there is a product of elementary row-operation matrices such that
Because each elementary row-operation matrix is invertible, the product is invertible. So row equivalence can be discussed either procedurally, by listing elementary row operations, or algebraically, by writing an equation with an invertible matrix on the left. The converse statement also needs care: an arbitrary invertible left multiplier need not itself describe one elementary step.
This is useful in several later arguments:
- a square matrix row-equivalent to is a product of elementary row-operation matrices;
- elementary row operations preserve homogeneous solution information because they amount to multiplying by invertible matrices;
- determinant rules for elementary row operations can be expressed through elementary matrices;
- rank and basis arguments can use row reduction without pretending the original columns themselves have not changed.
Common mistakes
Common mistake
Do not multiply on the wrong side
Elementary row operations are represented by left multiplication. Right multiplication would combine columns, not rows.
Common mistake
Do not reverse the product order
If is applied before , then the combined matrix is , not .
Common mistake
Do not use a zero row scaling
The scaling operation requires a nonzero scalar. Scaling a row by cannot be reversed and does not produce an invertible elementary row-operation matrix.
Common mistake
One restored matrix is not enough to prove an inverse
From for one particular matrix , one cannot in general conclude : the columns of may not detect every possible input. Prove that the composed row transformations restore every compatible matrix, or simply apply them to . That is why the argument for above uses arbitrary -row matrices before substituting the identity.
Read products in the order they act
An elementary row operation on -row matrices is encoded by applying that operation to . The resulting elementary matrix acts on every compatible matrix by left multiplication, and the identity follows by checking the output rows in the swap, nonzero scaling, and row-addition cases. On an augmented matrix, the operation must act across the whole row, including the right-hand side, so that the corresponding system keeps exactly the same solutions.
A sequence is represented in application order by . Each factor is invertible because the reverse elementary operation supplies a two-sided inverse. Consequently a finite row reduction can be treated as one invertible left transformation, while the individual factors still record the precise elementary steps.
Quick checks
Checkpoint
For matrices with three rows, what row operation is represented by ?
Ask which row of changed.
Solution · Answer
Only row changed: five times row was added to it. Therefore
Checkpoint
What is the inverse row operation for ?
Undo the added multiple.
Solution · Answer
The inverse operation is
Exercises
Checkpoint
Write the row-operation matrix for on matrices with three rows.
Apply the swap to .
Solution · Guided solution
Swapping the first two rows of gives
This is the matrix that swaps rows and when multiplied on the left.
Checkpoint
Suppose is obtained from by first doing , then . Write as a product involving .
Name the two row-operation matrices in the order they act.
Solution · Guided solution
Let be the row-operation matrix for , and let be the row-operation matrix for . Since acts first and acts second,
Checkpoint
Let . Suppose is obtained from a five-row matrix by the chain , then , then , then , then . Write the single matrix such that .
Apply the same operations to , remembering that later operations use the current rows, not the original rows.
Solution · Guided solution
Applying the operations to gives
The entry is the main point. The operation occurs after row has already been scaled to , so the contribution from the original row is .
Checkpoint
For the matrix in the previous exercise, suppose . Write the matrix such that .
Reverse the row operations in reverse order.
Solution · Guided solution
The inverse chain is
Therefore
This is , so implies .
Related notes
This page builds on 2.2 Augmented matrices and row operations and 3.2 Matrix multiplication, identity matrices, and linear systems. Continue to 3.6 Block matrices for the final Chapter 3 note. It prepares the algebraic row-reduction viewpoint used in 5.1 Invertible matrices and 7.2 Row operations, products, and invertibility.