Gaussian Elimination Solver for Ax = b
Enter an augmented matrix [A | b] and watch every pivot, row swap, and elimination step. The solver classifies your system as having a unique solution, no solution, or infinitely many solutions using ranks.
1/2 are allowed.How the algorithm works
A linear system Ax = b stacks the coefficient matrix A beside the constant vector b to form the augmented matrix [A | b]. This tool applies Gaussian elimination with partial pivoting, the standard, numerically stable direct method taught in every linear-algebra course.
For each column k, the algorithm scans rows at or below the diagonal and selects the row whose entry in that column has the largest absolute value — the partial pivot. Swapping it into place keeps the multipliers small and controls round-off error. Each lower row i is then updated by the operation Ri → Ri − (aik/akk)·Rk, which drives everything below the pivot to zero. Repeating this across all columns produces an upper-triangular form (row echelon form).
Once triangular, the system is solved by back-substitution: the last pivot equation gives one variable, which is substituted upward, so xi = (bi − Σj>i aijxj) / aii. Classification comes from the Rouché–Capelli theorem: comparing rank(A) with rank([A | b]). If the ranks differ, a row reduces to 0 = nonzero and there is no solution. If they are equal to the number of unknowns, the solution is unique; if equal but smaller, free variables remain and there are infinitely many solutions. The solver reports the rank, the number of free variables, and each row operation performed along the way, so you can check homework or debug a numerical routine step by step.