This Gauss-Jordan method calculator solves a system of linear equations by reducing its augmented matrix to reduced row echelon form. Enter the coefficients and constants and it reduces the matrix and reports a single solution, infinitely many solutions with free variables, or no solution.
Gauss-Jordan Method Calculator
Solve a linear system or reduce any matrix to reduced row echelon form with every row operation shown and exact fraction arithmetic.
Starting values: the calculator opens with the system 2x + y – z = 8, -3x – y + 2z = -11 and -2x + y + 2z = -3. The solution is x = 2, y = 3 and z = -1.
How Gauss-Jordan elimination works
Write the system as an augmented matrix, with the coefficients on the left and the constants in the last column. Then use three kinds of row operation: swap two rows, multiply a row by a non-zero number, and add a multiple of one row to another. The goal is a matrix with a leading 1 in each pivot column and zeros everywhere else in that column. This is reduced row echelon form, and the solution can be read straight off it.
Gaussian elimination stops at the staircase shape and then back-substitutes. Gauss-Jordan carries on until the left side is the identity, so no back-substitution is needed.
Worked examples
Example 1: the default system
The augmented matrix has rows (2, 1, -1 | 8), (-3, -1, 2 | -11) and (-2, 1, 2 | -3).
- Divide row 1 by 2: (1, 0.5, -0.5 | 4).
- Add 3 times row 1 to row 2, and 2 times row 1 to row 3. Row 2 becomes (0, 0.5, 0.5 | 1) and row 3 becomes (0, 2, 1 | 5).
- Multiply row 2 by 2: (0, 1, 1 | 2). Subtract 0.5 times row 2 from row 1, giving (1, 0, -1 | 3). Subtract 2 times row 2 from row 3, giving (0, 0, -1 | 1).
- Multiply row 3 by -1: (0, 0, 1 | -1). Add row 3 to row 1 and subtract it from row 2.
The result is the identity on the left with 2, 3 and -1 on the right, so x = 2, y = 3 and z = -1. Substituting back into the first equation gives 4 + 3 + 1 = 8, which checks.
Example 2: infinitely many solutions
Take x + y + z = 3 and 2x + 2y + 2z = 6. The second equation is just twice the first, so elimination turns it into a row of zeros. That leaves one equation in three unknowns. The calculator writes the free variables as t1 and t2, and expresses the pivot variable in terms of them: x = 3 – t1 – t2, with y = t1 and z = t2.
Example 3: no solution
Take x + y = 1 and x + y = 2. Elimination produces the row (0, 0 | 1), which says 0 = 1. That is impossible, so the system is inconsistent and has no solution.
Reading the three outcomes
- A pivot in every variable column and no contradictory row: one unique solution.
- A pivot-free variable column and no contradictory row: infinitely many solutions, with the free variables as parameters.
- A row of zeros on the left with a non-zero constant: no solution.
Size limits and tips
The calculator accepts up to 8 rows and 9 columns, which means up to 8 equations in as many as 8 unknowns plus the constants column. Put every variable in the same order in every equation, and enter a 0 for any variable that does not appear.
For a square system you can also find the inverse of the coefficient matrix. The inverse 3×3 matrix calculator does that for the 3 by 3 case.
Common mistakes
- Forgetting to carry an operation across the constants column.
- Dropping a minus sign when adding a multiple of one row to another.
- Dividing by a pivot that is zero instead of swapping rows first.
Gauss-Jordan or substitution?
For two equations, substitution is often quicker by hand. From three unknowns upward, elimination wins, because it follows a fixed routine that never needs you to decide which variable to isolate. It is also the same routine a computer uses, which makes it easy to check hand work against the calculator. If your equations come from a word problem, write each one with the variables in the same order first, then enter the coefficients row by row.
Quick self-check
After you get a solution, put it back into every original equation, not only the first. A single wrong row operation can still leave one equation satisfied while the others fail. For the default system, the second equation gives -6 – 3 – 2 = -11 and the third gives -4 + 3 – 2 = -3, so both agree with the solution.
Keep in mind that decimals can pick up rounding in long chains of row operations, so a result such as 2.0000001 should be read as 2.
Frequently asked questions
What is the difference between Gaussian and Gauss-Jordan elimination?
Gaussian elimination stops at row echelon form and then back-substitutes. Gauss-Jordan continues to reduced row echelon form, so the solution can be read directly.
How do I know if a system has no solution?
If elimination produces a row with all zeros on the left and a non-zero number on the right, the system is inconsistent.
What are free variables?
They are variables with no pivot. They can take any value, and the other variables are written in terms of them, so the system has infinitely many solutions.
How many equations can the calculator handle?
Up to 8 rows and 9 columns, including the constants column.
Does the order of the equations matter?
No. Swapping equations does not change the solution.
