Cadmeo

Matrix Row Reducer

One row per line, values separated by spaces or commas. For a system of equations, include the constants as the last column.

3 × 4
Size
3
Rank
11
Steps
Reduced row echelon form
        1         0         0         2
        0         1         0         3
        0         0         1        -1
0. Starting matrix
        2         1        -1         8
       -3        -1         2       -11
       -2         1         2        -3
1. Swap row 1 with row 2
       -3        -1         2       -11
        2         1        -1         8
       -2         1         2        -3
2. Divide row 1 by -3
        1    0.3333   -0.6667    3.6667
        2         1        -1         8
       -2         1         2        -3
3. Row 2 minus 2 x row 1
        1    0.3333   -0.6667    3.6667
        0    0.3333    0.3333    0.6667
       -2         1         2        -3
4. Row 3 minus -2 x row 1
        1    0.3333   -0.6667    3.6667
        0    0.3333    0.3333    0.6667
        0    1.6667    0.6667    4.3333
5. Swap row 2 with row 3
        1    0.3333   -0.6667    3.6667
        0    1.6667    0.6667    4.3333
        0    0.3333    0.3333    0.6667
6. Divide row 2 by 1.6667
        1    0.3333   -0.6667    3.6667
        0         1       0.4       2.6
        0    0.3333    0.3333    0.6667
7. Row 1 minus 0.3333 x row 2
        1         0      -0.8       2.8
        0         1       0.4       2.6
        0    0.3333    0.3333    0.6667
8. Row 3 minus 0.3333 x row 2
        1         0      -0.8       2.8
        0         1       0.4       2.6
        0         0       0.2      -0.2
9. Divide row 3 by 0.2
        1         0      -0.8       2.8
        0         1       0.4       2.6
        0         0         1        -1
10. Row 1 minus -0.8 x row 3
        1         0         0         2
        0         1       0.4       2.6
        0         0         1        -1
11. Row 2 minus 0.4 x row 3
        1         0         0         2
        0         1         0         3
        0         0         1        -1

The matrix row reducer produces the reduced row echelon form of any matrix and lists every row operation that got there, numbered, with the matrix redrawn after each one. It also reports the rank. The steps are the point, for checking your own working, the final matrix alone tells you nothing about where you went wrong.

How it works

This is Gauss-Jordan elimination with partial pivoting. Working across the columns. It picks the row with the largest absolute value in the current column as the pivot, swaps it up, scales it to 1, then eliminates that column from every other row.

  1. Find the pivot: the largest absolute entry in the current column, at or below the current row.
  2. Swap it into position if it is not already there.
  3. Divide the pivot row so the pivot becomes 1.
  4. Subtract multiples of the pivot row from every other row to zero the rest of that column.
  5. Move to the next row and column and repeat.

Partial pivoting is not cosmetic. Choosing the largest available pivot keeps the multipliers small, which limits how far floating-point rounding error grows through the elimination. A method that always takes the topmost non-zero entry gives visibly worse answers on badly scaled matrices.

To solve a system of equations, enter it as an augmented matrix, the coefficients with the constants as the final column. The solution reads straight off the reduced form, one variable per row, with no back-substitution.

Examples

A system with one solution

Augmented matrix

2 1 -1 8 / -3 -1 2 -11 / -2 1 2 -3

Result

Rank 3 · the reduced form is the identity with 2, 3, -1 in the last column

Three pivots for three unknowns. Reading the rows gives x = 2, y = 3, z = -1, and the step list shows every operation that produced it.

A dependent system

Augmented matrix

1 2 3 / 2 4 6

Result

Rank 1 · the second row reduces to all zeros

The second row is twice the first, so it eliminates completely. One pivot against two unknowns leaves one free variable, which is what a rank below the number of unknowns means.

An inconsistent system

Augmented matrix

1 1 2 / 1 1 5

Result

Rank 2 · a row reading 0 0 with 1 in the constant column

That row asserts 0 = 1, which cannot hold, so the system has no solution. A zero row with a non-zero constant is the signature to look for.

Frequently asked questions

What is the difference between row echelon and reduced row echelon form?

Row echelon form has zeros below each pivot; reduced row echelon form also has zeros above them and every pivot equal to 1. RREF is unique for a given matrix, which echelon form is not, and it lets you read solutions off directly rather than back-substituting.

How do I tell from the output that a system has no solution?

Look for a row that is all zeros in the coefficient columns but non-zero in the augmented column. It reads as 0 = c for some non-zero c, which is impossible, so the system is inconsistent.

What does the rank tell me?

The rank is the number of pivots, the number of genuinely independent equations. If it equals the number of unknowns there is at most one solution; if it is smaller and the system is consistent, the gap is the number of free variables.

Why does it choose a pivot by largest absolute value?

To limit floating-point error. Dividing by a very small pivot creates very large multipliers, and those amplify rounding error through every later step. Partial pivoting is the standard defence and the reason these answers hold up on awkward matrices.

Can it handle non-square matrices?

Yes. Elimination works on any shape and rows need only agree in length. A matrix with more columns than pivots simply has free variables.

Why do some entries show as a long decimal?

Elimination on floating-point numbers produces values like 1e-17 where the exact answer is zero. Entries within a small tolerance are treated as zero and the rest are displayed rounded, so the reduced form reads cleanly rather than showing the arithmetic dust.