Evanalysis
3.3Estimated reading time: 13 min

3.3 Row-operation matrices

Turn elementary row operations into left multiplication by elementary matrices, and use reverse row operations to understand why those matrices are invertible.

Course contents

MATH1030: Linear algebra I

Linear algebra notes.

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. Those moves are already legitimate for solving systems, because they preserve solution sets.

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 row operations into an ordinary matrix equation. Later, this is exactly the bridge between row reduction, invertibility, rank, determinants, and basis arguments.

The idea: do the row operation to the identity first

Suppose a row operation ρ\rho is meant to act on matrices with p rows. Start with the identity matrix IpI_p, apply the same row operation to IpI_p, and call the result EρE_\rho.

Definition

Row-operation matrix

The row-operation matrix associated with a row operation ρ\rho on p-row matrices is the p×pp \times p matrix obtained by applying ρ\rho to IpI_p.

Equivalently,

Eρ=ρ(Ip).E_\rho = \rho(I_p).

The reason this definition is useful is the following theorem.

Theorem

Row operations are left multiplication

Let AA be any matrix with p rows. If ρ(A)\rho(A) denotes the result of applying the row operation ρ\rho to AA, then

ρ(A)=EρA.\rho(A) = E_\rho A.

So applying a row operation to AA is the same as multiplying AA on the left by the row-operation matrix obtained from the same operation on IpI_p.

The multiplication must be on the left. Row operations change rows by mixing rows. Left multiplication forms new rows of AA as linear combinations of old rows of AA. Right multiplication would instead mix columns.

Three basic examples

The three allowed row operations give three corresponding types of row-operation matrices.

Worked example

Row addition

For matrices with three rows, consider

ρ:R2R2+3R1.\rho:\quad R_2 \leftarrow R_2 + 3R_1.

Apply this operation to I3I_3:

I3=[100010001]Eρ=[100310001].I_3 = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix} \quad\longmapsto\quad E_\rho = \begin{bmatrix} 1 & 0 & 0\\ 3 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix}.

Therefore, for every matrix AA with three rows,

EρAE_\rho A

is the matrix obtained from AA by replacing row 2 with row 2+3row12 + 3 row 1.

Worked example

Row scaling

For

ρ:R32R3,\rho:\quad R_3 \leftarrow -2R_3,

the row-operation matrix is

Eρ=[100010002].E_\rho = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -2 \end{bmatrix}.

The nonzero condition in row scaling is visible here: if the scaling factor were 0, the resulting matrix would have a zero row and could not be reversed.

Worked example

Row swap

For

ρ:R1R3,\rho:\quad R_1 \leftrightarrow R_3,

we get

Eρ=[001010100].E_\rho = \begin{bmatrix} 0 & 0 & 1\\ 0 & 1 & 0\\ 1 & 0 & 0 \end{bmatrix}.

Multiplying by this matrix on the left swaps the first and third rows of any compatible matrix.

A sequence of row operations becomes one matrix product

The real payoff is not just representing one row operation. A whole sequence of row operations becomes one product of row-operation matrices.

Theorem

A sequence of row operations as a product

Suppose

A1ρ1A2ρ2A3ρ3ρkAk+1.A_1 \xrightarrow{\rho_1} A_2 \xrightarrow{\rho_2} A_3 \xrightarrow{\rho_3} \cdots \xrightarrow{\rho_k} A_{k+1}.

Then

Ak+1=EρkEρk1Eρ2Eρ1A1.A_{k+1} = E_{\rho_k}E_{\rho_{k-1}}\cdots E_{\rho_2}E_{\rho_1}A_1.

The order in this formula is important. The first row operation appears closest to A1A_1, because it is applied first:

A2=Eρ1A1,A3=Eρ2A2=Eρ2Eρ1A1.A_2 = E_{\rho_1}A_1, \qquad A_3 = E_{\rho_2}A_2 = E_{\rho_2}E_{\rho_1}A_1.

Worked example

Two row operations combined

Let

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

Apply

ρ1: R2R2+R1,ρ2: R1R1+2R2.\rho_1:\ R_2 \leftarrow R_2 + R_1, \qquad \rho_2:\ R_1 \leftarrow R_1 + 2R_2.

The corresponding row-operation matrices are

Eρ1=[100110001],Eρ2=[120010001].E_{\rho_1} = \begin{bmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix}, \qquad E_{\rho_2} = \begin{bmatrix} 1 & 2 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix}.

After both operations, the result is

Eρ2Eρ1A.E_{\rho_2}E_{\rho_1}A.

Instead of multiplying Eρ2Eρ1E_{\rho_2}E_{\rho_1} directly, you can also obtain this combined matrix by applying the same two row operations to I3I_3 in the same order.

Reading a longer row-operation product

In assignment-style questions, the 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 A1,A2,,Ak+1A_1,A_2,\ldots,A_{k+1} being transformed;
  • the row-operation matrices H1,H2,,HkH_1,H_2,\ldots,H_k;
  • the single combined left multiplier J=HkH2H1J=H_k\cdots H_2H_1.

Here is a typical four-row example. Suppose

ρ1:R212R2,ρ2:R1R2,ρ3:R3R32R1,ρ4:R4R42R3,ρ5:R1R1R3,ρ6:R1R1R2.\begin{aligned} \rho_1 &: R_2 \leftarrow -\frac12 R_2,\\ \rho_2 &: R_1 \leftrightarrow R_2,\\ \rho_3 &: R_3 \leftarrow R_3-2R_1,\\ \rho_4 &: R_4 \leftarrow R_4-2R_3,\\ \rho_5 &: R_1 \leftarrow R_1-R_3,\\ \rho_6 &: R_1 \leftarrow R_1-R_2. \end{aligned}

If

A1ρ1A2ρ2A3ρ3A4ρ4A5ρ5A6ρ6A7,A_1 \xrightarrow{\rho_1} A_2 \xrightarrow{\rho_2} A_3 \xrightarrow{\rho_3} A_4 \xrightarrow{\rho_4} A_5 \xrightarrow{\rho_5} A_6 \xrightarrow{\rho_6} A_7,

then

A7=H6H5H4H3H2H1A1.A_7 = H_6H_5H_4H_3H_2H_1A_1.

The corresponding row-operation matrices are

H1=[10000120000100001],H2=[0100100000100001],H3=[1000010020100001],H4=[1000010000100021],H5=[1010010000100001],H6=[1100010000100001].\begin{aligned} H_1&= \begin{bmatrix} 1&0&0&0\\ 0&-\frac12&0&0\\ 0&0&1&0\\ 0&0&0&1 \end{bmatrix}, & H_2&= \begin{bmatrix} 0&1&0&0\\ 1&0&0&0\\ 0&0&1&0\\ 0&0&0&1 \end{bmatrix},\\[0.8em] H_3&= \begin{bmatrix} 1&0&0&0\\ 0&1&0&0\\ -2&0&1&0\\ 0&0&0&1 \end{bmatrix}, & H_4&= \begin{bmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&-2&1 \end{bmatrix},\\[0.8em] H_5&= \begin{bmatrix} 1&0&-1&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&0&1 \end{bmatrix}, & H_6&= \begin{bmatrix} 1&-1&0&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&0&1 \end{bmatrix}. \end{aligned}

Their product is

J=H6H5H4H3H2H1=[13210100001100221].J=H_6H_5H_4H_3H_2H_1= \begin{bmatrix} -1&-\frac32&-1&0\\ 1&0&0&0\\ 0&1&1&0\\ 0&-2&-2&1 \end{bmatrix}.

The efficient way to obtain JJ is to apply the six operations to I4I_4, not to expand all six factors by hand. The matrix JJ records the total effect of the chain on rows:

A7=JA1.A_7=JA_1.

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.

Quick check

In the six-step chain above, suppose KK is the row-operation matrix product for the reverse chain from A7A_7 back to A1A_1. What equation should JJ and KK satisfy?

Think of KK as undoing the total effect of JJ.

Solution

Answer

Reverse row operations and inverses

Every elementary row operation has a reverse operation:

  • the reverse of RjRj+cRiR_j \leftarrow R_j + cR_i is RjRjcRiR_j \leftarrow R_j - cR_i;
  • the reverse of RicRiR_i \leftarrow cR_i, with c0c \ne 0, is R_i \leftarrow (1/c)R_i;
  • the reverse of a row swap is the same row swap.

This gives a clean matrix statement.

Theorem

Row-operation matrices are invertible

Every row-operation matrix is invertible. Its inverse is the row-operation matrix corresponding to the reverse row operation.

For example, if

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

performs R2R2+3R1R_2 \leftarrow R_2 + 3R_1, then

E1=[100310001]E^{-1} = \begin{bmatrix} 1 & 0 & 0\\ -3 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix}

performs R2R23R1R_2 \leftarrow R_2 - 3R_1.

This is the algebraic reason row operations are reversible, and it explains why row reduction is so closely connected to invertible matrices.

Why this viewpoint matters later

If BB is row-equivalent to AA, then there is a finite sequence of row operations taking AA to BB. Therefore there is a product of row-operation matrices EE such that

B=EA.B = EA.

Because each row-operation matrix is invertible, the product EE is invertible. So row equivalence can be discussed either procedurally, by listing row operations, or algebraically, by writing an equation with an invertible matrix on the left.

This is useful in several later arguments:

  • a square matrix row-equivalent to InI_n is a product of row-operation matrices;
  • row operations preserve homogeneous solution information because they amount to multiplying by invertible matrices;
  • determinant rules for 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

Row operations are represented by left multiplication. Right multiplication would combine columns, not rows.

Common mistake

Do not reverse the product order

If ρ1\rho_1 is applied before ρ2\rho_2, then the combined matrix is Eρ2Eρ1E_{\rho_2}E_{\rho_1}, not Eρ1Eρ2E_{\rho_1}E_{\rho_2}.

Common mistake

Do not use a zero row scaling

The scaling operation requires a nonzero scalar. Scaling a row by 0 cannot be reversed and does not produce an invertible row-operation matrix.

Quick checks

Quick check

For matrices with three rows, what row operation is represented by E=[100010501]E = \begin{bmatrix} 1&0&0\\0&1&0\\5&0&1 \end{bmatrix}?

Ask which row of I3I_3 changed.

Solution

Answer

Quick check

What is the inverse row operation for R2R24R1R_2 \leftarrow R_2 - 4R_1?

Undo the added multiple.

Solution

Answer

Exercises

Quick check

Write the row-operation matrix for R1R2R_1 \leftrightarrow R_2 on matrices with three rows.

Apply the swap to I3I_3.

Solution

Guided solution

Quick check

Suppose BB is obtained from AA by first doing R2R2+R1R_2 \leftarrow R_2 + R_1, then R32R3R_3 \leftarrow 2R_3. Write BB as a product involving AA.

Name the two row-operation matrices in the order they act.

Solution

Guided solution

Quick check

Let β1,β20\beta_1,\beta_2\ne 0. Suppose BB is obtained from a five-row matrix AA by the chain α1R1+R3\alpha_1R_1+R_3, then β1R2\beta_1R_2, then R1R4R_1\leftrightarrow R_4, then α2R2+R3\alpha_2R_2+R_3, then β2R1\beta_2R_1. Write the single matrix GG such that B=GAB=GA.

Apply the same operations to I5I_5, remembering that later operations use the current rows, not the original rows.

Solution

Guided solution

Quick check

For the matrix GG in the previous exercise, suppose D=GCD=GC. Write the matrix HH such that C=HDC=HD.

Reverse the row operations in reverse order.

Solution

Guided solution

This page builds on 2.2 Augmented matrices and row operations and 3.1 Matrix multiplication and identity matrices. It prepares the algebraic row-reduction viewpoint used in 5.1 Invertible matrices and 7.2 Row operations, products, and invertibility.

Section mastery checkpoint

Answer each question correctly to complete this section checkpoint. Correct progress: 0%.

Skills: elementary-matrix, row-operation, matrix-multiplication

For 3 x 3 matrices, which elementary matrix represents R2<R2+3R1R_2 <- R_2 + 3R_1?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Skills: row-operation-matrix, inverse, matrix-product-order

A six-step row-operation chain sends A1A_1 to A7A_7, and its combined left multiplier is JJ, so A7=JA1A_7=JA_1. If KK is the combined multiplier for the reverse chain, which statement must hold?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Skills: row-operation-matrix, parameters, matrix-product-order

In a five-row chain, R2R_2 is first replaced by β1R2\beta_1 R_2, and later R3R3+α2R2R_3 \leftarrow R_3 + \alpha_2 R_2. In the combined multiplier GG, what is the entry in position (3,2)?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Skills: row-operation-matrix, inverse, parameters

A combined row-operation multiplier is GG. If D=GCD=GC and HH is chosen so that C=HDC=HD, what is the relationship between HH and GG?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Key terms in this unit