The Central Idea

Consider the system

\[ \begin{cases} x+y+z=6,\\ 2x-y+z=3,\\ 3x+y-z=2. \end{cases} \]

Write the augmented matrix:

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

Use the first row as a pivot row:

\[ R_2\leftarrow R_2-2R_1, \] \[ R_3\leftarrow R_3-3R_1. \]

This gives

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

Continue eliminating until a staircase form appears. This forward process is the heart of Gaussian elimination.

Gaussian Elimination

Gaussian elimination uses elementary row operations to reduce an augmented matrix to row-echelon form.

The resulting triangular system is then solved by back substitution.

\[ \boxed{ \text{system} \rightarrow \text{augmented matrix} \rightarrow \text{REF} \rightarrow \text{back substitution} }. \]

Gauss–Jordan Elimination

Gauss–Jordan elimination continues row reduction beyond row-echelon form until reduced row-echelon form is reached.

\[ \boxed{ \text{system} \rightarrow \text{augmented matrix} \rightarrow \text{RREF} \rightarrow \text{read solution} }. \]

The Difference in One Sentence

Gaussian elimination stops when the matrix is ready for back substitution.

Gauss–Jordan elimination keeps going until each pivot is a leading one and the only nonzero entry in its column.

The Same Row Operations Power Both Methods

The difference is how far the reduction continues.

Forward Elimination

The main phase of Gaussian elimination is forward elimination.

  1. Choose a pivot.
  2. Move a suitable row into pivot position if necessary.
  3. Use the pivot row to create zeros below the pivot.
  4. Move down one row and right to the next pivot column.
  5. Repeat.

The Goal of Forward Elimination

\[ \left[ \begin{array}{ccc|c} \ast & \ast & \ast & \ast\\ 0 & \ast & \ast & \ast\\ 0 & 0 & \ast & \ast \end{array} \right]. \]

The leading nonzero entries form pivots, and everything below each pivot is zero.

Back Substitution

Once REF is reached, solve from the bottom equation upward.

For example,

\[ \left[ \begin{array}{ccc|c} 1 & 2 & -1 & 4\\ 0 & 3 & 2 & 7\\ 0 & 0 & 5 & 10 \end{array} \right] \]

gives

\[ 5z=10, \]

then an equation for \(y\), then an equation for \(x\).

Backward Elimination

Gauss–Jordan elimination adds a second major phase. After forward elimination:

  1. scale each pivot to \(1\);
  2. use each pivot to create zeros above it;
  3. continue upward until each pivot is the only nonzero entry in its column.

The final result is RREF.

Gaussian Elimination Example

Solve

\[ \begin{cases} x+y=5,\\ 2x-y=1. \end{cases} \]

Begin with

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

Use

\[ R_2\leftarrow R_2-2R_1. \]

Then

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

This is already in REF.

Back Substitute

The second row gives

\[ -3y=-9, \]

so \(y=3\).

The first row gives

\[ x+3=5, \]

so \(x=2\).

\[ \boxed{(2,3)}. \]

The Same Example with Gauss–Jordan

Start from

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

Scale row \(2\):

\[ R_2\leftarrow-\frac13R_2. \]

Then

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

Clear Above the Pivot

Use

\[ R_1\leftarrow R_1-R_2. \]

Then

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

The solution is read directly:

\[ \boxed{x=2,\qquad y=3}. \]

Both Methods Give the Same Solution

Gaussian elimination and Gauss–Jordan elimination are different stopping points in the same row-reduction process.

Both preserve the original system's solution set.

Why Gaussian Elimination Often Uses Fewer Operations

Gaussian elimination stops after creating zeros below pivots. It does not need to clear entries above pivots.

For one system solved by hand or computer, this can reduce the arithmetic required.

Why Gauss–Jordan Can Be Easier to Interpret

RREF often exposes:

No separate back-substitution phase is needed.

A Three-Variable Gaussian Example

Return to

\[ \begin{cases} x+y+z=6,\\ 2x-y+z=3,\\ 3x+y-z=2. \end{cases} \]

After the first elimination stage:

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

Eliminate the Second Column

One integer-preserving choice is

\[ R_3\leftarrow3R_3-2R_2. \]

Then

\[ R_3=[\,0\quad0\quad-10\mid-30\,]. \]

So

\[ \left[ \begin{array}{ccc|c} 1 & 1 & 1 & 6\\ 0 & -3 & -1 & -9\\ 0 & 0 & -10 & -30 \end{array} \right]. \]

The matrix is now in REF.

Back Substitute for \(z\)

\[ -10z=-30, \] \[ \boxed{z=3}. \]

Back Substitute for \(y\)

\[ -3y-z=-9. \]

With \(z=3\):

\[ -3y-3=-9, \] \[ \boxed{y=2}. \]

Back Substitute for \(x\)

\[ x+y+z=6. \]

Thus,

\[ x+2+3=6, \] \[ \boxed{x=1}. \]

Therefore,

\[ \boxed{(1,2,3)}. \]

Continue the Same Matrix with Gauss–Jordan

Start from the REF matrix:

\[ \left[ \begin{array}{ccc|c} 1 & 1 & 1 & 6\\ 0 & -3 & -1 & -9\\ 0 & 0 & -10 & -30 \end{array} \right]. \]

Scale row \(3\):

\[ R_3\leftarrow-\frac1{10}R_3. \]

Then

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

Clear Above the Third Pivot

Use

\[ R_2\leftarrow R_2+R_3, \] \[ R_1\leftarrow R_1-R_3. \]

This gives

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

Finish the RREF

Scale row \(2\):

\[ R_2\leftarrow-\frac13R_2. \]

Then clear above it:

\[ R_1\leftarrow R_1-R_2. \]

The final matrix is

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

Pivot Selection

At each stage, choose a nonzero entry in the current pivot column.

If the current row contains zero there, swap with a lower row containing a nonzero entry.

Example: Pivot Requires a Row Swap

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

Swap:

\[ R_1\leftrightarrow R_2. \]

Then

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

Convenient Pivots

If several nonzero choices are available, a pivot of \(1\) or \(-1\) often simplifies hand arithmetic.

Row swapping may therefore be useful even when it is not strictly necessary.

Pivoting for Numerical Stability Preview

In numerical computation, pivot choice affects rounding error.

Algorithms often choose a larger-magnitude available pivot. This is called partial pivoting.

Do Not Divide by a Zero Pivot

If a candidate pivot is zero, division by that entry is impossible.

What If the Entire Pivot Column Below Is Zero?

Then no pivot exists in that column at that stage.

Move to the next column. The corresponding variable may become free if no pivot appears in its column later.

Example with a Free Variable

Suppose reduction produces

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

The third variable column has no pivot, so \(z\) is free.

Gaussian Elimination with a Free Variable

Let

\[ z=t. \]

The second row gives

\[ y=5-3t. \]

The first row then gives

\[ x=-6+7t. \]

Thus,

\[ \boxed{ (x,y,z)=(-6+7t,\ 5-3t,\ t) }. \]

Gauss–Jordan Form of the Same System

Continue with

\[ R_1\leftarrow R_1-2R_2. \]

Then

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

The free-variable structure is now especially easy to read.

Inconsistent Systems

Consider

\[ \begin{cases} x+y=3,\\ 2x+2y=8. \end{cases} \]

The augmented matrix is

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

Contradiction Appears During Elimination

Use

\[ R_2\leftarrow R_2-2R_1. \]

Then

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

The second row means

\[ 0=2. \]

Therefore,

\[ \boxed{\text{no solution}}. \]

Stop When a Contradiction Is Found

Once a row of the form

\[ [\,0\quad0\quad\cdots\quad0\mid c\,], \qquad c\ne0 \]

appears, the system is inconsistent.

No further reduction is needed to determine that classification.

Dependent Systems

For

\[ \begin{cases} x+y=3,\\ 2x+2y=6, \end{cases} \]

elimination produces

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

The second row is redundant, so one free variable remains.

Parameterize the Dependent System

Let \(y=t\). Then

\[ x=3-t. \]

So

\[ \boxed{ (x,y)=(3-t,t), \qquad t\in\mathbb{R} }. \]

Unique, Infinite, or None

Gaussian Elimination as an Algorithm

  1. Write the augmented matrix.
  2. Begin with the leftmost variable column.
  3. Choose a nonzero pivot.
  4. Swap rows if needed.
  5. Eliminate entries below the pivot.
  6. Move down and right.
  7. Repeat until REF is reached.
  8. Back substitute.

Gauss–Jordan as an Algorithm

  1. Perform forward elimination.
  2. Scale pivots to \(1\).
  3. Eliminate entries above each pivot.
  4. Continue until RREF is reached.
  5. Read the solution or parameterization directly.

One Common Gauss–Jordan Strategy

Some solvers normalize each pivot to \(1\) immediately, then clear the entire pivot column before moving on.

Others first create REF and then reduce backward.

Both approaches are valid.

There Is More Than One Correct Reduction Path

Different valid pivot choices and row operations may produce different intermediate matrices.

For Gaussian elimination, different REF matrices may result.

For Gauss–Jordan elimination, every correct complete reduction ends at the same RREF.

REF Is Not Unique

A pivot row may be left as

\[ [\,0\quad2\quad4\,] \]

or scaled to

\[ [\,0\quad1\quad2\,]. \]

Both may participate in valid REF matrices.

RREF Is Unique

Every matrix has exactly one reduced row-echelon form.

This makes Gauss–Jordan elimination especially useful when a canonical final representation is desired.

Do We Need Pivot \(1\)s for Gaussian Elimination?

No.

Gaussian elimination only needs REF. Pivot values may remain any nonzero numbers.

Do We Need Pivot \(1\)s for Gauss–Jordan?

Yes.

RREF requires every pivot to equal \(1\), and each pivot must be the only nonzero entry in its column.

Fractions During Elimination

Fractions are valid, but hand calculations may be easier if they are delayed until necessary.

An integer pivot can often be used directly before scaling it to \(1\).

Integer-Preserving Choices

Instead of introducing a fraction immediately, combinations such as

\[ R_2\leftarrow3R_2-2R_1 \]

may keep entries integral.

But avoid unnecessarily large coefficients; sometimes fractions are cleaner.

Clearing Fractions Before Elimination

A row such as

\[ \left[\frac12\quad\frac13\mid4\right] \]

may be scaled by \(6\) to obtain

\[ [\,3\quad2\mid24\,]. \]

Clearing Decimals Before Elimination

Similarly,

\[ [\,0.2\quad0.5\mid3.4\,] \]

can be scaled by \(10\) to obtain

\[ [\,2\quad5\mid34\,]. \]

Back Substitution Is an Algorithm Too

  1. Solve the last nonzero equation.
  2. Substitute upward into the previous equation.
  3. Continue until every pivot variable is determined.

Example of Back Substitution

Suppose REF gives

\[ \begin{cases} x+2y-z=4,\\ 3y+2z=7,\\ 5z=10. \end{cases} \]

Then

\[ z=2, \] \[ 3y+4=7\Rightarrow y=1, \] \[ x+2-2=4\Rightarrow x=4. \]

Thus,

\[ \boxed{(4,1,2)}. \]

Gauss–Jordan Eliminates the Need for Back Substitution

If the same system is reduced to

\[ \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 4\\ 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 2 \end{array} \right], \]

the solution is immediately visible.

Which Method Should You Use?

Use Gaussian elimination when:

Use Gauss–Jordan when:

Method Choice Is Contextual

Neither method is universally superior.

The best method depends on system size, desired output, arithmetic complexity, and whether RREF itself is useful.

Applied Example: Production Mix

Suppose

\[ \begin{cases} x+y+z=12,\\ 2x+y+3z=25,\\ x+2y+z=17. \end{cases} \]

The augmented matrix is

\[ \left[ \begin{array}{ccc|c} 1 & 1 & 1 & 12\\ 2 & 1 & 3 & 25\\ 1 & 2 & 1 & 17 \end{array} \right]. \]

Gaussian or Gauss–Jordan elimination can determine the production mix systematically.

Matrix Algorithms Do Not Replace Interpretation

After solving an applied system, still ask:

Verification Still Matters

After elimination, substitute the solution into the original equations.

For \((1,2,3)\):

\[ 1+2+3=6, \] \[ 2(1)-2+3=3, \] \[ 3(1)+2-3=2. \]

All original equations are satisfied.

Gaussian Elimination and LU Factorization Preview

Later linear algebra reorganizes Gaussian elimination into factorizations such as

\[ A=LU. \]

The elimination steps are stored in structured matrices so related systems can be solved efficiently.

Gauss–Jordan and Matrix Inverses Preview

To compute an inverse, one may augment a square matrix with the identity:

\[ [A\mid I]. \]

Gauss–Jordan elimination attempts to transform this into

\[ [I\mid A^{-1}]. \]

Elimination and Rank Preview

The number of pivots revealed during elimination determines the rank of a matrix.

Rank measures how many independent constraints or directions remain after reduction.

Elimination and Linear Independence Preview

Pivot structure later helps determine whether vectors or columns are linearly independent.

The same algorithm used to solve systems becomes a general tool throughout linear algebra.

A Reliable Gaussian-Elimination Workflow

  1. Write the augmented matrix carefully.
  2. Choose the first available pivot.
  3. Swap rows if necessary.
  4. Create zeros below the pivot.
  5. Move down and right to the next pivot.
  6. Continue until REF is reached.
  7. Check for contradiction and free-variable structure.
  8. Back substitute.
  9. Verify in the original system.

A Reliable Gauss–Jordan Workflow

  1. Begin with forward elimination.
  2. Continue until pivots form a staircase.
  3. Scale pivots to \(1\).
  4. Use each pivot to clear its column above and below.
  5. Continue until RREF is reached.
  6. Read pivot and free variables directly.
  7. Write the solution or parameterization.

A Reliable Pivot-Selection Workflow

  1. Look in the current pivot column at or below the current row.
  2. If the current entry is nonzero and convenient, use it.
  3. If it is zero, swap with a row containing a nonzero entry.
  4. If the entire remaining column is zero, move to the next column.
  5. Prefer simple pivots by hand when doing so reduces arithmetic.

A Reliable Classification Workflow

  1. Reduce to at least REF.
  2. If a contradiction row appears, report no solution.
  3. Otherwise identify pivot columns among the variable columns.
  4. If every variable column has a pivot, the solution is unique.
  5. If one or more variable columns lack pivots, assign free parameters and describe infinitely many solutions.

Common Errors

Confusing Gaussian with Gauss–Jordan Elimination

Gaussian elimination targets REF and uses back substitution. Gauss–Jordan targets RREF.

Dividing by a Zero Pivot

Swap rows or move to another column instead.

Forgetting the Augmented Entry

Every row operation acts on the entire row, including the constant column.

Stopping Before REF

Zeros must appear below each pivot and pivot positions must move right as rows descend.

Calling REF “RREF”

RREF also requires pivot \(1\)s and zeros above pivots.

Doing Unnecessary Gauss–Jordan Work

If REF plus back substitution solves the problem, full reduction may not be needed.

Stopping at \(0=0\)

A zero row signals redundancy. Identify free variables and parameterize the solution set.

Ignoring a Contradiction Row

A row representing \(0=c\) with \(c\ne0\) proves inconsistency.

Rounding Too Early

Keep exact fractions during symbolic elimination when possible.

Failing to Verify Applied Solutions

The reduced answer must still satisfy the original model and its domain restrictions.

Practice

1. Gaussian Elimination

Solve

\[ \begin{cases} x+y=7,\\ 2x-y=2. \end{cases} \]
Check Answer

Start with

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

Use \(R_2\leftarrow R_2-2R_1\):

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

So \(y=4\) and \(x=3\).

\[ \boxed{(3,4)}. \]

2. Continue to Gauss–Jordan

Reduce

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

to RREF.

Check Answer

Scale \(R_2\leftarrow-\frac13R_2\), then use \(R_1\leftarrow R_1-R_2\).

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

3. Pivot Swap

What should be the first step for

\[ \left[ \begin{array}{cc|c} 0 & 2 & 5\\ 1 & 3 & 7 \end{array} \right]? \]
Check Answer \[ \boxed{R_1\leftrightarrow R_2}. \]

4. Detect Inconsistency

Classify

\[ \left[ \begin{array}{cc|c} 1 & 2 & 3\\ 0 & 0 & 5 \end{array} \right]. \]
Check Answer

The second row gives \(0=5\).

\[ \boxed{\text{No solution}}. \]

5. Detect a Free Variable

Classify

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

The third variable column has no pivot.

\[ \boxed{\text{Infinitely many solutions}}. \]

6. Parameterize the Previous System

Let the variables be \(x,y,z\). Describe all solutions.

Check Answer

Let \(z=t\). Then

\[ x=4-2t, \qquad y=3+t. \]

So

\[ \boxed{(x,y,z)=(4-2t,\ 3+t,\ t)}. \]

7. Back Substitution

Solve

\[ \begin{cases} x+2y-z=5,\\ 3y+z=7,\\ 2z=4. \end{cases} \]
Check Answer

First \(z=2\). Then \(3y+2=7\), so \(y=\frac53\).

Finally,

\[ x+2\left(\frac53\right)-2=5, \]

so

\[ x=\frac{11}{3}. \]

Therefore,

\[ \boxed{\left(\frac{11}{3},\frac53,2\right)}. \]

8. REF or RREF?

Classify

\[ \begin{bmatrix} 1 & 2 & 0\\ 0 & 3 & 4\\ 0 & 0 & 5 \end{bmatrix}. \]
Check Answer

It is in REF but not RREF.

9. Why Gaussian Can Stop Earlier

Why does Gaussian elimination usually require fewer row operations?

Check Answer

It stops at REF and uses back substitution. Gauss–Jordan continues by normalizing pivots and clearing entries above them.

10. Three-Variable Unique Solution

Solve from

\[ \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 2\\ 0 & 1 & 0 & -1\\ 0 & 0 & 1 & 5 \end{array} \right]. \]
Check Answer \[ \boxed{(x,y,z)=(2,-1,5)}. \]

11. Zero Pivot Column

If all entries at and below the current pivot position in a column are zero, what should the algorithm do?

Check Answer

Move to the next column. No pivot can be placed in the current column at that stage.

12. Gaussian or Gauss–Jordan?

If your goal is to compute a matrix inverse using \([A\mid I]\), which method is naturally suited to the task?

Check Answer \[ \boxed{\text{Gauss–Jordan elimination}}. \]

The goal is to reduce the left side fully to the identity matrix.

Key Ideas

Where This Leads

Gaussian and Gauss–Jordan elimination complete the transition from informal elimination to a general algorithm. What began as adding and subtracting equations is now a structured procedure that can solve, classify, and parameterize systems of many variables.

From here, the section can use row reduction to study matrix equations, inverses, determinants, rank, homogeneous systems, linear independence, and applications. Gaussian elimination will also reappear later in numerical methods, scientific computing, optimization, and matrix factorizations.