Gaussian Elimination Calculator

Solve systems of linear equations with exact fraction arithmetic. RREF, parametric solutions, and step‑by‑step precision.

2x2: 2x+y=5, x-3y=6 3x3: unique 3x3: infinite sol 4x4: inconsistent Fractions: 1/2 x + 1/3 y = 1

Understanding Gaussian Elimination

Gaussian elimination (or row reduction) is a method for solving systems of linear equations. It was named after Carl Friedrich Gauss, although it was known in China as early as 179 AD (described in The Nine Chapters on the Mathematical Art).

Elementary Row Operations (do not change the solution set):

  • Swap two rows
  • Multiply a row by a nonzero constant
  • Add a multiple of one row to another

Reduced Row Echelon Form (RREF)

A matrix is in RREF if:

  • All nonzero rows are above any rows of all zeros.
  • The leading entry (pivot) of each nonzero row is 1.
  • The pivot is the only nonzero entry in its column.
  • Each pivot is to the right of the pivot in the row above.

Once a matrix is in RREF, the solution can be read directly:

  • If a row [0 ... 0 | b] with b≠0 appears, the system is inconsistent (no solution).
  • Otherwise, each pivot column corresponds to a basic variable. Columns without pivots are free variables.
  • If there are no free variables, the solution is unique. If free variables exist, there are infinitely many solutions (parametric).

Geometric Interpretation

Each equation represents a plane (in 3D) or a line (in 2D). The solution is the intersection of these geometric objects. Gaussian elimination systematically reduces the system to reveal this intersection.

Why Exact Fractions Matter

Floating‑point arithmetic can introduce rounding errors that hide the true nature of a system (e.g., a system that is actually inconsistent might appear consistent due to tiny residuals). Using exact fractions guarantees that the output is mathematically correct.

Applications

  • Engineering: solving circuits (Kirchhoff's laws), structural analysis.
  • Economics: Leontief input‑output models.
  • Computer Graphics: transformations, ray tracing.
  • Data Science: linear regression (normal equations).

Did you know? The method of elimination was used in ancient China to solve problems like: “Three sheafs of good crop, two sheafs of medium crop, and one sheaf of bad crop yield 39 dou of grain…” – exactly the kind of system this calculator solves!

Frequently Asked Questions

You can enter integers, decimals (like 3.14), and fractions (like 2/3). The calculator parses them as floating numbers, but displays results with up to 4 decimals. Fractions are automatically reduced when possible.

We use partial pivoting (row swap) to move the largest absolute value in the column to the pivot position. This improves numerical stability.

Reduced Row Echelon Form. It's the final simplified form after Gauss-Jordan elimination, from which the solution can be read directly.

Currently we support square systems (n equations, n unknowns). For other cases, try our general matrix solver (coming soon).