Skip to content

Chapter 8. Elementary Row Operations

Elementary row operations are the basic moves used to transform a matrix without changing the solution set of the linear system it represents. They are the computational foundation of Gaussian elimination, Gauss-Jordan elimination, row echelon form, reduced row echelon form, rank, and invertibility. The three operations are row interchange, row scaling by a nonzero scalar, and row replacement by adding a multiple of one row to another.

8.1 Rows as Equations

In an augmented matrix, each row represents one equation.

For example, the system

x+2y=5,3xy=4 \begin{aligned} x+2y&=5,\\ 3x-y&=4 \end{aligned}

is represented by

[125314]. \left[ \begin{array}{cc|c} 1&2&5\\ 3&-1&4 \end{array} \right].

The first row represents

x+2y=5. x+2y=5.

The second row represents

3xy=4. 3x-y=4.

A row operation is therefore an operation on equations. It rewrites the system in a different form while preserving the same solution set.

8.2 The Three Elementary Row Operations

There are exactly three elementary row operations.

OperationNotationDescription
Row interchangeRiRjR_i \leftrightarrow R_jSwap two rows
Row scalingRicRi, c0R_i \leftarrow cR_i,\ c\ne 0Multiply a row by a nonzero scalar
Row replacementRiRi+cRj, ijR_i \leftarrow R_i+cR_j,\ i\ne jAdd a multiple of one row to another

These operations are reversible. Because they are reversible, they preserve the information contained in the system.

8.3 Row Interchange

Row interchange swaps two rows.

For example,

[125314] \left[ \begin{array}{cc|c} 1&2&5\\ 3&-1&4 \end{array} \right]

after R1R2R_1\leftrightarrow R_2 becomes

[314125]. \left[ \begin{array}{cc|c} 3&-1&4\\ 1&2&5 \end{array} \right].

The order of equations has changed, but the set of solutions has not changed. A vector satisfies both equations before the swap exactly when it satisfies both equations after the swap.

Row interchange is often used to move a nonzero entry into a pivot position.

8.4 Row Scaling

Row scaling multiplies every entry in one row by the same nonzero scalar.

For example,

[248113] \left[ \begin{array}{cc|c} 2&4&8\\ 1&-1&3 \end{array} \right]

after R112R1R_1\leftarrow \frac12 R_1 becomes

[124113]. \left[ \begin{array}{cc|c} 1&2&4\\ 1&-1&3 \end{array} \right].

The first equation

2x+4y=8 2x+4y=8

has been replaced by

x+2y=4. x+2y=4.

These equations have the same solution set. Multiplying an equation by a nonzero scalar does not change which values satisfy it.

The scalar must be nonzero. Multiplying a row by 00 would erase the equation and may change the solution set.

8.5 Row Replacement

Row replacement adds a multiple of one row to another row.

For example,

[125314] \left[ \begin{array}{cc|c} 1&2&5\\ 3&-1&4 \end{array} \right]

after R2R23R1R_2\leftarrow R_2-3R_1 becomes

[1250711]. \left[ \begin{array}{cc|c} 1&2&5\\ 0&-7&-11 \end{array} \right].

The second equation

3xy=4 3x-y=4

has been replaced by

(3xy)3(x+2y)=43(5). (3x-y)-3(x+2y)=4-3(5).

Simplifying gives

7y=11. -7y=-11.

The new second equation is a consequence of the old two equations. Conversely, because the operation can be reversed by

R2R2+3R1, R_2\leftarrow R_2+3R_1,

no information has been lost.

Row replacement is the main operation used to create zeros below and above pivots.

8.6 Why Row Operations Preserve Solutions

Each elementary row operation replaces a system by an equivalent system.

For row interchange, only the order of equations changes.

For row scaling, an equation is multiplied by a nonzero scalar. A scalar multiple of an equation has the same solutions as the original equation.

For row replacement, one equation is replaced by itself plus a multiple of another equation. If a vector satisfies both original equations, then it also satisfies the new equation. Since the operation is reversible, every solution of the new system is also a solution of the old system.

Thus elementary row operations preserve the solution set of an augmented matrix.

8.7 Row Equivalent Matrices

Two matrices are row equivalent if one can be transformed into the other by a finite sequence of elementary row operations. Row equivalence is the relation generated by the three elementary row operations.

For example,

[125314] \left[ \begin{array}{cc|c} 1&2&5\\ 3&-1&4 \end{array} \right]

is row equivalent to

[1250711] \left[ \begin{array}{cc|c} 1&2&5\\ 0&-7&-11 \end{array} \right]

because the second matrix is obtained by the operation

R2R23R1. R_2\leftarrow R_2-3R_1.

Row equivalent augmented matrices represent equivalent systems. They have the same solution set.

8.8 Elementary Row Operations on Coefficient Matrices

Row operations can also be applied to coefficient matrices without the right-hand side.

For example,

A=[1231] A= \begin{bmatrix} 1&2\\ 3&-1 \end{bmatrix}

after R2R23R1R_2\leftarrow R_2-3R_1 becomes

[1207]. \begin{bmatrix} 1&2\\ 0&-7 \end{bmatrix}.

When row operations are applied to a coefficient matrix alone, they no longer directly represent a full system unless the right-hand side is also transformed. However, they still reveal structural information about the matrix, such as rank, pivot columns, row space, and invertibility.

8.9 Pivot Positions

A pivot position is a location used as the leading entry for eliminating other entries in the same column.

For example, in

[213456210], \left[ \begin{array}{ccc} 2&1&3\\ 4&5&6\\ -2&1&0 \end{array} \right],

the entry 22 in the first row and first column may be used as the first pivot.

To eliminate the entries below it, use row replacement:

R2R22R1, R_2\leftarrow R_2-2R_1, R3R3+R1. R_3\leftarrow R_3+R_1.

This gives

[213030023]. \begin{bmatrix} 2&1&3\\ 0&3&0\\ 0&2&3 \end{bmatrix}.

The first pivot has produced zeros below itself.

8.10 Creating a Leading One

In many algorithms, pivots are scaled to become 11.

For example,

[248036] \begin{bmatrix} 2&4&8\\ 0&3&6 \end{bmatrix}

after R112R1R_1\leftarrow \frac12 R_1 becomes

[124036]. \begin{bmatrix} 1&2&4\\ 0&3&6 \end{bmatrix}.

The leading entry of the first row is now 11. This is convenient because it makes later elimination easier.

In reduced row echelon form, every leading entry must be 11. In ordinary row echelon form, this normalization is useful but not required.

8.11 Eliminating Entries Below a Pivot

Suppose the pivot is the entry a110a_{11}\ne 0 in the first row and first column. To eliminate an entry ai1a_{i1} below it, replace row ii by

RiRiai1a11R1. R_i\leftarrow R_i-\frac{a_{i1}}{a_{11}}R_1.

This makes the first entry of row ii equal to zero.

Indeed, the new first entry is

ai1ai1a11a11=0. a_{i1}-\frac{a_{i1}}{a_{11}}a_{11}=0.

This is the basic elimination step.

For example,

[2165] \begin{bmatrix} 2&1\\ 6&5 \end{bmatrix}

has pivot 22. To eliminate the 66 below it, use

R2R23R1. R_2\leftarrow R_2-3R_1.

Then

[2165][2102]. \begin{bmatrix} 2&1\\ 6&5 \end{bmatrix} \longrightarrow \begin{bmatrix} 2&1\\ 0&2 \end{bmatrix}.

8.12 Eliminating Entries Above a Pivot

Gauss-Jordan elimination also eliminates entries above pivots.

For example,

[127013] \left[ \begin{array}{cc|c} 1&2&7\\ 0&1&3 \end{array} \right]

has a pivot 11 in the second row and second column. To eliminate the 22 above it, use

R1R12R2. R_1\leftarrow R_1-2R_2.

This gives

[101013]. \left[ \begin{array}{cc|c} 1&0&1\\ 0&1&3 \end{array} \right].

The solution is then read directly:

x=1,y=3. x=1, \qquad y=3.

8.13 Row Operations and Echelon Form

Elementary row operations are used to put a matrix into row echelon form. A row echelon matrix has zero rows below nonzero rows, leading entries moving to the right as one moves downward, and zeros below each leading entry.

For example,

[123401560027] \begin{bmatrix} 1&2&3&4\\ 0&1&5&6\\ 0&0&2&7 \end{bmatrix}

is in row echelon form.

The zeros below pivots give a triangular structure. In an augmented matrix, this structure allows the system to be solved by back substitution.

8.14 Row Operations and Reduced Row Echelon Form

Reduced row echelon form imposes stricter conditions. The leading entry in every nonzero row is 11, and each leading 11 is the only nonzero entry in its column.

For example,

[103201150000] \begin{bmatrix} 1&0&3&2\\ 0&1&-1&5\\ 0&0&0&0 \end{bmatrix}

is in reduced row echelon form.

In this form, pivot variables and free variables can be read directly. No back substitution is needed.

8.15 Example: Reduction to Echelon Form

Consider the augmented matrix

[121325181120]. \left[ \begin{array}{ccc|c} 1&2&-1&3\\ 2&5&1&8\\ -1&-1&2&0 \end{array} \right].

Use the first row as the first pivot row.

First eliminate the entry below the pivot in row 22:

R2R22R1. R_2\leftarrow R_2-2R_1.

Then eliminate the entry below the pivot in row 33:

R3R3+R1. R_3\leftarrow R_3+R_1.

This gives

[121301320113]. \left[ \begin{array}{ccc|c} 1&2&-1&3\\ 0&1&3&2\\ 0&1&1&3 \end{array} \right].

Now use the second row as the next pivot row. Eliminate the entry below it:

R3R3R2. R_3\leftarrow R_3-R_2.

Then

[121301320021]. \left[ \begin{array}{ccc|c} 1&2&-1&3\\ 0&1&3&2\\ 0&0&-2&1 \end{array} \right].

This matrix is in echelon form.

8.16 Solving from Echelon Form

The echelon form

[121301320021] \left[ \begin{array}{ccc|c} 1&2&-1&3\\ 0&1&3&2\\ 0&0&-2&1 \end{array} \right]

represents

x+2yz=3, x+2y-z=3, y+3z=2, y+3z=2, 2z=1. -2z=1.

From the last equation,

z=12. z=-\frac12.

From the second equation,

y+3(12)=2, y+3\left(-\frac12\right)=2,

so

y=72. y=\frac72.

From the first equation,

x+2(72)(12)=3. x+2\left(\frac72\right)-\left(-\frac12\right)=3.

Thus

x+7+12=3, x+7+\frac12=3,

so

x=92. x=-\frac92.

The solution is

[927212]. \begin{bmatrix} -\frac92\\ \frac72\\ -\frac12 \end{bmatrix}.

8.17 Example: Reduction to Reduced Echelon Form

Continue from

[121301320021]. \left[ \begin{array}{ccc|c} 1&2&-1&3\\ 0&1&3&2\\ 0&0&-2&1 \end{array} \right].

Scale the third row:

R312R3. R_3\leftarrow -\frac12 R_3.

Then

[1213013200112]. \left[ \begin{array}{ccc|c} 1&2&-1&3\\ 0&1&3&2\\ 0&0&1&-\frac12 \end{array} \right].

Eliminate the entry above the pivot in column 33:

R2R23R3, R_2\leftarrow R_2-3R_3, R1R1+R3. R_1\leftarrow R_1+R_3.

This gives

[120520107200112]. \left[ \begin{array}{ccc|c} 1&2&0&\frac52\\ 0&1&0&\frac72\\ 0&0&1&-\frac12 \end{array} \right].

Eliminate the entry above the pivot in column 22:

R1R12R2. R_1\leftarrow R_1-2R_2.

Then

[100920107200112]. \left[ \begin{array}{ccc|c} 1&0&0&-\frac92\\ 0&1&0&\frac72\\ 0&0&1&-\frac12 \end{array} \right].

The solution is read directly.

8.18 Row Operations and Invertibility

For a square matrix AA, row operations can test invertibility.

An n×nn\times n matrix AA is invertible if and only if it can be row reduced to the identity matrix InI_n. Equivalently, AA has a pivot in every column. Row equivalence to the identity is one standard criterion for invertibility.

For example,

A=[1235]. A= \begin{bmatrix} 1&2\\ 3&5 \end{bmatrix}.

Apply

R2R23R1. R_2\leftarrow R_2-3R_1.

Then

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

Scale row 22:

R2R2. R_2\leftarrow -R_2.

Then

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

Eliminate above the second pivot:

R1R12R2. R_1\leftarrow R_1-2R_2.

Then

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

Thus AA is invertible.

8.19 Elementary Matrices

Each elementary row operation can be performed by multiplying on the left by an elementary matrix.

An elementary matrix is obtained by applying one elementary row operation to an identity matrix.

For example, the operation

R2R23R1 R_2\leftarrow R_2-3R_1

on a 2×22\times 2 matrix is represented by

E=[1031]. E= \begin{bmatrix} 1&0\\ -3&1 \end{bmatrix}.

Then

EA EA

is the matrix obtained from AA by applying the same row operation.

For instance, if

A=[1245], A= \begin{bmatrix} 1&2\\ 4&5 \end{bmatrix},

then

EA=[1031][1245]=[1211]. EA= \begin{bmatrix} 1&0\\ -3&1 \end{bmatrix} \begin{bmatrix} 1&2\\ 4&5 \end{bmatrix} = \begin{bmatrix} 1&2\\ 1&-1 \end{bmatrix}.

This is exactly the result of replacing row 22 by row 22 minus three times row 11.

8.20 Reversibility

Every elementary row operation has an inverse operation.

OperationInverse
RiRjR_i\leftrightarrow R_jRiRjR_i\leftrightarrow R_j
RicRi, c0R_i\leftarrow cR_i,\ c\ne 0Ri1cRiR_i\leftarrow \frac1cR_i
RiRi+cRjR_i\leftarrow R_i+cR_jRiRicRjR_i\leftarrow R_i-cR_j

This reversibility is the reason row operations preserve equivalence. It also explains why elementary matrices are invertible.

8.21 Row Operations and Rank

Row operations preserve rank. They do not change the number of pivots in a matrix.

When a matrix is reduced to echelon form, its rank is the number of nonzero rows in that echelon form. Equivalently, it is the number of pivot positions.

For example,

[123246011] \begin{bmatrix} 1&2&3\\ 2&4&6\\ 0&1&1 \end{bmatrix}

can be row reduced:

R2R22R1 R_2\leftarrow R_2-2R_1

gives

[123000011]. \begin{bmatrix} 1&2&3\\ 0&0&0\\ 0&1&1 \end{bmatrix}.

Swap rows 22 and 33:

[123011000]. \begin{bmatrix} 1&2&3\\ 0&1&1\\ 0&0&0 \end{bmatrix}.

There are two nonzero rows. The rank is 22.

8.22 Common Mistakes

The most common errors in row operations are mechanical.

ErrorCorrection
Scaling by zeroRow scaling requires a nonzero scalar
Changing only part of a rowApply the operation to every entry in the row
Changing the right-hand side incorrectlyRow operations apply to the whole augmented row
Replacing both rows at once using old and new values inconsistentlyPerform one row replacement at a time
Swapping columns instead of rowsColumn operations change a different structure
Forgetting reversibilityEach row operation must have an inverse

Careful notation prevents most errors.

8.23 Notation for Row Reduction

A sequence of row operations is often written using arrows:

[125314]R2R23R1[1250711]. \left[ \begin{array}{cc|c} 1&2&5\\ 3&-1&4 \end{array} \right] \overset{R_2\leftarrow R_2-3R_1}{\longrightarrow} \left[ \begin{array}{cc|c} 1&2&5\\ 0&-7&-11 \end{array} \right].

For longer reductions, operations may be listed at the side. The important point is that each step must be an elementary row operation.

8.24 Summary

Elementary row operations are the permitted moves for row reduction.

They are:

OperationFormula
Row interchangeRiRjR_i\leftrightarrow R_j
Row scalingRicRi, c0R_i\leftarrow cR_i,\ c\ne 0
Row replacementRiRi+cRjR_i\leftarrow R_i+cR_j

They preserve solution sets of augmented systems because each operation is reversible. They produce row equivalent matrices. They are used to create echelon form, reduced row echelon form, pivots, and zeros in controlled positions.

Elementary row operations are therefore the practical mechanism behind solving linear systems and the theoretical mechanism behind rank, row equivalence, and invertibility.