Gaussian Elimination with Pivoting

Graduate Depth 90 in the knowledge graph I know this Set as goal
Unlocks 3 downstream topics
gaussian-elimination pivoting linear-systems

Core Idea

Gaussian elimination with partial (row) or complete (row and column) pivoting reorders equations to avoid dividing by small numbers, which amplifies rounding errors. Pivoting maintains multipliers |m_ij| ≤ 1, keeping roundoff errors bounded. While Gaussian elimination without pivoting can fail catastrophically on well-conditioned systems, pivoting recovers numerical stability without significantly increasing computation.

Explainer

From basic Gaussian elimination, you know the algorithm: eliminate variables one column at a time by subtracting multiples of the pivot row from rows below. The multiplier for row i (when eliminating column k) is mᵢₖ = aᵢₖ / aₖₖ. This works perfectly in exact arithmetic. The problem — which your prerequisite in numerical stability prepared you for — is that computers work with floating-point numbers, and dividing by a very small pivot aₖₖ can blow up errors dramatically.

Here's the disaster scenario. Suppose your pivot is 0.0001 and the entry below it is 1. The multiplier is 1/0.0001 = 10,000. Now every rounding error in that row gets amplified by 10,000 before being subtracted. Even a tiny floating-point imprecision in the original data becomes a massive error in the result. The system might be perfectly well-conditioned (have a unique, stable solution) and still produce a garbage numerical answer — purely because of the order in which you encountered a small number.

Partial pivoting fixes this by a simple rule: before eliminating column k, scan down column k from row k to n, find the entry with the largest absolute value, and swap that row up to become the pivot row. This guarantees the pivot is at least as large as all entries below it in that column, so all multipliers satisfy |mᵢₖ| ≤ 1. Small multipliers mean errors don't get amplified — they stay bounded. In practice, partial pivoting makes Gaussian elimination reliable for virtually all problems that arise in scientific computing. You're not changing the mathematical problem; you're just reordering the equations, which doesn't change the solution.

Complete pivoting additionally searches for the largest entry in the entire remaining submatrix, swapping both rows and columns. This provides the strongest stability guarantee, but requires more searching and also permutes the variable order, complicating bookkeeping. For most applications, partial pivoting is sufficient. The computational overhead of either strategy is small relative to the O(n³) cost of elimination itself — just O(n²) comparisons for partial pivoting. Pivoting is why Gaussian elimination is a practical algorithm, not just a theoretical one: it's the difference between a method that works on paper and one that you can trust on a computer.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionFundamental Theorem of Calculus Part 1Fundamental Theorem of Calculus Part 2U-SubstitutionIntegration by PartsSeparable Differential EquationsIntegrating Factor Method for First-Order Linear ODEsFirst-Order Linear Ordinary Differential EquationsSecond-Order Linear Homogeneous Differential EquationsCharacteristic Equation Method for Linear ODEsComplex Roots and Oscillatory SolutionsSpring-Mass Systems and Mechanical VibrationsResonance and Damping in Forced VibrationsRLC Circuit Applications of Differential EquationsIntroduction to Differential EquationsEuler's Method for Numerical SolutionsEuler's Method for ODEs (Error Analysis)Runge-Kutta MethodsStiff Differential Equations and Stability RegionsStability Regions and A-StabilityNumerical Stability and ConditioningGaussian Elimination with Pivoting

Longest path: 91 steps · 435 total prerequisite topics

Prerequisites (2)

Leads To (2)