← LibraryGaussian Elimination and Linear SystemsEngineering · MathematicsLesson 231/385← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin JoginGaussian eliminationlinear systemspivotingBareiss

Linear Algebra Algorithms

Gaussian Elimination and Linear Systems

Exact Gaussian elimination, pivoting for entry growth rather than stability, and the fraction-free Bareiss variant.

Engineering / MathematicsLinear Algebra Algorithms2 min readKV-MATH-0529

Gaussian elimination over an exact domain follows the familiar shape but is tuned for entirely different reasons. Over the reals pivoting controls rounding error; over the integers there is no rounding error, and pivoting controls entry growth instead.

The procedure

Gaussian elimination

  1. Select a pivotChoose a non-zero entry in the current column.
  2. SwapMove it to the diagonal position.
  3. EliminateSubtract multiples of the pivot row from the rows below to zero the column.
  4. RecurseRepeat on the remaining submatrix.
  5. Back-substituteSolve the resulting triangular system.

Pivoting for exact arithmetic

Pivot selection depends on the domain
DomainPivot choiceReason
Floating pointLargest magnitudeNumerical stability
IntegersSmallest non-zero magnitudeLimits entry growth
Finite fieldAny non-zeroNo growth; choose for sparsity
SparseFewest non-zeros in row and columnLimits fill-in

Fraction-free elimination

Ordinary elimination over the integers introduces fractions. The Bareiss method avoids them by dividing each new entry by the previous pivot — a division that is provably exact.

a'_{ij} = (a_{kk} a_{ij} - a_{ik} a_{kj}) / a_{(k-1)(k-1)}The division is exact; every intermediate entry is a minor of the original matrix.

Rank and consistency

Elimination determines the rank as the number of pivots found. A system is inconsistent exactly when elimination produces a row that is zero except in the constant column.

Cost

O(n^3) field operations; bit cost depends on growth controlWith Bareiss and Hadamard bounds, the bit complexity is polynomial.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 2.2.2. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Continue learning

Matrix Representation and Cost ModelArticle · MathematicsNEXT LESSON →Gaussian Elimination over Finite FieldsArticle · MathematicsFinite Field Arithmetic in PracticeArticle · MathematicsDeterminant Computation StrategiesArticle · Mathematics