Tutorials › Linear Algebra › Coefficient Matrices and Augmented Matrices

Row Reduction and Echelon Forms · Tutorial 49 of 1000

Coefficient Matrices and Augmented Matrices

Learn to reduce a system without losing its right-hand side, and to read consistency and solutions from the resulting augmented matrix.

Beginner 9 min read

What You'll Learn

  • Distinguish a system’s coefficient matrix from its augmented matrix
  • Apply each row operation to the right-hand side as well as the coefficients
  • Explain why reducing coefficients alone cannot determine consistency
  • Identify contradictory rows in an augmented matrix
  • Recover and check solutions after row reduction

Two Matrices, One Linear System

A linear system has coefficients and right-hand sides, and those play different roles. The coefficient matrix records how the variables occur; the right-hand side records the values those expressions must equal. Keeping the two parts distinct is useful, but separating them during row reduction can lose the very information needed to decide whether the system has solutions.

Consider a system of \(m\) equations in \(n\) variables over \(\mathbb{R}\). Write its variable vector as the column \(\mathbf{x}\in\mathbb{R}^n\), its right-hand-side vector as \(\mathbf{b}\in\mathbb{R}^m\), and its coefficient matrix as \(\mathbf{A}\in\mathbb{R}^{m\times n}\). The system is written \(\mathbf{A}\mathbf{x}=\mathbf{b}\).

Definition: The coefficient matrix of \(\mathbf{A}\mathbf{x}=\mathbf{b}\) is \(\mathbf{A}\). The augmented matrix is the matrix formed by appending \(\mathbf{b}\) as one extra column, written \([\mathbf{A}\mid\mathbf{b}]\). Its first \(n\) columns are the coefficient columns; its last column records the right-hand sides. The last column is not an additional variable column.

For example, the system \(x_1+2x_2=3,\;2x_1+4x_2=6\) has coefficient matrix \(\begin{bmatrix}1&2\\2&4\end{bmatrix}\) and augmented matrix \(\begin{bmatrix}1&2&\mid&3\\2&4&\mid&6\end{bmatrix}\). The coefficient matrix describes the left sides of the equations, but by itself it does not say whether those left sides must equal \(3,6\), or some other values.

Row Operations Must Include the Right-Hand Side

Each row of the augmented matrix represents one equation. Consequently, an elementary row operation on a system must act on the whole row, including its right-hand side. Swapping equations, multiplying an equation by a nonzero number, or adding a multiple of one equation to another produces an equivalent system: the new equations have exactly the same solutions as the old ones.

Theorem: If the same sequence of elementary row operations is applied to every column of \([\mathbf{A}\mid\mathbf{b}]\), the resulting augmented matrix represents a system with exactly the same solution set as \(\mathbf{A}\mathbf{x}=\mathbf{b}\).

Proof. It is enough to verify that each allowed row operation preserves the solutions, because a sequence of operations is a succession of such steps. Swapping two rows only changes the order of two equations, so a vector satisfies the system before the swap exactly when it satisfies the system after it. Multiplying one row by a nonzero scalar \(c\) replaces an equation \(L(\mathbf{x})=d\) by \(cL(\mathbf{x})=cd\). The new equation follows from the old one; conversely, division by \(c\ne0\) recovers the old equation. Finally, replacing one row by itself plus \(c\) times another row replaces \(L_1(\mathbf{x})=d_1\) by \(L_1(\mathbf{x})+cL_2(\mathbf{x})=d_1+cd_2\). Any solution of the old equations satisfies this new equation. Conversely, subtracting \(c\) times the unchanged second equation recovers \(L_1(\mathbf{x})=d_1\). Thus each operation preserves the solution set, and so does their sequence. \(\square\)

This result explains why the vertical bar in \([\mathbf{A}\mid\mathbf{b}]\) is a visual separator, not a boundary beyond which row operations stop. If the coefficients in a row change, the right-hand side in that row must change according to the same operation. Reducing \(\mathbf{A}\) alone can be useful for studying its pivot positions, but it does not, on its own, carry out the equivalent-system operations for a particular \(\mathbf{b}\).

What the Right-Hand Side Tells You

A row with zeros in all coefficient columns reads \(0=c\). If \(c\ne0\), it is a contradiction; if \(c=0\), it is an equation that imposes no condition on the variables. The distinction is invisible in the coefficient part alone, because both rows have zeros there.

Theorem: Reduce an augmented matrix to echelon form using row operations. The represented system is consistent if and only if the resulting matrix has no row of the form \([0\ \cdots\ 0\mid c]\) with \(c\ne0\).

Proof. If such a row occurs, its equation is \(0=c\) with \(c\ne0\), which no vector \(\mathbf{x}\) can satisfy. The reduced system, and therefore the original system by the preceding theorem, is inconsistent. For the converse, suppose there is no such row. Every row with zero coefficients then has right-hand side zero, so it gives \(0=0\). Each remaining row has at least one nonzero coefficient. In echelon form, back-substitution determines the pivot variables in order from the last nonzero row upwards. Assign every free variable the value \(0\); each pivot variable can then be assigned the value required by its row. This produces a solution to all nonzero rows, while the zero rows impose no further conditions. The reduced system is therefore consistent, and the original system is consistent as well. \(\square\)

Worked Example: Same Coefficients, Different Consistency

Compare the systems \(x_1+2x_2=3,\;2x_1+4x_2=6\) and \(x_1+2x_2=3,\;2x_1+4x_2=7\). They have the same coefficient matrix. Reduce each augmented matrix, applying \(R_2\to R_2-2R_1\) to the entire second row.

$$ \begin{bmatrix}1&2&\mid&3\\2&4&\mid&6\end{bmatrix} \sim \begin{bmatrix}1&2&\mid&3\\0&0&\mid&0\end{bmatrix}, \qquad \begin{bmatrix}1&2&\mid&3\\2&4&\mid&7\end{bmatrix} \sim \begin{bmatrix}1&2&\mid&3\\0&0&\mid&1\end{bmatrix}. $$

In the first system, the second row says \(0=0\). The first row says \(x_1+2x_2=3\), so setting \(x_2=t\) gives \(x_1=3-2t\), where \(t\in\mathbb{R}\). To check, substitute: \((3-2t)+2t=3\), and \(2(3-2t)+4t=6\). Thus every vector \(\mathbf{x}=(3-2t,t)^{\top}\) is a solution.

In the second system, the reduced second row says \(0=1\), so there is no solution. The coefficient matrices in the two systems are identical and reduce to \(\begin{bmatrix}1&2\\0&0\end{bmatrix}\). That reduction alone cannot distinguish the consistent first system from the inconsistent second one; their right-hand sides determine the difference.

Reducing Coefficients While Tracking the Right-Hand Side

Sometimes it is convenient to describe row reduction as operations on the coefficient matrix. That is valid for solving a system only if the effect of the same operations on \(\mathbf{b}\) is retained. One way to do this is to write the augmented matrix and reduce it as a whole. Another is to keep a separate column beside the coefficient matrix and perform every row operation on both.

Worked Example: A Unique Solution from the Augmented Matrix

Solve the system with coefficient matrix \(\mathbf{A}=\begin{bmatrix}1&1&1\\2&1&0\\1&-1&1\end{bmatrix}\) and right-hand side \(\mathbf{b}=(6,4,2)^{\top}\). Begin with \([\mathbf{A}\mid\mathbf{b}]\). Apply \(R_2\to R_2-2R_1\) and \(R_3\to R_3-R_1\):

$$ \begin{bmatrix}1&1&1&\mid&6\\2&1&0&\mid&4\\1&-1&1&\mid&2\end{bmatrix} \sim \begin{bmatrix}1&1&1&\mid&6\\0&-1&-2&\mid&-8\\0&-2&0&\mid&-4\end{bmatrix}. $$

Next, apply \(R_2\to -R_2\), then \(R_3\to R_3+2R_2\):

$$ \begin{bmatrix}1&1&1&\mid&6\\0&-1&-2&\mid&-8\\0&-2&0&\mid&-4\end{bmatrix} \sim \begin{bmatrix}1&1&1&\mid&6\\0&1&2&\mid&8\\0&0&4&\mid&12\end{bmatrix}. $$

Scale \(R_3\) by \(\tfrac14\), replace \(R_2\) by \(R_2-2R_3\), and replace \(R_1\) by \(R_1-R_2-R_3\), using the updated rows at each step:

$$ \begin{bmatrix}1&1&1&\mid&6\\0&1&2&\mid&8\\0&0&4&\mid&12\end{bmatrix} \sim \begin{bmatrix}1&1&1&\mid&6\\0&1&0&\mid&2\\0&0&1&\mid&3\end{bmatrix} \sim \begin{bmatrix}1&0&0&\mid&1\\0&1&0&\mid&2\\0&0&1&\mid&3\end{bmatrix}. $$

The rows give \(x_1=1,\;x_2=2,\;x_3=3\). Check by multiplying the original coefficient matrix by the proposed solution:

$$ \begin{bmatrix}1&1&1\\2&1&0\\1&-1&1\end{bmatrix} \begin{bmatrix}1\\2\\3\end{bmatrix} = \begin{bmatrix}1+2+3\\2+2+0\\1-2+3\end{bmatrix} = \begin{bmatrix}6\\4\\2\end{bmatrix} =\mathbf{b}. $$

The right-hand-side entries changed at every row operation. They are what allowed the final reduced rows to give the solution values.

What Can Be Learned from the Coefficient Matrix Alone?

Reducing \(\mathbf{A}\) alone can still answer questions about the coefficient columns, such as which columns have pivots. But the reduction only describes transformed coefficients. For a particular system \(\mathbf{A}\mathbf{x}=\mathbf{b}\), the rows of those transformed coefficients must be paired with the right-hand sides produced by the same row operations. Appending the original \(\mathbf{b}\) after reducing \(\mathbf{A}\) is not generally valid: the reduced coefficient rows may no longer be paired with the original right-hand-side entries.

Worked Example: Why the Original Right-Hand Side Cannot Be Reattached

For the system in the previous example, the coefficient rows were changed during reduction. For instance, the first operation \(R_2\to R_2-2R_1\) changed the second right-hand side from \(4\) to \(4-2(6)=-8\). If we reduce \(\mathbf{A}\) but leave the right-hand side untouched, we might incorrectly pair the changed second coefficient row \((0,-1,-2)\) with \(4\), rather than \(-8\).

The resulting incorrect equation would be \(-x_2-2x_3=4\). The actual row operation gives \(-x_2-2x_3=-8\). For the verified solution \((1,2,3)^{\top}\), the left side is \(-2-2(3)=-8\), not \(4\). The unmatched right-hand side would therefore reject the true solution and solve a different system.

Common Mistake: Leaving the Last Column Alone

A frequent error is to perform the row operation on the coefficient entries but not on the right-hand side. For the inconsistent system \(x_1+2x_2=3,\;2x_1+4x_2=7\), the correct operation is \(R_2\to R_2-2R_1\) on the augmented matrix:

$$ \begin{bmatrix}1&2&\mid&3\\2&4&\mid&7\end{bmatrix} \sim \begin{bmatrix}1&2&\mid&3\\0&0&\mid&1\end{bmatrix}. $$

A wrong calculation would change the second row’s coefficient entries to zeros but leave its right-hand side as \(7\), giving \([0\ \ 0\mid 7]\). That is not the result of the row operation: the new right-hand side must be \(7-2(3)=1\). Although both nonzero values would signal a contradiction in this example, the incorrect row is still not equivalent to the original equation. The correction is to apply each operation to the entire row, including every entry after the vertical bar.

Keep three checks in mind when solving a system:

  • Keep the final column visibly separate from the coefficient columns, but include it in every row operation.
  • Do not treat a pivot in the final column as a pivot variable; it signals a contradictory row when the coefficient entries in that row are all zero.
  • Substitute a proposed solution into the original equation \(\mathbf{A}\mathbf{x}=\mathbf{b}\), not merely into a partially reduced system.

Check Your Understanding

For each question, pay attention to which information is retained by the augmented matrix.

  1. Write the coefficient matrix and augmented matrix for \(2x_1-x_2=4,\;x_1+3x_2=5\).
  2. Apply \(R_2\to R_2-3R_1\) to \(\begin{bmatrix}1&2&\mid&3\\3&6&\mid&10\end{bmatrix}\). What equation does the second row represent afterward?
  3. Can two systems with the same coefficient matrix have different consistency outcomes? Explain using the systems in this tutorial.
  4. What does a row \([0\ \ 0\ \ 0\mid -2]\) say about the represented system?
  5. Why is it incorrect to reduce the coefficient matrix and then attach the original right-hand side without tracking the operations?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon