Gauss-Jordan Elimination Calculator
Welcome to Omni's Gauss-Jordan elimination calculator! Whether you've come here because you need to learn how to solve a linear system by the Gauss-Jordan elimination algorithm or instead you want to invert a matrix using this method, you're at the right place!
We will explain what the Gauss-Jordan elimination actually is and how it differs from the Gauss elimination, which you may have encountered earlier in your mathematical journey. Then we will tell you how to do the Gauss-Jordan elimination by hand or if you'd rather save some effort, how to use this Gauss-Jordan elimination calculator most efficiently.
🙋 The Gauss-Jordan elimination algorithm is especially popular in the context of solving systems of linear equations. In our dedicated tool, namely the reduced row echelon form calculator, we approach the Gauss-Jordan elimination method from this specific angle.
What is the Gauss-Jordan elimination method?
The Gauss-Jordan elimination method is a procedure where we convert a matrix into its reduced row echelon form by using only three specific operations, called elementary row operations.
The purpose of the Gauss-Jordan elimination method is, most often, to:
- Solve a system of linear equations;
- Inverse a matrix;
- Compute the rank of a matrix; or
- Compute the determinant of a matrix.
As you can see, several new notions appeared: row echelon, elementary operations, etc. Let's discuss them first, and then we will move on to discussing how to do the Gauss-Jordan elimination.
What is the (reduced) row echelon form of a matrix?
A matrix is in the row echelon form when:
- For zero rows: they are all at the bottom of the matrix; and
- For non-zero rows: the leftmost non-zero entry in a row (called the pivot or the leading coefficient) is to the right of the pivot of the row above.
A matrix is in reduced row echelon form if additionally:
- Each pivot is equal to 1; and
- Each pivot is the only non-zero coefficient in its column (there are only zeros above and below the pivot).
Matrices in the row echelon form (but not in the reduced row echelon form):
Matrices in the reduced row echelon form:
What are row operations in Gauss elimination?
Here we list the allowed row operations in the Gauss (and Gauss-Jordan) elimination:
Swapping any two of the rows.
Adding/subtracting a scalar multiple of one row to/from another row.
Multiplying any of the rows by any (non-zero!) scalar.
Let's look at some examples:
- Swap the 1st row with the 2nd row:
- Multiply the 1st row by :
- Add the 1st row multiplied by
-2to the 2nd row:
🙋 If you need a refresher on how to perform math operations (addition, multiplication, etc...) on matrix rows, visit our vector calculator.
Can you see how each of these operations helps us perform the Gauss-Jordan elimination? Let's see:
By swapping rows, we can easily put the zero rows at the bottom of the matrix.
The aim of adding/subtracting a scalar multiple of a row to/from another row is to turn the entries above and below the pivots into zeros.
By multiplying a row by a scalar, you'll easily make the pivots equal to 1 – just multiply the pivot, equal to some p, by the scalar 1/p.
Gauss-Jordan elimination: 3×3 example
To see how the row operations introduced above work in practice, let's use them to solve the following 3×3 example by the Gauss-Jordan elimination:
The augmented matrix of this system reads:
Let's subtract the 1st row multiplied by from the 2nd row:
We've managed to produce zero in the 2nd row and 1st column! We do the same for the 3rd row and 1st column:
Perfect! In fact, as you can see, we've managed to produce two zeros in the 2nd row! Let's use this unexpected gift: we swap the 2nd and 3rd rows:
In this way, we've already obtained a row echelon form. From here, you can easily solve the system. Let's, however, stick to the Gauss-Jordan elimination and try to produce the reduced row echelon form.
First, we multiply the last row by so that the pivot equals :
And we multiply the 2nd row by so that the pivot equals :
Next, we want to eliminate the non-zero element in the 1st row and 2nd column. To this end, from the 1st row we subtract the 2nd row multiplied by :
Two more entries to eliminate: the above-diagonal elements in the 3rd column. You know what to do, right? From the 1st row we subtract the 3rd row multiplied by :
And to the 2nd row we add the 3rd row multiplied by :
Yay, we're done! Our matrix is in the reduced row echelon form. In the last column, we see the solution to our linear system:
How do I do the Gauss-Jordan elimination by hand?
Perform the Gauss-Jordan elimination as follows:
Swap the rows so that there is a pivot (non-zero number) in the 1st row and 1st column.
Multiply the first row so that the pivot becomes 1.
Add/subtract multiples of the 1st row to/from the other rows to turn all the remaining entries of the 1st column are zeros.
Swap rows to have a pivot in the 2nd row and 2nd column. Apply Steps 2 & 3.
Repeat steps 2-4, moving along the main diagonal.
Hmmm.... so many steps! Performing the Gauss-Jordan elimination algorithm, even if straightforward, may be time-consuming. You surely have better ideas on how to use your free time, don't you? ;) Use our Gauss-Jordan elimination calculator to do your homework quickly and then move on to... other stuff.
How to use this Gauss-Jordan elimination calculator?
Omni's Gauss-Jordan elimination calculator is a very simple tool to use. Follow these steps:
Input the coefficients of your matrix.
Tell us whether you want the row echelon form or the reduced row echelon form as a result. We recommend the latter as the former is non-unique!
The calculations go off immediately, and the result is displayed below the coefficient fields.
Note you can use this calculator to generate as many 2×2 and 3×3 examples of Gauss-Jordan elimination as you wish.
Is Gauss-Jordan elimination the same as Gauss elimination?
Almost. The Gauss-Jordan elimination requires that we eliminate the coefficients above and below each pivot and make sure each pivot is equal to 1. As a consequence:
The result of the Gauss-Jordan elimination is a matrix in the reduced row echelon form.
While the result of the Gauss elimination is a matrix in the row echelon form.