Gaussian Elimination Calculator

    Solve square systems of linear equations from 2x2 to 5x5 with row operations, partial pivoting, back substitution, ranks, and solution classification.

    3 x 3
    Enter the system coefficients. Fractions with a slash are supported. Variables: x, y, z.
    x +
    y +
    z =
    x +
    y +
    z =
    x +
    y +
    z =
    Virtual keypad for the selected cell
    Solution
    x1
    y2
    z3
    Size
    3 x 3
    Rank of A
    3
    Rank of augmented matrix
    3
    Forward elimination
    1. Initial augmented matrix with the constants column
    [ 1 1 1 | 6 ]
    [ 2 -1 1 | 3 ]
    [ 1 2 -1 | 2 ]
    2. Swap rows 1 and 2 to choose the pivot in column 1
    [ 2 -1 1 | 3 ]
    [ 1 1 1 | 6 ]
    [ 1 2 -1 | 2 ]
    3. Subtract row 1 multiplied by 0.5 from row 2
    [ 2 -1 1 | 3 ]
    [ 0 1.5 0.5 | 4.5 ]
    [ 1 2 -1 | 2 ]
    4. Subtract row 1 multiplied by 0.5 from row 3
    [ 2 -1 1 | 3 ]
    [ 0 1.5 0.5 | 4.5 ]
    [ 0 2.5 -1.5 | 0.5 ]
    5. Swap rows 2 and 3 to choose the pivot in column 2
    [ 2 -1 1 | 3 ]
    [ 0 2.5 -1.5 | 0.5 ]
    [ 0 1.5 0.5 | 4.5 ]
    6. Subtract row 2 multiplied by 0.6 from row 3
    [ 2 -1 1 | 3 ]
    [ 0 2.5 -1.5 | 0.5 ]
    [ 0 0 1.4 | 4.2 ]
    Back substitution - solve variables from bottom to top:
    z = (4.2) / 1.4 = 3
    y = (0.5 − (-1.5)·z(3)) / 2.5 = 2
    x = (3 − (-1)·y(2) − (1)·z(3)) / 2 = 1

    Gaussian elimination is applied to square linear systems from 2x2 to 5x5. The calculator shows forward elimination, back substitution for a unique solution, ranks, and the system type. For infinitely many solutions it classifies the case but does not build the full parametric solution.

    ₁₂₃₄₅

    What Gaussian elimination does

    Gaussian elimination solves a linear system by applying row operations to an augmented matrix, then using back substitution when a unique solution exists. This calculator supports square systems from 2x2 through 5x5.

    A is the coefficient matrix, x is the vector of unknowns, and b is the constants column.

    1. Build the augmented matrix
    2. Use partial pivoting to choose a stable pivot
    3. Eliminate entries below each pivot
    4. Use ranks to classify the system
    5. Apply back substitution when the solution is unique

    How ranks classify the system

    rank(A) and rank([A|b]) both equal n, so the system has a unique solution.

    rank(A) and rank([A|b]) match but are below n, so free variables remain.

    rank(A) is lower than rank([A|b]), so the augmented matrix contains a contradiction.

    Rank conditionSystem typeCalculator output
    both ranks equal nconsistent and determinedunique solution and back substitution
    ranks match but are below nconsistent and underdeterminedinfinitely many solutions
    augmented rank is largerinconsistentno solution
    Parametric solutions
    For infinitely many solutions, this tool classifies the case and shows ranks, but it does not output the full parametric family.

    Gaussian elimination vs Cramer's rule

    MethodBest useLimit
    Gaussian eliminationrow operations, ranks, and special cases for 2x2 to 5x5 systemsdoes not output a full parametric solution
    Cramer's rulesmall square systems with a nonzero determinantnot applicable when the main determinant is zero
    Gauss-Jordanreduced row echelon formthis tool shows classic forward elimination and back substitution
    Why users compare methods
    Cramer's rule is compact for determinant formulas, while Gaussian elimination better exposes row operations, ranks, and degenerate cases.

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools