Evanalysis
2.2Estimated reading time: 17 min

2.2 Augmented matrices and row operations

Translate a system into `Ax = b`, package it as `[A|b]`, and understand exactly why elementary row operations preserve the solution set.

Course contents

A linear system contains two kinds of data: the coefficients attached to the variables, and the constants on the right-hand side. When we solve the system, the variables, plus signs, and equality signs stay in the same pattern; what changes are the numerical entries.

That is why augmented matrices matter. They let us store exactly the data that row operations modify, without rewriting every variable symbol after each step.

Why the augmented matrix is the right package

Consider a system of mm linear equations in nn unknowns:

a11x1+a12x2+⋯+a1nxn=b1,a21x1+a22x2+⋯+a2nxn=b2, ⋮am1x1+am2x2+⋯+amnxn=bm.\begin{aligned} a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n &= b_1, \\ a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n &= b_2, \\ &\ \vdots \\ a_{m1}x_1 + a_{m2}x_2 + \cdots + a_{mn}x_n &= b_m. \end{aligned}

This system can be rewritten in three parallel ways:

  • as a list of equations;
  • as a matrix equation Ax=bAx = b;
  • as a single augmented matrix [A∣b][A\mid b].

Definition

Coefficient matrix, constant vector, and augmented matrix

For a system Ax=bAx = b:

  • AA is the coefficient matrix;
  • bb is the vector of constants;
  • [A∣b][A\mid b] is the augmented matrix, formed by placing the constant column beside the coefficient matrix.

The vertical bar is bookkeeping. It reminds you which column came from the right-hand side, but it does not create a new kind of matrix operation.

There is also a useful column-vector reading. If the columns of AA are a1,a2,…,ana_1, a_2, \ldots, a_n, then

Ax=b⟺x1a1+x2a2+⋯+xnan=b.Ax = b \quad\Longleftrightarrow\quad x_1 a_1 + x_2 a_2 + \cdots + x_n a_n = b.

This matters later when we study span and column space. For now, it already explains why a linear system can be read either row by row or column by column.

Worked example

Write one system in all three forms

Consider

x1+2x2+2x3=4,x1+3x2+3x3=5,2x1+6x2+5x3=6.\begin{aligned} x_1 + 2x_2 + 2x_3 &= 4, \\ x_1 + 3x_2 + 3x_3 &= 5, \\ 2x_1 + 6x_2 + 5x_3 &= 6. \end{aligned}

Its coefficient matrix and constant vector are

A=[122133265],b=[456].A = \begin{bmatrix} 1 & 2 & 2 \\ 1 & 3 & 3 \\ 2 & 6 & 5 \end{bmatrix}, \qquad b = \begin{bmatrix} 4 \\ 5 \\ 6 \end{bmatrix}.

So the system may be written as Ax=bAx = b, where

x=[x1x2x3],x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix},

and its augmented matrix is

[122413352656].\left[ \begin{array}{ccc|c} 1 & 2 & 2 & 4 \\ 1 & 3 & 3 & 5 \\ 2 & 6 & 5 & 6 \end{array} \right].

The three elementary row operations

There are exactly three elementary row operations:

  1. swap two rows;
  2. multiply one row by a nonzero scalar;
  3. add a multiple of one row to another row.

The phrase “nonzero” in operation 2 is essential. Multiplying a row by 00 would erase the equation instead of rewriting it equivalently, so it would no longer be reversible.

Definition

Elementary row operations

The allowed operations on an augmented matrix are:

  1. Ri↔RjR_i \leftrightarrow R_j, where i≠ji\ne j
  2. Ri←αRiR_i \leftarrow \alpha R_i, where α≠0\alpha \ne 0
  3. Rj←αRi+RjR_j \leftarrow \alpha R_i+R_j, where i≠ji\ne j and α∈R\alpha\in\mathbb R

These are called elementary row operations.

Why these operations preserve the solution set

The serious point is not that row operations make a matrix “look nicer.” The serious point is that they preserve the set of solutions.

Theorem

Row-equivalent augmented matrices represent equivalent systems

If one augmented matrix is obtained from another by a sequence of elementary row operations, then the two corresponding systems are equivalent: they have exactly the same solution set.

Proof

Why each elementary row operation is safe

Each operation is just an equation operation written in matrix form.

  • Swapping two rows only changes the order in which the equations are listed. A number tuple solves all equations before the swap if and only if it solves all equations after the swap.
  • Multiplying a row by a nonzero scalar multiplies both sides of one equation by the same nonzero number. That produces an equivalent equation, and the move is reversible by multiplying by 1/α1 / \alpha.
  • Replacing RjR_j by αRi+Rj\alpha R_i + R_j means replacing equation jj by “α×\alpha \times equation ii plus equation jj.” Any solution of the original system still satisfies the new equation, and the move is reversible by adding −α-\alpha times row ii back to row jj.

So every elementary row operation preserves the solution set, and therefore any finite sequence of them does the same.

Reversibility is worth remembering because it separates genuine equivalence moves from destructive shortcuts.

Equivalence needs both directions

A transformed equation is a consequence of the old equations. That observation proves only half of what we need. It shows that old solutions survive, but it does not yet rule out new solutions that did not solve the original system. The reverse operation supplies the missing implication. This distinction is especially important when an equation disappears: a shorter list of conditions might describe a larger set.

Proof X-Ray

The unchanged row makes replacement reversible

Write equation ii as Li(x)=biL_i(x)=b_i and equation jj as Lj(x)=bjL_j(x)=b_j, where each LL is the corresponding linear expression in the same ordered variables. Take distinct rows i≠ji\ne j and any real number cc. Row replacement keeps equation ii and replaces equation jj by

Lj(x)+cLi(x)=bj+cbi.L_j(x)+cL_i(x)=b_j+cb_i.

If a tuple solves the original system, adding its two true equalities gives the new equality. Conversely, suppose a tuple solves the transformed system. It still satisfies Li(x)=biL_i(x)=b_i, because that row was retained. Subtracting cc times this equality from the new equation gives Lj(x)=bjL_j(x)=b_j. Every other row is unchanged. Thus precisely the same tuples solve the two systems.

Notice where each hypothesis enters. Distinct rows ensure that the source equation remains available. The multiplier cc may be zero because the coefficient of the replaced row itself is still one. In a scaling operation, by contrast, the multiplier must be nonzero because the inverse operation divides by it. These are different restrictions on different operations.

A swap is its own inverse. Scaling by a≠0a\ne0 is reversed by scaling by 1/a1/a. Replacement using an unchanged source row is reversed by replacement using the negative multiplier. For a chain of operations, undo the last operation first and then continue backwards. Undoing operations in the original order generally applies them to the wrong intermediate rows.

Theorem

Row equivalence is an equivalence relation

For matrices of a fixed size, row equivalence is reflexive, symmetric, and transitive. A matrix is row-equivalent to itself using no operations. A sequence from one matrix to another can be reversed, and two consecutive finite sequences can be joined. Consequently, all augmented matrices connected by such operations describe the same solution set when their variable columns have the same meaning.

The fixed-size condition matters: row operations neither add variables nor remove equations from the matrix. A zero row is retained as a record of an equation that has become redundant. When convenient, one can omit the tautology from a written list of equations, but this is a separate presentation choice, not a fourth elementary row operation.

Read each row operation as an equation operation

When you apply a row operation, do not think “I am changing numbers in a table.” Think “I am rewriting one equation using another equation.”

Worked example

Interpret elimination before you memorize it

Start from

[122413352656].\left[ \begin{array}{ccc|c} 1 & 2 & 2 & 4 \\ 1 & 3 & 3 & 5 \\ 2 & 6 & 5 & 6 \end{array} \right].

Apply

R2←R2−R1,R3←R3−2R1.R_2 \leftarrow R_2 - R_1, \qquad R_3 \leftarrow R_3 - 2R_1.

The new augmented matrix is

[12240111021−2].\left[ \begin{array}{ccc|c} 1 & 2 & 2 & 4 \\ 0 & 1 & 1 & 1 \\ 0 & 2 & 1 & -2 \end{array} \right].

This is not magic. It simply means:

  • equation 2 is replaced by “equation 2 minus equation 1”;
  • equation 3 is replaced by “equation 3 minus 22 times equation 1.”

So the same system is now being read in a form where the first variable is already eliminated from the lower rows. The problem has not changed; only its presentation has changed.

A complete computation with an explicit return check

Worked example

Solve, reconstruct, and verify

Consider

2x+3y=3,x−y=4.2x+3y=3,\qquad x-y=4.

With variable order (x,y)(x,y), the augmented matrix is

[2331−14]→R1←R1−2R2[05−51−14]→R1←R1/5[01−11−14].\left[\begin{array}{cc|c}2&3&3\\1&-1&4\end{array}\right] \xrightarrow{R_1\leftarrow R_1-2R_2} \left[\begin{array}{cc|c}0&5&-5\\1&-1&4\end{array}\right] \xrightarrow{R_1\leftarrow R_1/5} \left[\begin{array}{cc|c}0&1&-1\\1&-1&4\end{array}\right].

The first row now says y=−1y=-1. Add it to the second row and then swap the rows:

[01−11−14]→R2←R2+R1[01−1103]→R1↔R2[10301−1].\left[\begin{array}{cc|c}0&1&-1\\1&-1&4\end{array}\right] \xrightarrow{R_2\leftarrow R_2+R_1} \left[\begin{array}{cc|c}0&1&-1\\1&0&3\end{array}\right] \xrightarrow{R_1\leftrightarrow R_2} \left[\begin{array}{cc|c}1&0&3\\0&1&-1\end{array}\right].

The answer is (x,y)=(3,−1)(x,y)=(3,-1). Direct substitution gives 2(3)+3(−1)=32(3)+3(-1)=3 and 3−(−1)=43-(-1)=4, so the candidate solves both original equations. The reversibility theorem gives the additional conclusion that no solutions were lost: every original solution must equal this tuple.

One may also reconstruct the initial matrix. Swap back, replace the second row by its difference with the first, multiply the first row by five, and add twice the second row to the first. This reverse chain restores every entry, including both constants. It is a concrete certificate that the displayed reduction was an equivalence, not just a way to manufacture a plausible answer.

This example distinguishes two useful checks. Substitution checks a proposed solution; a valid row-operation chain justifies the description of the entire solution set. Neither should be confused with merely obtaining small numbers. A calculation can look simple while silently changing a right-hand side, and a correct candidate alone does not establish uniqueness.

Worked example

One coefficient matrix, two different right-hand sides

Compare the systems

x+y=2,2x+2y=4andx+y=2,2x+2y=5.x+y=2,\quad 2x+2y=4 \qquad\text{and}\qquad x+y=2,\quad 2x+2y=5.

Both have the same coefficient matrix. In each augmented matrix, perform R2←R2−2R1R_2\leftarrow R_2-2R_1:

[112224]⟶[112000],[112225]⟶[112001].\left[\begin{array}{cc|c}1&1&2\\2&2&4\end{array}\right] \longrightarrow \left[\begin{array}{cc|c}1&1&2\\0&0&0\end{array}\right], \qquad \left[\begin{array}{cc|c}1&1&2\\2&2&5\end{array}\right] \longrightarrow \left[\begin{array}{cc|c}1&1&2\\0&0&1\end{array}\right].

The first system reduces to x+y=2x+y=2 and has solutions (2−t,t)(2-t,t) for all real tt. Its zero row expresses the dependence of the second equation on the first. The second system includes the impossible statement 0=10=1 and has no solutions. The last column is therefore essential data, even when the coefficient calculations are identical.

Trace the row-operation invariant

The short visual explanation below keeps the main invariant visible: a legal row operation may change the displayed matrix, but it must preserve the set of solutions. Pay special attention to the constants column; it belongs to the same rows as the coefficient entries.

Why row operations are safe

See why [A|b] is a safe working form: elementary row operations rewrite equations while preserving the solution set.

  1. Package the system

    The coefficient block and the constants column are stored in one augmented matrix so the data remains aligned.

  2. Read the bar correctly

    The vertical bar is bookkeeping, not a barrier. A row operation acts on the entire row, including the constants column.

  3. Use only reversible operations

    Swapping rows, scaling by a nonzero number, and adding a multiple of one row to another can each be undone.

  4. Rewrite equations, not variables

    A row replacement such as R2 <- R2 - R1 replaces one equation by an equivalent combination of equations.

  5. Move the constants too

    If the coefficients change but the constants are frozen, the matrix no longer represents the same system.

  6. Track the invariant

    The visible matrix changes, but the solution set is preserved by every legal elementary row operation.

Use the augmented matrix because elementary row operations are reversible equation rewrites. The constants column is part of the same rows, so it must change together with the coefficient block.

The next note studies Gaussian elimination in detail. At the current stage, the important idea is more basic: an augmented matrix is a compact record of the same system, and row operations are legitimate because they preserve the solution set.

A practical solving strategy

The matrix method has three steps:

  1. write the system as an augmented matrix;
  2. perform row operations to reach a simpler matrix;
  3. translate the simpler matrix back into equations, or read the answers from a sufficiently simple form.

This strategy is easy to say, but it becomes reliable only when you keep asking what each step is preserving and what structural feature you are trying to create.

Use the explorer below to connect the symbolic row operations with the changing system they represent.

Read and try

Translate one system into a matrix

The live explorer highlights how each equation becomes one matrix row plus one constant entry.

System

  1. x + 2y = 5
  2. 3x - y = 4

Result

125
3-14

Why apparently similar shortcuts can fail

If x+y=2x+y=2 is replaced by 0=00=0 through multiplication by zero, every pair becomes a solution of the transformed equation. The original pair (0,0)(0,0) was not a solution, so equivalence has failed. This example does not say that every zero row is an error: a legal replacement can produce a zero row when an equation was already redundant. The issue is whether the operation preserves the information in the full system.

Similarly, the two instructions R1←R1+R2R_1\leftarrow R_1+R_2 and R2←R1+R2R_2\leftarrow R_1+R_2 need a convention about timing. If both use the old rows, they replace two equations by two copies of the same sum and may lose information. If they are performed sequentially, the second instruction uses the updated first row and is a legitimate second replacement. Write intermediate matrices whenever later instructions use a row that has just changed.

The coefficient of the target row also deserves attention. Replacing RjR_j by aRj+cRiaR_j+cR_i, with i≠ji\ne j, is reversible when a≠0a\ne0: first scale RjR_j by aa, then add cRicR_i. When a=0a=0, the old target equation disappears. This observation explains why the elementary list is sufficient without treating every row combination as automatically safe.

A reliable written solution records the operation beside each arrow, preserves the order of variable columns, and carries the constant column through the same arithmetic. When choosing a multiplier, identify the entry to eliminate and the nonzero entry used to eliminate it. For example, an entry qq below a pivot p≠0p\ne0 is removed by subtracting (q/p)(q/p) times the pivot row. The same multiplier acts on the whole target row; changing only the selected entry does not describe an equation operation.

Common mistakes and subtle points

Common mistake

The bar in [A∣b][A\mid b] is not a wall you may ignore

The last column belongs to the same system. If you apply a row operation to the coefficient entries but leave the constants untouched, you are no longer rewriting the same system.

Common mistake

Multiplying a row by 00 is not an allowed move

The allowed scaling operation requires a nonzero scalar. Multiplying by 00 throws away the equation and is not reversible, so it does not preserve equivalence.

Common mistake

A row operation changes equations, not variables

Row operations combine equations with one another. They do not mean "replace x2x_2 by something else" or "change the meaning of the unknowns."

Quick checks

Checkpoint

Why is Ri←0RiR_i \leftarrow 0R_i not an allowed row operation?

Answer in terms of reversibility and loss of information.

Solution · Answer

Multiplying a row by 00 erases the entire equation, so the move cannot be reversed. Because it destroys information, it is not guaranteed to preserve the solution set.

Checkpoint

If two equations are swapped, does the system get a different solution set?

Do not think about appearance only. Think about what it means to solve all the equations simultaneously.

Solution · Answer

No. Swapping rows only changes the order in which the equations are written. A tuple solves the original system exactly when it solves the reordered system.

Exercises

Checkpoint

Write the augmented matrix for the system x1−2x2−x3+x4=1x_1 - 2x_2 - x_3 + x_4 = 1, x2+x3−x4=2x_2 + x_3 - x_4 = 2, x3+2x4=3x_3 + 2x_4 = 3.

Keep the columns in the order x1,x2,x3,x4x_1, x_2, x_3, x_4, even when a variable does not appear in a given equation.

Solution · Guided solution

The coefficients of the three equations are

(1,−2,−1,1),(0,1,1,−1),(0,0,1,2),(1, -2, -1, 1),\qquad (0, 1, 1, -1),\qquad (0, 0, 1, 2),

and the constant column is (1,2,3)t(1, 2, 3)^t. Therefore the augmented matrix is

[1−2−111011−1200123].\left[ \begin{array}{cccc|c} 1 & -2 & -1 & 1 & 1 \\ 0 & 1 & 1 & -1 & 2 \\ 0 & 0 & 1 & 2 & 3 \end{array} \right].

Checkpoint

Using the same system, which single row operation eliminates the x2x_2 term from the first equation, and what new first equation do you get?

The coefficient of x2x_2 in equation 1 is −2-2, while the coefficient in equation 2 is 11.

Solution · Guided solution

Use

R1←2R2+R1.R_1 \leftarrow 2R_2 + R_1.

Indeed,

2(x2+x3−x4=2)+(x1−2x2−x3+x4=1)2(x_2 + x_3 - x_4 = 2) + (x_1 - 2x_2 - x_3 + x_4 = 1)

gives

x1+x3−x4=5.x_1 + x_3 - x_4 = 5.

So after the row operation, the first equation becomes x1+x3−x4=5x_1 + x_3 - x_4 = 5.

Read this first

This page builds on 1.1 Equations and solution sets and 2.1 Matrix basics, and it prepares the elimination viewpoint used in 2.3 Gaussian elimination and RREF.

Practice

Work out your answer, then check it. You can revise and try again.

Loading…

Key terms in this unit