4.8.18 · D5Numerical Methods
Question bank — Solving linear systems — Gaussian elimination with partial pivoting
Quick vocabulary refresher so nothing below is a surprise:
Definition Words used in this bank
- Pivot — the diagonal entry we divide by when clearing column .
- Multiplier — the amount of the pivot row we subtract from row .
- Partial pivoting — before clearing column , swap the row with the largest (rows ) up to the pivot position.
- Singular — a matrix with no inverse; the system has no unique solution.
- Augmented matrix — the coefficients with the right-hand side glued on.
True or false — justify
TF1. Partial pivoting is only about avoiding division by exactly zero.
False. It also avoids dividing by tiny pivots, which spawn huge multipliers that amplify round-off; stability, not just legality, is the point.
TF2. After partial pivoting, every multiplier satisfies .
True. We put the largest-magnitude column entry on the diagonal, so and .
TF3. Row swaps change the solution of the system.
False. Swapping two equations just reorders them; the solution set is untouched — swapping is a legal elementary row operation.
TF4. If the exact pivot is nonzero, you never need to pivot.
False. A nonzero-but-tiny pivot is legal yet numerically disastrous in floating point; partial pivoting still helps enormously.
TF5. Gaussian elimination without pivoting always fails on singular matrices and always succeeds otherwise.
False. Some non-singular matrices give a zero pivot mid-way (needing a swap), and the process can also lose accuracy badly without ever hitting an exact zero.
TF6. Partial pivoting and complete pivoting give the same numerical answer on every problem.
False. Complete pivoting searches the whole remaining submatrix, so it may pick a different pivot and give a (usually more) accurate result at higher cost.
TF7. Back-substitution can be done in any order once is upper-triangular.
False. Only the last equation has a single unknown; each needs the already-known for , so you must go bottom-up.
TF8. If a matrix is symmetric and positive-definite, partial pivoting is mandatory for stability.
False. Such matrices are stable without pivoting (Cholesky needs none); pivoting there can even destroy symmetry. See Condition Number and Numerical Stability.
TF9. A zero pivot with no nonzero entry below it in that column means the matrix is singular.
True. No swap can supply a usable pivot, so column (rows ) is all zero — the rows are dependent and .
TF10. Partial pivoting roughly doubles the cost of Gaussian elimination.
False. It only adds comparisons on top of the elimination cost — cheap insurance, not a doubling.
Spot the error
SE1. "To pivot column 2, I compared all entries of row 2 and moved the biggest to the diagonal."
Wrong axis. Partial pivoting compares entries down the current column (rows ), not along a row; a row search would mix up different variables.
SE2. "I swapped rows 1 and 3 in but left alone since isn't part of the matrix."
The swap must include the right-hand side. Work on the augmented ; a half-swap pairs wrong RHS values with wrong equations and corrupts the answer.
SE3. "My multiplier is so that the update makes vanish."
The ratio is upside-down. We need , giving — pivot in the denominator.
SE4. "I found the largest column entry but only updated the coefficient columns during elimination, not ."
The row operation acts on every column including the RHS: . Skipping solves the wrong system.
SE5. "I solved bottom-up but wrote (forgot the divide)."
You must divide by the pivot: . Omitting mis-scales every unknown except when .
SE6. "The pivot was , so I multiplied the pivot row by a large scalar to make it nonzero."
Scaling a zero stays zero; scaling a nonzero pivot changes nothing essential. The correct move is a row swap with a row that has a nonzero column entry.
SE7. "I picked the pivot with the largest signed value, ignoring negatives."
Pivoting uses absolute value: . A large-magnitude negative entry (e.g. over ) is the better, more stable pivot.
Why questions
WHY1. Why does a huge multiplier hurt accuracy?
The update scales the pivot row by ; a large can swamp so significant digits of the small term are lost to round-off. See Round-off Error in Floating Point.
WHY2. Why compare only column and only rows when pivoting?
Rows above are already finalized (their pivots are set), and other columns belong to variables we haven't reached; only the current column's sub-entries can legally supply this step's pivot.
WHY3. Why is forward elimination but back-substitution only ?
Elimination touches an block for each of columns (), while back-substitution does one -length sum per unknown for unknowns ().
WHY4. Why can Gaussian elimination be used to compute cheaply?
equals the product of the pivots times for row swaps; elimination already produces those pivots, far cheaper than the cofactor route. See Determinants and Cramer's Rule.
WHY5. Why is the point of partial pivoting, not an accident?
Bounded multipliers keep the entries of from growing wildly, which bounds the amplification of round-off — this is exactly what "numerical stability" buys us.
WHY6. Why do we bother with decomposition if elimination already solves the system?
The pivoted elimination is an factorization ; storing , , lets us solve for many different without re-eliminating. See LU Decomposition and Back-substitution and Forward-substitution.
WHY7. Why might an iterative method be preferred over Gaussian elimination for very large systems?
For huge sparse systems, direct work and fill-in become prohibitive, whereas each iteration is . See Iterative Methods (Jacobi, Gauss-Seidel).
Edge cases
EC1. What happens at column if all entries for are zero?
No swap yields a nonzero pivot, so is singular; the system has either no solution or infinitely many, never a unique one.
EC2. What does partial pivoting do when the current pivot is already the largest in its column?
It swaps the row with itself — a no-op. Pivoting never hurts; in the best case it simply confirms the current pivot.
EC3. Two candidate rows tie for the largest — which do you pick?
Either is valid; a common tie-break is the lowest-index row. The choice affects intermediate numbers but not the exact solution.
EC4. The matrix is already upper-triangular. Do we still run elimination?
All below-diagonal entries are zero, so every multiplier is zero and no swaps improve things; you can jump straight to back-substitution.
EC5. A pivot is exactly zero but a nonzero entry sits below it in the column. Solvable?
Yes — swap that lower row up to supply a nonzero pivot. This is precisely the case partial pivoting was designed to rescue.
EC6. What if is nearly singular (ill-conditioned) but not exactly singular?
Pivoting still runs and gives an answer, but a large condition number means small data errors can cause large solution errors; report with caution. See Condition Number and Numerical Stability.
EC7. A system — what does the method reduce to?
There is nothing to eliminate; back-substitution gives , and pivoting only checks that (else singular).
Recall One-line self-test
Cover everything: can you state why , why we go bottom-up, and what an all-zero pivot column means — in one breath each? If yes, the traps above will not catch you.