Mathwords logoReference LibraryMathwords

Gauss-Jordan Elimination

Gauss-Jordan Elimination

A method of solving a linear system of equations. This is done by transforming the system's augmented matrix into reduced row-echelon form by means of row operations.

 

Step-by-step Gauss-Jordan elimination example solving x+y+z=3, 2x+3y+7z=0, x+3y-2z=17, yielding x=1, y=4, z=-2.

 

 

See also

Gaussian elimination

Key Formula

[a11a12a13b1a21a22a23b2a31a32a33b3]row operations[100x1010x2001x3]\left[\begin{array}{ccc|c} a_{11} & a_{12} & a_{13} & b_1 \\ a_{21} & a_{22} & a_{23} & b_2 \\ a_{31} & a_{32} & a_{33} & b_3 \end{array}\right] \xrightarrow{\text{row operations}} \left[\begin{array}{ccc|c} 1 & 0 & 0 & x_1 \\ 0 & 1 & 0 & x_2 \\ 0 & 0 & 1 & x_3 \end{array}\right]
Where:
  • aija_{ij} = Coefficients of the variables in the original system of equations
  • bib_i = Constants on the right-hand side of each equation
  • x1,x2,x3x_1, x_2, x_3 = The solution values read directly from the reduced matrix

Worked Example

Problem: Solve the system using Gauss-Jordan Elimination: x+2y=10x + 2y = 10 3x+4y=243x + 4y = 24
Step 1: Write the augmented matrix for the system.
[12103424]\left[\begin{array}{cc|c} 1 & 2 & 10 \\ 3 & 4 & 24 \end{array}\right]
Step 2: Eliminate the 3 in row 2, column 1 by replacing R₂ with R₂ − 3R₁.
R2R23R1:[1210026]R_2 \leftarrow R_2 - 3R_1: \quad \left[\begin{array}{cc|c} 1 & 2 & 10 \\ 0 & -2 & -6 \end{array}\right]
Step 3: Scale row 2 so the pivot becomes 1 by dividing R₂ by −2.
R2R22:[1210013]R_2 \leftarrow \frac{R_2}{-2}: \quad \left[\begin{array}{cc|c} 1 & 2 & 10 \\ 0 & 1 & 3 \end{array}\right]
Step 4: Eliminate the 2 above the pivot in column 2 by replacing R₁ with R₁ − 2R₂. This is the key Gauss-Jordan step: we eliminate entries above the pivot, not just below.
R1R12R2:[104013]R_1 \leftarrow R_1 - 2R_2: \quad \left[\begin{array}{cc|c} 1 & 0 & 4 \\ 0 & 1 & 3 \end{array}\right]
Step 5: Read the solution directly from the reduced row-echelon form.
x=4,y=3x = 4, \quad y = 3
Answer: x = 4, y = 3

Another Example

This example shows a 3×3 system, requiring more row operations and demonstrating the full process of eliminating both below and above every pivot to reach RREF.

Problem: Solve the 3×3 system using Gauss-Jordan Elimination: x+y+z=6x + y + z = 6 2x+3y+z=142x + 3y + z = 14 x+2y+3z=14x + 2y + 3z = 14
Step 1: Write the augmented matrix.
[11162311412314]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & 3 & 1 & 14 \\ 1 & 2 & 3 & 14 \end{array}\right]
Step 2: Eliminate below the first pivot. Replace R₂ with R₂ − 2R₁ and R₃ with R₃ − R₁.
[111601120128]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -1 & 2 \\ 0 & 1 & 2 & 8 \end{array}\right]
Step 3: Eliminate below the second pivot. Replace R₃ with R₃ − R₂.
[111601120036]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -1 & 2 \\ 0 & 0 & 3 & 6 \end{array}\right]
Step 4: Scale R₃ by dividing by 3 to make the third pivot equal to 1.
[111601120012]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -1 & 2 \\ 0 & 0 & 1 & 2 \end{array}\right]
Step 5: Now eliminate above each pivot (the Gauss-Jordan part). Replace R₂ with R₂ + R₃, then R₁ with R₁ − R₃, then R₁ with R₁ − R₂.
R_2 \leftarrow R_2 + R_3: \quad \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 0 & 4 \\ 0 & 0 & 1 & 2 \end{array}\right]$$$$R_1 \leftarrow R_1 - R_3: \quad \left[\begin{array}{ccc|c} 1 & 1 & 0 & 4 \\ 0 & 1 & 0 & 4 \\ 0 & 0 & 1 & 2 \end{array}\right]$$$$R_1 \leftarrow R_1 - R_2: \quad \left[\begin{array}{ccc|c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 4 \\ 0 & 0 & 1 & 2 \end{array}\right]
Answer: x = 0, y = 4, z = 2

Frequently Asked Questions

What is the difference between Gaussian Elimination and Gauss-Jordan Elimination?
Gaussian Elimination reduces the matrix to row-echelon form (upper triangular), where you then use back-substitution to find the solution. Gauss-Jordan Elimination goes further by also eliminating entries above each pivot, producing reduced row-echelon form (RREF). With Gauss-Jordan, the solution is read directly from the final matrix without any back-substitution.
When should you use Gauss-Jordan Elimination?
Use Gauss-Jordan Elimination when you want a direct, systematic method to solve a linear system, especially when the system has many variables. It is also the standard approach for finding the inverse of a matrix by augmenting it with the identity matrix and row-reducing.
What are the three allowed row operations in Gauss-Jordan Elimination?
The three elementary row operations are: (1) swap two rows, (2) multiply a row by a nonzero constant, and (3) add a multiple of one row to another row. These operations change the matrix without changing the solution of the system.

Gauss-Jordan Elimination vs. Gaussian Elimination

Gauss-Jordan EliminationGaussian Elimination
GoalReduce to reduced row-echelon form (RREF)Reduce to row-echelon form (REF)
Elimination directionEliminates entries both above and below each pivotEliminates entries only below each pivot
Finding the solutionRead the solution directly from the final matrixRequires back-substitution after row reduction
Number of operationsMore row operations overallFewer row operations, but back-substitution is needed
Common useSolving systems; finding matrix inversesSolving systems; computing determinants

Why It Matters

Gauss-Jordan Elimination appears in every introductory linear algebra course and is one of the first algorithmic methods students learn for solving systems of equations. Beyond solving systems, the same technique is used to find the inverse of a matrix and to determine whether a set of vectors is linearly independent. It also forms the basis for understanding how computers solve large linear systems in fields like engineering, data science, and physics.

Common Mistakes

Mistake: Forgetting to eliminate entries above the pivots, stopping at row-echelon form instead of reduced row-echelon form.
Correction: Gauss-Jordan requires that every pivot has zeros both above and below it, not just below. After creating zeros below a pivot (as in Gaussian Elimination), continue by using that pivot row to eliminate all entries above it as well.
Mistake: Performing a row operation incorrectly by applying it to the wrong row, such as modifying the pivot row instead of the target row.
Correction: When you compute RiRikRjR_i \leftarrow R_i - kR_j, only row ii changes. Row jj (the pivot row) stays exactly the same. Write out the operation explicitly before computing to avoid errors.

Related Terms